mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-20 10:24:12 +00:00
Debug info: Fix PR22296 by omitting the DW_AT_location if we lost the
physical register that is described in a DBG_VALUE. In the testcase the DBG_VALUE describing "p5" becomes unavailable because the register its address is in is clobbered and we (currently) aren't smart enough to realize that the value is rematerialized immediately after the DBG_VALUE and/or is actually a stack slot. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227056 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -92,6 +92,9 @@ bool DwarfExpression::AddMachineRegPiece(unsigned MachineReg,
|
||||
unsigned PieceSizeInBits,
|
||||
unsigned PieceOffsetInBits) {
|
||||
const TargetRegisterInfo *TRI = getTRI();
|
||||
if (!TRI->isPhysicalRegister(MachineReg))
|
||||
return false;
|
||||
|
||||
int Reg = TRI->getDwarfRegNum(MachineReg, false);
|
||||
|
||||
// If this is a valid register number, emit it.
|
||||
|
Reference in New Issue
Block a user