[llvm-commits] [llvm] r144027 - in /llvm/trunk/lib/CodeGen/AsmPrinter: DwarfCompileUnit.cpp DwarfDebug.cpp
Eric Christopher
echristo at apple.com
Mon Nov 7 14:11:16 PST 2011
Author: echristo
Date: Mon Nov 7 16:11:16 2011
New Revision: 144027
URL: http://llvm.org/viewvc/llvm-project?rev=144027&view=rev
Log:
Add all completed and named types to the dwarf type accelerator tables.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp?rev=144027&r1=144026&r2=144027&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp Mon Nov 7 16:11:16 2011
@@ -634,6 +634,12 @@
// 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.
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=144027&r1=144026&r2=144027&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Mon Nov 7 16:11:16 2011
@@ -1834,8 +1834,7 @@
for (DenseMap<const MDNode *, CompileUnit *>::iterator I = CUMap.begin(),
E = CUMap.end(); I != E; ++I) {
CompileUnit *TheCU = I->second;
- const StringMap<DIE*> &Names = TheCU->getGlobalTypes();
- //TODO: TheCU->getAccelTypes();
+ const StringMap<DIE*> &Names = TheCU->getAccelTypes();
for (StringMap<DIE*>::const_iterator
GI = Names.begin(), GE = Names.end(); GI != GE; ++GI) {
const char *Name = GI->getKeyData();
More information about the llvm-commits
mailing list