[llvm] r209251 - Revert "DebugInfo: Assume all subprogram DIEs have been created before any abstract subprograms are constructed."

David Blaikie dblaikie at gmail.com
Tue May 20 15:33:09 PDT 2014


Author: dblaikie
Date: Tue May 20 17:33:09 2014
New Revision: 209251

URL: http://llvm.org/viewvc/llvm-project?rev=209251&view=rev
Log:
Revert "DebugInfo: Assume all subprogram DIEs have been created before any abstract subprograms are constructed."

This reverts commit r209178.

This seems to be asserting in an LTO build on some internal Apple
buildbots. No upstream reproduction (and I don't have an LLVM-aware gold
built right now to reproduce it personally) but it's a small patch & the
failure's semi-plausible so I'm going to revert first while I try to
reproduce this.

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=209251&r1=209250&r2=209251&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Tue May 20 17:33:09 2014
@@ -530,11 +530,11 @@ void DwarfDebug::constructAbstractSubpro
   if (!ProcessedSPNodes.insert(Sub))
     return;
 
-  DIE *ScopeDIE = TheCU.getDIE(Sub);
-  assert(ScopeDIE);
-  AbstractSPDies.insert(std::make_pair(Sub, ScopeDIE));
-  TheCU.addUInt(*ScopeDIE, dwarf::DW_AT_inline, None, dwarf::DW_INL_inlined);
-  createAndAddScopeChildren(TheCU, Scope, *ScopeDIE);
+  if (DIE *ScopeDIE = TheCU.getDIE(Sub)) {
+    AbstractSPDies.insert(std::make_pair(Sub, ScopeDIE));
+    TheCU.addUInt(*ScopeDIE, dwarf::DW_AT_inline, None, dwarf::DW_INL_inlined);
+    createAndAddScopeChildren(TheCU, Scope, *ScopeDIE);
+  }
 }
 
 DIE &DwarfDebug::constructSubprogramScopeDIE(DwarfCompileUnit &TheCU,





More information about the llvm-commits mailing list