Skip to content

Commit

Permalink
Move type handling to make sure we get all created types that aren't
Browse files Browse the repository at this point in the history
forward decls and have names into the dwarf accelerator types table.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144306 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
echristo committed Nov 10, 2011
1 parent 0ffe2b4 commit 1b3f919
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 1b3f919

Please sign in to comment.