As part of the ongoing work in finalizing the accelerator tables, extend

the debug type accelerator tables to contain the tag and a flag
stating whether or not a compound type is a complete type.

rdar://10652330

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147651 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Christopher
2012-01-06 04:35:23 +00:00
parent 3b205175ea
commit c36145f19c
5 changed files with 110 additions and 38 deletions

View File

@ -13,6 +13,7 @@
#define DEBUG_TYPE "dwarfdebug"
#include "DwarfAccelTable.h"
#include "DwarfCompileUnit.h"
#include "DwarfDebug.h"
#include "llvm/Constants.h"
@ -608,8 +609,20 @@ DIE *CompileUnit::getOrCreateTypeDIE(const MDNode *TyNode) {
}
// If this is a named finished type then include it in the list of types
// for the accelerator tables.
if (!Ty.getName().empty() && !Ty.isForwardDecl())
addAccelType(Ty.getName(), TyDIE);
if (!Ty.getName().empty() && !Ty.isForwardDecl()) {
bool IsImplementation = 0;
if (Ty.isCompositeType()) {
DICompositeType CT(Ty);
IsImplementation = (CT.getRunTimeLang() == 0) ||
CT.isObjcClassComplete();;
}
addAccelType(Ty.getName(),
std::make_pair(TyDIE,
(IsImplementation ?
DwarfAccelTable::eTypeFlagClassIsImplementation :
0)));
}
addToContextOwner(TyDIE, Ty.getContext());
return TyDIE;