Push DwarfUnit::addAddress down into DwarfCompileUnit

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221085 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Blaikie
2014-11-02 06:46:40 +00:00
parent f5dd438f80
commit 9e4cbe62b1
4 changed files with 22 additions and 24 deletions

View File

@@ -493,25 +493,6 @@ void DwarfUnit::addRegisterOffset(DIELoc &TheDie, unsigned Reg,
addSInt(TheDie, dwarf::DW_FORM_sdata, Offset);
}
/// addAddress - Add an address attribute to a die based on the location
/// provided.
void DwarfUnit::addAddress(DIE &Die, dwarf::Attribute Attribute,
const MachineLocation &Location, bool Indirect) {
DIELoc *Loc = new (DIEValueAllocator) DIELoc();
if (Location.isReg() && !Indirect)
addRegisterOpPiece(*Loc, Location.getReg());
else {
addRegisterOffset(*Loc, Location.getReg(), Location.getOffset());
if (Indirect && !Location.isReg()) {
addUInt(*Loc, dwarf::DW_FORM_data1, dwarf::DW_OP_deref);
}
}
// Now attach the location information to the DIE.
addBlock(Die, Attribute, Loc);
}
/// addComplexAddress - Start with the address based on the location provided,
/// and generate the DWARF information necessary to find the actual variable
/// given the extra address information encoded in the DbgVariable, starting