diff options
author | Adrian Prantl <aprantl@apple.com> | 2015-01-25 19:04:08 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2015-01-25 19:04:08 +0000 |
commit | 40cb819c6f23cf58416798e3f39136b39a33f8e6 (patch) | |
tree | 45057d91dd65c0f2aa947f76d4243509be7ced11 /llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp | |
parent | 258ac3cc56a70ec9629aa9f2c38d75e9d97ec447 (diff) | |
download | bcm5719-llvm-40cb819c6f23cf58416798e3f39136b39a33f8e6.tar.gz bcm5719-llvm-40cb819c6f23cf58416798e3f39136b39a33f8e6.zip |
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.
llvm-svn: 227056
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp index f3d3fb45bb2..7c5c879289b 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp @@ -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. |