diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h --- a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h @@ -147,10 +147,8 @@ void addString(DIE &Die, dwarf::Attribute Attribute, StringRef Str); /// Add a Dwarf label attribute data and value. - DIEValueList::value_iterator addLabel(DIEValueList &Die, - dwarf::Attribute Attribute, - dwarf::Form Form, - const MCSymbol *Label); + void addLabel(DIEValueList &Die, dwarf::Attribute Attribute, dwarf::Form Form, + const MCSymbol *Label); void addLabel(DIELoc &Die, dwarf::Form Form, const MCSymbol *Label); @@ -272,13 +270,12 @@ void constructTypeDIE(DIE &Buffer, const DICompositeType *CTy); /// addSectionDelta - Add a label delta attribute data and value. - DIE::value_iterator addSectionDelta(DIE &Die, dwarf::Attribute Attribute, - const MCSymbol *Hi, const MCSymbol *Lo); + void addSectionDelta(DIE &Die, dwarf::Attribute Attribute, const MCSymbol *Hi, + const MCSymbol *Lo); /// Add a Dwarf section label attribute data and value. - DIE::value_iterator addSectionLabel(DIE &Die, dwarf::Attribute Attribute, - const MCSymbol *Label, - const MCSymbol *Sec); + void addSectionLabel(DIE &Die, dwarf::Attribute Attribute, + const MCSymbol *Label, const MCSymbol *Sec); /// Get context owner's DIE. DIE *createTypeDIE(const DICompositeType *Ty); diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp --- a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp @@ -286,11 +286,9 @@ DIEString(StringPoolEntry)); } -DIEValueList::value_iterator DwarfUnit::addLabel(DIEValueList &Die, - dwarf::Attribute Attribute, - dwarf::Form Form, - const MCSymbol *Label) { - return Die.addValue(DIEValueAllocator, Attribute, Form, DIELabel(Label)); +void DwarfUnit::addLabel(DIEValueList &Die, dwarf::Attribute Attribute, + dwarf::Form Form, const MCSymbol *Label) { + Die.addValue(DIEValueAllocator, Attribute, Form, DIELabel(Label)); } void DwarfUnit::addLabel(DIELoc &Die, dwarf::Form Form, const MCSymbol *Label) { @@ -1746,20 +1744,18 @@ Asm->emitDwarfLengthOrOffset(Ty ? Ty->getOffset() : 0); } -DIE::value_iterator -DwarfUnit::addSectionDelta(DIE &Die, dwarf::Attribute Attribute, - const MCSymbol *Hi, const MCSymbol *Lo) { - return Die.addValue(DIEValueAllocator, Attribute, - DD->getDwarfSectionOffsetForm(), - new (DIEValueAllocator) DIEDelta(Hi, Lo)); +void DwarfUnit::addSectionDelta(DIE &Die, dwarf::Attribute Attribute, + const MCSymbol *Hi, const MCSymbol *Lo) { + Die.addValue(DIEValueAllocator, Attribute, DD->getDwarfSectionOffsetForm(), + new (DIEValueAllocator) DIEDelta(Hi, Lo)); } -DIE::value_iterator -DwarfUnit::addSectionLabel(DIE &Die, dwarf::Attribute Attribute, - const MCSymbol *Label, const MCSymbol *Sec) { +void DwarfUnit::addSectionLabel(DIE &Die, dwarf::Attribute Attribute, + const MCSymbol *Label, const MCSymbol *Sec) { if (Asm->MAI->doesDwarfUseRelocationsAcrossSections()) - return addLabel(Die, Attribute, DD->getDwarfSectionOffsetForm(), Label); - return addSectionDelta(Die, Attribute, Label, Sec); + addLabel(Die, Attribute, DD->getDwarfSectionOffsetForm(), Label); + else + addSectionDelta(Die, Attribute, Label, Sec); } bool DwarfTypeUnit::isDwoUnit() const {