mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
Debug Info: Turn DIExpression::getFrameRegister() into an isFrameRegister()
function. NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225846 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d90e5063ca
commit
78415546e9
@ -46,8 +46,9 @@ void DebugLocDwarfExpression::EmitUnsigned(unsigned Value) {
|
||||
BS.EmitULEB128(Value, Twine(Value));
|
||||
}
|
||||
|
||||
unsigned DebugLocDwarfExpression::getFrameRegister() {
|
||||
llvm_unreachable("not available");
|
||||
bool DebugLocDwarfExpression::isFrameRegister(unsigned MachineReg) {
|
||||
// This information is not available while emitting .debug_loc entries.
|
||||
return false;
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
@ -79,7 +79,7 @@ bool DwarfExpression::AddMachineRegIndirect(unsigned MachineReg, int Offset) {
|
||||
if (DwarfReg < 0)
|
||||
return false;
|
||||
|
||||
if (MachineReg == getFrameRegister()) {
|
||||
if (isFrameRegister(MachineReg)) {
|
||||
// If variable offset is based in frame register then use fbreg.
|
||||
EmitOp(dwarf::DW_OP_fbreg);
|
||||
EmitSigned(Offset);
|
||||
|
@ -40,7 +40,7 @@ public:
|
||||
virtual void EmitSigned(int Value) = 0;
|
||||
virtual void EmitUnsigned(unsigned Value) = 0;
|
||||
|
||||
virtual unsigned getFrameRegister() = 0;
|
||||
virtual bool isFrameRegister(unsigned MachineReg) = 0;
|
||||
|
||||
/// Emit a dwarf register operation.
|
||||
void AddReg(int DwarfReg, const char* Comment = nullptr);
|
||||
@ -92,7 +92,7 @@ public:
|
||||
void EmitOp(uint8_t Op, const char *Comment) override;
|
||||
void EmitSigned(int Value) override;
|
||||
void EmitUnsigned(unsigned Value) override;
|
||||
unsigned getFrameRegister() override;
|
||||
bool isFrameRegister(unsigned MachineReg) override;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ public:
|
||||
void EmitOp(uint8_t Op, const char* Comment = nullptr) override;
|
||||
void EmitSigned(int Value) override;
|
||||
void EmitUnsigned(unsigned Value) override;
|
||||
unsigned getFrameRegister() override;
|
||||
bool isFrameRegister(unsigned MachineReg) override;
|
||||
};
|
||||
|
||||
void DIEDwarfExpression::EmitOp(uint8_t Op, const char* Comment) {
|
||||
@ -67,8 +67,8 @@ void DIEDwarfExpression::EmitSigned(int Value) {
|
||||
void DIEDwarfExpression::EmitUnsigned(unsigned Value) {
|
||||
DU.addUInt(DIE, dwarf::DW_FORM_udata, Value);
|
||||
}
|
||||
unsigned DIEDwarfExpression::getFrameRegister() {
|
||||
return getTRI()->getFrameRegister(*AP.MF);
|
||||
bool DIEDwarfExpression::isFrameRegister(unsigned MachineReg) {
|
||||
return MachineReg == getTRI()->getFrameRegister(*AP.MF);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user