mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-30 02:25:19 +00:00
Refactor DebugLocDWARFExpression so it doesn't require access to the
TargetRegisterInfo. DebugLocEntry now holds a buffer with the raw bytes of the pre-calculated DWARF expression. Ought to be NFC, but it does slightly alter the output format of the textual assembly. This reapplies 230930 with a relaxed assertion in DebugLocEntry::finalize() that allows for empty DWARF expressions for constant FP values. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230975 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -43,6 +43,12 @@ GenerateDwarfTypeUnits("generate-type-units", cl::Hidden,
|
||||
cl::desc("Generate DWARF4 type units."),
|
||||
cl::init(false));
|
||||
|
||||
DIEDwarfExpression::DIEDwarfExpression(const AsmPrinter &AP,
|
||||
DwarfUnit &DU, DIELoc &DIE)
|
||||
: DwarfExpression(*AP.TM.getSubtargetImpl()->getRegisterInfo(),
|
||||
AP.getDwarfDebug()->getDwarfVersion()),
|
||||
AP(AP), DU(DU), DIE(DIE) {}
|
||||
|
||||
void DIEDwarfExpression::EmitOp(uint8_t Op, const char* Comment) {
|
||||
DU.addUInt(DIE, dwarf::DW_FORM_data1, Op);
|
||||
}
|
||||
@@ -53,7 +59,7 @@ void DIEDwarfExpression::EmitUnsigned(unsigned Value) {
|
||||
DU.addUInt(DIE, dwarf::DW_FORM_udata, Value);
|
||||
}
|
||||
bool DIEDwarfExpression::isFrameRegister(unsigned MachineReg) {
|
||||
return MachineReg == getTRI()->getFrameRegister(*AP.MF);
|
||||
return MachineReg == TRI.getFrameRegister(*AP.MF);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user