[llvm-commits] [llvm] r144306 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp

Eric Christopher echristo at apple.com
Thu Nov 10 11:52:58 PST 2011


Author: echristo
Date: Thu Nov 10 13:52:58 2011
New Revision: 144306

URL: http://llvm.org/viewvc/llvm-project?rev=144306&view=rev
Log:
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.

Modified:
    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp?rev=144306&r1=144305&r2=144306&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp Thu Nov 10 13:52:58 2011
@@ -605,7 +605,11 @@
     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 @@
   // 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.





More information about the llvm-commits mailing list