[llvm] r209009 - DebugInfo: Add an assert regarding the subprogram in the subprogram map matching the abstract subprogram.

David Blaikie dblaikie at gmail.com
Fri May 16 12:42:10 PDT 2014


Author: dblaikie
Date: Fri May 16 14:42:10 2014
New Revision: 209009

URL: http://llvm.org/viewvc/llvm-project?rev=209009&view=rev
Log:
DebugInfo: Add an assert regarding the subprogram in the subprogram map matching the abstract subprogram.

I'm not sure this is how it'll be going forward (I'd rather prefer the
definition to be in the main SP mapping, for various reasons) but this
helps me understand how it is today.

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=209009&r1=209008&r2=209009&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Fri May 16 14:42:10 2014
@@ -322,6 +322,7 @@ DIE &DwarfDebug::updateSubprogramScopeDI
   // object pointer later on. But what we don't want to do is process the
   // concrete DIE twice.
   if (DIE *AbsSPDIE = AbstractSPDies.lookup(SP)) {
+    assert(SPDie == AbsSPDIE);
     // Pick up abstract subprogram DIE.
     SPDie = &SPCU.createAndAddDIE(dwarf::DW_TAG_subprogram, SPCU.getUnitDie());
     SPCU.addDIEEntry(*SPDie, dwarf::DW_AT_abstract_origin, *AbsSPDIE);





More information about the llvm-commits mailing list