mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-20 10:24:12 +00:00
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:
@ -724,4 +724,23 @@ void DwarfCompileUnit::addVariableAddress(const DbgVariable &DV, DIE &Die,
|
|||||||
addAddress(Die, dwarf::DW_AT_location, Location,
|
addAddress(Die, dwarf::DW_AT_location, Location,
|
||||||
DV.getVariable().isIndirect());
|
DV.getVariable().isIndirect());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Add an address attribute to a die based on the location provided.
|
||||||
|
void DwarfCompileUnit::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);
|
||||||
|
}
|
||||||
} // end llvm namespace
|
} // end llvm namespace
|
||||||
|
@ -196,6 +196,9 @@ public:
|
|||||||
/// MachineLocation.
|
/// MachineLocation.
|
||||||
void addVariableAddress(const DbgVariable &DV, DIE &Die,
|
void addVariableAddress(const DbgVariable &DV, DIE &Die,
|
||||||
MachineLocation Location);
|
MachineLocation Location);
|
||||||
|
/// Add an address attribute to a die based on the location provided.
|
||||||
|
void addAddress(DIE &Die, dwarf::Attribute Attribute,
|
||||||
|
const MachineLocation &Location, bool Indirect = false);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // end llvm namespace
|
} // end llvm namespace
|
||||||
|
@ -493,25 +493,6 @@ void DwarfUnit::addRegisterOffset(DIELoc &TheDie, unsigned Reg,
|
|||||||
addSInt(TheDie, dwarf::DW_FORM_sdata, Offset);
|
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,
|
/// addComplexAddress - Start with the address based on the location provided,
|
||||||
/// and generate the DWARF information necessary to find the actual variable
|
/// and generate the DWARF information necessary to find the actual variable
|
||||||
/// given the extra address information encoded in the DbgVariable, starting
|
/// given the extra address information encoded in the DbgVariable, starting
|
||||||
|
@ -262,11 +262,6 @@ public:
|
|||||||
void addSourceLine(DIE &Die, DINameSpace NS);
|
void addSourceLine(DIE &Die, DINameSpace NS);
|
||||||
void addSourceLine(DIE &Die, DIObjCProperty Ty);
|
void addSourceLine(DIE &Die, DIObjCProperty Ty);
|
||||||
|
|
||||||
/// addAddress - Add an address attribute to a die based on the location
|
|
||||||
/// provided.
|
|
||||||
void addAddress(DIE &Die, dwarf::Attribute Attribute,
|
|
||||||
const MachineLocation &Location, bool Indirect = false);
|
|
||||||
|
|
||||||
/// addConstantValue - Add constant value entry in variable DIE.
|
/// addConstantValue - Add constant value entry in variable DIE.
|
||||||
void addConstantValue(DIE &Die, const MachineOperand &MO, DIType Ty);
|
void addConstantValue(DIE &Die, const MachineOperand &MO, DIType Ty);
|
||||||
void addConstantValue(DIE &Die, const ConstantInt *CI, DIType Ty);
|
void addConstantValue(DIE &Die, const ConstantInt *CI, DIType Ty);
|
||||||
|
Reference in New Issue
Block a user