[llvm] r174352 - Construct a skeleton cu for each compile unit in the module, not just

Eric Christopher echristo at gmail.com
Mon Feb 4 23:32:03 PST 2013


Author: echristo
Date: Tue Feb  5 01:32:03 2013
New Revision: 174352

URL: http://llvm.org/viewvc/llvm-project?rev=174352&view=rev
Log:
Construct a skeleton cu for each compile unit in the module, not just
for the first compile unit.

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

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=174352&r1=174351&r2=174352&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Tue Feb  5 01:32:03 2013
@@ -686,12 +686,12 @@ CompileUnit *DwarfDebug::constructCompil
   if (!FirstCU)
     FirstCU = NewCU;
 
-  // This should be a unique identifier when we want to build .dwp files.
-  if (useSplitDwarf())
+  if (useSplitDwarf()) {
+    // This should be a unique identifier when we want to build .dwp files.
     NewCU->addUInt(Die, dwarf::DW_AT_GNU_dwo_id, dwarf::DW_FORM_data8, 0);
-
-  if (useSplitDwarf() && !SkeletonCU)
-    SkeletonCU = constructSkeletonCU(N);
+    // Now construct the skeleton CU associated.
+    constructSkeletonCU(N);
+  }
 
   InfoHolder.addUnit(NewCU);
 
@@ -2477,6 +2477,9 @@ CompileUnit *DwarfDebug::constructSkelet
   if (!CompilationDir.empty())
     NewCU->addLocalString(Die, dwarf::DW_AT_comp_dir, CompilationDir);
 
+  if (!SkeletonCU)
+    SkeletonCU = NewCU;
+
   SkeletonHolder.addUnit(NewCU);
 
   return NewCU;





More information about the llvm-commits mailing list