DebugInfo: Add an assert regarding the subprogram in the subprogram map matching...
authorDavid Blaikie <dblaikie@gmail.com>
Fri, 16 May 2014 19:42:10 +0000 (19:42 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Fri, 16 May 2014 19:42:10 +0000 (19:42 +0000)
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209009 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter/DwarfDebug.cpp

index edd357d7ab920b0288143f10885676a2c84ff806..4cb4dc13c5060fcee005806b7b8b413300f368a1 100644 (file)
@@ -322,6 +322,7 @@ DIE &DwarfDebug::updateSubprogramScopeDIE(DwarfCompileUnit &SPCU,
   // 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);