[llvm-branch-commits] [llvm-branch] r71521 - /llvm/branches/Apple/Dib/lib/CodeGen/AsmPrinter/DwarfWriter.cpp

Bill Wendling isanbard at gmail.com
Mon May 11 17:08:37 PDT 2009


Author: void
Date: Mon May 11 19:08:37 2009
New Revision: 71521

URL: http://llvm.org/viewvc/llvm-project?rev=71521&view=rev
Log:
--- Merging r71519 into '.':
U    lib/CodeGen/AsmPrinter/DwarfWriter.cpp

- Record that the debug info is actually used so that the label folder doesn't
  blast it away.
- Move InlineInfo bookkeeping to bookkeep the correct debug info object.

Modified:
    llvm/branches/Apple/Dib/lib/CodeGen/AsmPrinter/DwarfWriter.cpp

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

==============================================================================
--- llvm/branches/Apple/Dib/lib/CodeGen/AsmPrinter/DwarfWriter.cpp (original)
+++ llvm/branches/Apple/Dib/lib/CodeGen/AsmPrinter/DwarfWriter.cpp Mon May 11 19:08:37 2009
@@ -3619,15 +3619,6 @@
       // could be more elegant.
       AddUInt(SPDie, DW_AT_inline, 0, DW_INL_declared_not_inlined);
 
-      // Track the start label for this inlined function.
-      DenseMap<GlobalVariable *, SmallVector<unsigned, 4> >::iterator
-        I = InlineInfo.find(GV);
-
-      if (I == InlineInfo.end())
-        InlineInfo[GV].push_back(LabelID);
-      else
-        I->second.push_back(LabelID);
-
       AbstractInstanceRootMap[GV] = Scope;
       AbstractInstanceRootList.push_back(Scope);
     }
@@ -3646,6 +3637,7 @@
 
     ConcreteScope->setDie(ScopeDie);
     ConcreteScope->setStartLabelID(LabelID);
+    MMI->RecordUsedDbgLabel(LabelID);
 
     LexicalScopeStack.back()->AddConcreteInst(ConcreteScope);
 
@@ -3658,6 +3650,15 @@
     else
       SI->second.push_back(ConcreteScope);
 
+    // Track the start label for this inlined function.
+    DenseMap<GlobalVariable *, SmallVector<unsigned, 4> >::iterator
+      I = InlineInfo.find(GV);
+
+    if (I == InlineInfo.end())
+      InlineInfo[GV].push_back(LabelID);
+    else
+      I->second.push_back(LabelID);
+
     if (TimePassesIsEnabled)
       DebugTimer->stopTimer();
 
@@ -3687,7 +3688,6 @@
     assert(!Scopes.empty() && "We should have at least one debug scope!");
     DbgConcreteScope *Scope = Scopes.back(); Scopes.pop_back();
     unsigned ID = MMI->NextLabelID();
-
     MMI->RecordUsedDbgLabel(ID);
     Scope->setEndLabelID(ID);
 





More information about the llvm-branch-commits mailing list