diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 86fe1a9e704..62c82a397ec 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -330,8 +330,7 @@ bool DwarfDebug::isLexicalScopeDIENull(LexicalScope *Scope) { return !getLabelAfterInsn(Ranges.front().second); } -void DwarfDebug::constructAbstractSubprogramScopeDIE(DwarfCompileUnit &TheCU, - LexicalScope *Scope) { +void DwarfDebug::constructAbstractSubprogramScopeDIE(LexicalScope *Scope) { assert(Scope && Scope->getScopeNode()); assert(Scope->isAbstractScope()); assert(!Scope->getInlinedAt()); @@ -365,7 +364,7 @@ void DwarfDebug::constructAbstractSubprogramScopeDIE(DwarfCompileUnit &TheCU, DIDescriptor()); SPCU.applySubprogramAttributesToDefinition(SP, *AbsDef); - if (TheCU.getCUNode().getEmissionKind() != DIBuilder::LineTablesOnly) + if (SPCU.getCUNode().getEmissionKind() != DIBuilder::LineTablesOnly) SPCU.addUInt(*AbsDef, dwarf::DW_AT_inline, None, dwarf::DW_INL_inlined); if (DIE *ObjectPointer = SPCU.createAndAddScopeChildren(Scope, *AbsDef)) SPCU.addDIEEntry(*AbsDef, dwarf::DW_AT_object_pointer, *ObjectPointer); @@ -1431,7 +1430,7 @@ void DwarfDebug::endFunction(const MachineFunction *MF) { continue; ensureAbstractVariableIsCreated(DV, DV.getContext()); } - constructAbstractSubprogramScopeDIE(TheCU, AScope); + constructAbstractSubprogramScopeDIE(AScope); } TheCU.constructSubprogramScopeDIE(FnScope); diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.h b/lib/CodeGen/AsmPrinter/DwarfDebug.h index 7ee0bc7fe6a..9e314eba992 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.h +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.h @@ -350,8 +350,8 @@ class DwarfDebug : public AsmPrinterHandler { const MDNode *Scope); /// \brief Construct a DIE for this abstract scope. - void constructAbstractSubprogramScopeDIE(DwarfCompileUnit &TheCU, - LexicalScope *Scope); + void constructAbstractSubprogramScopeDIE(LexicalScope *Scope); + /// \brief Emit initial Dwarf sections with a label at the start of each one. void emitSectionLabels();