[llvm-commits] [llvm] r83347 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp

Devang Patel dpatel at apple.com
Mon Oct 5 16:59:01 PDT 2009


Author: dpatel
Date: Mon Oct  5 18:59:00 2009
New Revision: 83347

URL: http://llvm.org/viewvc/llvm-project?rev=83347&view=rev
Log:
If subprogram die is not available then construct new one.
This can happen if debug info is processed lazily.

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=83347&r1=83346&r2=83347&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Mon Oct  5 18:59:00 2009
@@ -1464,6 +1464,10 @@
 
   // Get the subprogram die.
   DIE *SPDie = ModuleCU->getDieMapSlotFor(SPD.getNode());
+  if (!SPDie) {
+    ConstructSubprogram(SPD.getNode());
+    SPDie = ModuleCU->getDieMapSlotFor(SPD.getNode());
+  }
   assert(SPDie && "Missing subprogram descriptor");
 
   if (!AbstractScope) {





More information about the llvm-commits mailing list