From 424b59b1ce3b6550dd2c76e15c21bf7261a69ee0 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Mon, 19 May 2014 23:16:19 +0000 Subject: 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. llvm-svn: 209178 --- llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp') diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index f584c2a036f..c649aa13452 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/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, -- cgit v1.2.3