summaryrefslogtreecommitdiff
path: root/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-05-19 23:16:19 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-05-19 23:16:19 +0000
commitc108a06c86467e8f1583b2c4176e809c999efc42 (patch)
treed4c99f9fe446a93c647d9959f964cc0a16d7e0b9 /lib/CodeGen/AsmPrinter/DwarfDebug.cpp
parente267439365eca79344e9cc933ae82474d23f9786 (diff)
downloadllvm-c108a06c86467e8f1583b2c4176e809c999efc42.tar.gz
llvm-c108a06c86467e8f1583b2c4176e809c999efc42.tar.bz2
llvm-c108a06c86467e8f1583b2c4176e809c999efc42.tar.xz
DebugInfo: Assume all subprogram DIEs have been created before any abstract subprograms are constructed.
Since we visit the whole list of subprograms for each CU at module start, this is clearly true - don't test for the case, just assert it. A few old test cases seemed to have incomplete subprogram lists, but any attempt to reproduce them shows full subprogram lists that even include entities that have been completely inlined and the out of line definition removed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209178 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index f584c2a036..c649aa1345 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -552,11 +552,11 @@ void DwarfDebug::constructAbstractSubprogramScopeDIE(DwarfCompileUnit &TheCU,
if (!ProcessedSPNodes.insert(Sub))
return;
- 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 *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);
}
DIE &DwarfDebug::constructSubprogramScopeDIE(DwarfCompileUnit &TheCU,