Sink DwarfUnit::addSectionDelta into DwarfCompileUnit, the only place it's needed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219364 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Blaikie 2014-10-08 23:30:05 +00:00
parent 8088af2547
commit e988932602
4 changed files with 12 additions and 14 deletions

View File

@ -387,4 +387,12 @@ void DwarfCompileUnit::constructScopeDIE(
FinalChildren.push_back(std::move(ScopeDIE)); FinalChildren.push_back(std::move(ScopeDIE));
} }
void DwarfCompileUnit::addSectionDelta(DIE &Die, dwarf::Attribute Attribute,
const MCSymbol *Hi, const MCSymbol *Lo) {
DIEValue *Value = new (DIEValueAllocator) DIEDelta(Hi, Lo);
Die.addValue(Attribute, DD->getDwarfVersion() >= 4 ? dwarf::DW_FORM_sec_offset
: dwarf::DW_FORM_data4,
Value);
}
} // end llvm namespace } // end llvm namespace

View File

@ -55,6 +55,10 @@ public:
void addLocalLabelAddress(DIE &Die, dwarf::Attribute Attribute, void addLocalLabelAddress(DIE &Die, dwarf::Attribute Attribute,
const MCSymbol *Label); const MCSymbol *Label);
/// addSectionDelta - Add a label delta attribute data and value.
void addSectionDelta(DIE &Die, dwarf::Attribute Attribute, const MCSymbol *Hi,
const MCSymbol *Lo);
DwarfCompileUnit &getCU() override { return *this; } DwarfCompileUnit &getCU() override { return *this; }
unsigned getOrCreateSourceID(StringRef FileName, StringRef DirName) override; unsigned getOrCreateSourceID(StringRef FileName, StringRef DirName) override;

View File

@ -284,16 +284,6 @@ void DwarfUnit::addOpAddress(DIELoc &Die, const MCSymbol *Sym) {
} }
} }
/// addSectionDelta - Add a section label delta attribute data and value.
///
void DwarfUnit::addSectionDelta(DIE &Die, dwarf::Attribute Attribute,
const MCSymbol *Hi, const MCSymbol *Lo) {
DIEValue *Value = new (DIEValueAllocator) DIEDelta(Hi, Lo);
Die.addValue(Attribute, DD->getDwarfVersion() >= 4 ? dwarf::DW_FORM_sec_offset
: dwarf::DW_FORM_data4,
Value);
}
void DwarfUnit::addLabelDelta(DIE &Die, dwarf::Attribute Attribute, void DwarfUnit::addLabelDelta(DIE &Die, dwarf::Attribute Attribute,
const MCSymbol *Hi, const MCSymbol *Lo) { const MCSymbol *Hi, const MCSymbol *Lo) {
DIEValue *Value = new (DIEValueAllocator) DIEDelta(Hi, Lo); DIEValue *Value = new (DIEValueAllocator) DIEDelta(Hi, Lo);

View File

@ -300,10 +300,6 @@ public:
/// form given and an op of either DW_FORM_addr or DW_FORM_GNU_addr_index. /// form given and an op of either DW_FORM_addr or DW_FORM_GNU_addr_index.
void addOpAddress(DIELoc &Die, const MCSymbol *Label); void addOpAddress(DIELoc &Die, const MCSymbol *Label);
/// addSectionDelta - Add a label delta attribute data and value.
void addSectionDelta(DIE &Die, dwarf::Attribute Attribute, const MCSymbol *Hi,
const MCSymbol *Lo);
/// addLabelDelta - Add a label delta attribute data and value. /// addLabelDelta - Add a label delta attribute data and value.
void addLabelDelta(DIE &Die, dwarf::Attribute Attribute, const MCSymbol *Hi, void addLabelDelta(DIE &Die, dwarf::Attribute Attribute, const MCSymbol *Hi,
const MCSymbol *Lo); const MCSymbol *Lo);