diff options
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DbgEntityHistoryCalculator.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DbgEntityHistoryCalculator.cpp b/llvm/lib/CodeGen/AsmPrinter/DbgEntityHistoryCalculator.cpp index d87aac94c04..ee375529cf9 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DbgEntityHistoryCalculator.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DbgEntityHistoryCalculator.cpp @@ -275,9 +275,12 @@ void llvm::calculateDbgEntityHistory(const MachineFunction *MF, clobberRegisterUses(RegVars, MO.getReg(), DbgValues, LiveEntries, MI); // If this is a register def operand, it may end a debug value - // range. Ignore defs of the frame register in the prologue. + // range. Ignore frame-register defs in the epilogue and prologue, + // we expect debuggers to understand that stack-locations are + // invalid outside of the function body. else if (MO.getReg() != FrameReg || - !MI.getFlag(MachineInstr::FrameSetup)) { + (!MI.getFlag(MachineInstr::FrameDestroy) && + !MI.getFlag(MachineInstr::FrameSetup))) { for (MCRegAliasIterator AI(MO.getReg(), TRI, true); AI.isValid(); ++AI) clobberRegisterUses(RegVars, *AI, DbgValues, LiveEntries, MI); |