diff options
author | Eric Christopher <echristo@apple.com> | 2011-11-10 19:52:58 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2011-11-10 19:52:58 +0000 |
commit | e288793e444a0dae9b12382752cf0eb72d4d328e (patch) | |
tree | b8fbf40110bd6df5f1b16cb3248dbda165ce3a3d /llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp | |
parent | 638095fa8f3c21b416745ac705051bfebb7fa6b5 (diff) | |
download | bcm5719-llvm-e288793e444a0dae9b12382752cf0eb72d4d328e.tar.gz bcm5719-llvm-e288793e444a0dae9b12382752cf0eb72d4d328e.zip |
Move type handling to make sure we get all created types that aren't
forward decls and have names into the dwarf accelerator types table.
llvm-svn: 144306
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp index a68da04907c..d440a746197 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp @@ -605,7 +605,11 @@ DIE *CompileUnit::getOrCreateTypeDIE(const MDNode *TyNode) { assert(Ty.isDerivedType() && "Unknown kind of DIType"); constructTypeDIE(*TyDIE, DIDerivedType(Ty)); } - + // 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); + addToContextOwner(TyDIE, Ty.getContext()); return TyDIE; } @@ -634,12 +638,6 @@ void CompileUnit::addType(DIE *Entity, DIType Ty) { // If this is a complete composite type then include it in the // list of global types. addGlobalType(Ty); - - // 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()) - if (DIEEntry *Entry = getDIEEntry(Ty)) - AccelTypes[Ty.getName()] = Entry->getEntry(); } /// addGlobalType - Add a new global type to the compile unit. |