Move the AddressPool from DwarfFile to DwarfDebug.

There's only ever one address pool, not one per DWARF output file, so
let's just have one.

(similar refactoring of the string pool to come soon)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207026 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Blaikie
2014-04-23 21:20:10 +00:00
parent 2bff66859e
commit 08e5ef25fb
4 changed files with 10 additions and 11 deletions
+3 -3
View File
@@ -290,7 +290,7 @@ void DwarfCompileUnit::addLabelAddress(DIE *Die, dwarf::Attribute Attribute,
if (Label)
DD->addArangeLabel(SymbolCU(this, Label));
unsigned idx = DU->getAddressPool().getIndex(Label);
unsigned idx = DD->getAddressPool().getIndex(Label);
DIEValue *Value = new (DIEValueAllocator) DIEInteger(idx);
Die->addValue(Attribute, dwarf::DW_FORM_GNU_addr_index, Value);
}
@@ -336,7 +336,7 @@ void DwarfUnit::addOpAddress(DIELoc *Die, const MCSymbol *Sym) {
} else {
addUInt(Die, dwarf::DW_FORM_data1, dwarf::DW_OP_GNU_addr_index);
addUInt(Die, dwarf::DW_FORM_GNU_addr_index,
DU->getAddressPool().getIndex(Sym));
DD->getAddressPool().getIndex(Sym));
}
}
@@ -1669,7 +1669,7 @@ void DwarfCompileUnit::createGlobalVariableDIE(DIGlobalVariable GV) {
} else {
addUInt(Loc, dwarf::DW_FORM_data1, dwarf::DW_OP_GNU_const_index);
addUInt(Loc, dwarf::DW_FORM_udata,
DU->getAddressPool().getIndex(Sym, /* TLS */ true));
DD->getAddressPool().getIndex(Sym, /* TLS */ true));
}
// 3) followed by a custom OP to make the debugger do a TLS lookup.
addUInt(Loc, dwarf::DW_FORM_data1, dwarf::DW_OP_GNU_push_tls_address);