X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FCodeGen%2FAsmPrinter%2FDwarfDebug.cpp;h=f584c2a036fd49e08e8c58f6e8878af04f987e2c;hb=76f193825c63e7b93b943890a2ed22086fe3bc2d;hp=4cb4dc13c5060fcee005806b7b8b413300f368a1;hpb=0c2d969bb0cf50189b594240a6116aae4cb367d3;p=oota-llvm.git diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 4cb4dc13c50..f584c2a036f 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -468,7 +468,6 @@ DwarfDebug::constructInlinedScopeDIE(DwarfCompileUnit &TheCU, attachRangesOrLowHighPC(TheCU, *ScopeDIE, Scope->getRanges()); InlinedSubprogramDIEs.insert(OriginDIE); - TheCU.addUInt(*OriginDIE, dwarf::DW_AT_inline, None, dwarf::DW_INL_inlined); // Add the call site information to the DIE. DILocation DL(Scope->getInlinedAt()); @@ -597,7 +596,7 @@ std::unique_ptr DwarfDebug::constructScopeDIE(DwarfCompileUnit &TheCU, // avoid creating un-used children then removing them later when we find out // the scope DIE is null. std::unique_ptr ScopeDIE; - if (DS.getContext() && DS.isSubprogram()) { + if (Scope->getParent() && DS.isSubprogram()) { ScopeDIE = constructInlinedScopeDIE(TheCU, Scope); if (!ScopeDIE) return nullptr; @@ -846,8 +845,8 @@ void DwarfDebug::collectDeadVariables() { continue; assert(SP.isSubprogram() && "CU's subprogram list contains a non-subprogram"); - if (!SP.isDefinition()) - continue; + assert(SP.isDefinition() && + "CU's subprogram list contains a subprogram declaration"); DIArray Variables = SP.getVariables(); if (Variables.getNumElements() == 0) continue;