[llvm] r195700 - DebugInfo: Remove CompileUnit::constructTypeDIEImpl now that it's just a simple wrapper again.

David Blaikie dblaikie at gmail.com
Mon Nov 25 16:35:04 PST 2013


Author: dblaikie
Date: Mon Nov 25 18:35:04 2013
New Revision: 195700

URL: http://llvm.org/viewvc/llvm-project?rev=195700&view=rev
Log:
DebugInfo: Remove CompileUnit::constructTypeDIEImpl now that it's just a simple wrapper again.

r195698 moved the type unit checking up into getOrCreateTypeDIE so
remove the redundant check and fold the functions back together again.

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

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp?rev=195700&r1=195699&r2=195700&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp Mon Nov 25 18:35:04 2013
@@ -923,7 +923,7 @@ DIE *CompileUnit::createTypeDIE(DICompos
   // Create new type.
   TyDIE = createAndAddDIE(Ty.getTag(), *ContextDIE, Ty);
 
-  constructTypeDIEImpl(*TyDIE, Ty);
+  constructTypeDIE(*TyDIE, Ty);
 
   updateAcceleratorTables(Context, Ty, TyDIE);
   return TyDIE;
@@ -994,7 +994,7 @@ DIE *CompileUnit::getOrCreateTypeDIE(con
       // Skip updating the accellerator tables since this is not the full type
       return TyDIE;
     }
-    constructTypeDIEImpl(*TyDIE, CTy);
+    constructTypeDIE(*TyDIE, CTy);
   } else {
     assert(Ty.isDerivedType() && "Unknown kind of DIType");
     constructTypeDIE(*TyDIE, DIDerivedType(Ty));
@@ -1169,15 +1169,6 @@ void CompileUnit::constructTypeDIE(DIE &
 
 /// constructTypeDIE - Construct type DIE from DICompositeType.
 void CompileUnit::constructTypeDIE(DIE &Buffer, DICompositeType CTy) {
-  // If this is a type applicable to a type unit it then add it to the
-  // list of types we'll compute a hash for later.
-  if (shouldCreateTypeUnit(CTy, DD))
-    DD->addTypeUnitType(&Buffer, CTy);
-  else
-    constructTypeDIEImpl(Buffer, CTy);
-}
-
-void CompileUnit::constructTypeDIEImpl(DIE &Buffer, DICompositeType CTy) {
   // Add name if not anonymous or intermediate type.
   StringRef Name = CTy.getName();
 

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h?rev=195700&r1=195699&r2=195700&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h Mon Nov 25 18:35:04 2013
@@ -327,10 +327,6 @@ public:
   DIE *createAndAddDIE(unsigned Tag, DIE &Parent,
                        DIDescriptor N = DIDescriptor());
 
-  /// constructTypeDIEImpl - Construct type DIE that is not a type unit
-  /// reference from a DICompositeType.
-  void constructTypeDIEImpl(DIE &Buffer, DICompositeType CTy);
-
   /// Compute the size of a header for this unit, not including the initial
   /// length field.
   unsigned getHeaderSize() const {





More information about the llvm-commits mailing list