[llvm-branch-commits] [llvm-branch] r73463 - in /llvm/branches/Apple/Bender: lib/CodeGen/AsmPrinter/DwarfWriter.cpp test/DebugInfo/2009-06-15-abstract_origin.ll

Bill Wendling isanbard at gmail.com
Mon Jun 15 20:45:48 PDT 2009


Author: void
Date: Mon Jun 15 22:45:48 2009
New Revision: 73463

URL: http://llvm.org/viewvc/llvm-project?rev=73463&view=rev
Log:
--- Merging r73457 into '.':
A    test/DebugInfo/2009-06-15-abstract_origin.ll
M    lib/CodeGen/AsmPrinter/DwarfWriter.cpp

Use MainCU if it is available.

Added:
    llvm/branches/Apple/Bender/test/DebugInfo/2009-06-15-abstract_origin.ll
      - copied unchanged from r73457, llvm/trunk/test/DebugInfo/2009-06-15-abstract_origin.ll
Modified:
    llvm/branches/Apple/Bender/lib/CodeGen/AsmPrinter/DwarfWriter.cpp

Modified: llvm/branches/Apple/Bender/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Bender/lib/CodeGen/AsmPrinter/DwarfWriter.cpp?rev=73463&r1=73462&r2=73463&view=diff

==============================================================================
--- llvm/branches/Apple/Bender/lib/CodeGen/AsmPrinter/DwarfWriter.cpp (original)
+++ llvm/branches/Apple/Bender/lib/CodeGen/AsmPrinter/DwarfWriter.cpp Mon Jun 15 22:45:48 2009
@@ -3607,6 +3607,9 @@
     if (TimePassesIsEnabled)
       DebugTimer->startTimer();
 
+    CompileUnit *Unit = MainCU;
+    if (!Unit)
+      Unit = &FindCompileUnit(SP.getCompileUnit());
     GlobalVariable *GV = SP.getGV();
     DenseMap<const GlobalVariable *, DbgScope *>::iterator
       II = AbstractInstanceRootMap.find(GV);
@@ -3617,7 +3620,6 @@
       DbgScope *Scope = new DbgScope(NULL, DIDescriptor(GV));
 
       // Get the compile unit context.
-      CompileUnit *Unit = &FindCompileUnit(SP.getCompileUnit());
       DIE *SPDie = Unit->getDieMapSlotFor(GV);
       if (!SPDie)
         SPDie = CreateSubprogramDIE(Unit, SP);
@@ -3639,7 +3641,6 @@
     // Create a concrete inlined instance for this inlined function.
     DbgConcreteScope *ConcreteScope = new DbgConcreteScope(DIDescriptor(GV));
     DIE *ScopeDie = new DIE(DW_TAG_inlined_subroutine);
-    CompileUnit *Unit = &FindCompileUnit(SP.getCompileUnit());
     ScopeDie->setAbstractCompileUnit(Unit);
 
     DIE *Origin = Unit->getDieMapSlotFor(GV);





More information about the llvm-branch-commits mailing list