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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209009 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Blaikie 2014-05-16 19:42:10 +00:00
parent 27c076ae40
commit 0c2d969bb0

View 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);