diff options
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp b/llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp index ee8b38f6502..de3bc914d8d 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp @@ -34,8 +34,6 @@ DbgVariableLocation::extractFromMachineInstruction( if (!Instruction.getOperand(0).isReg()) return None; Location.Register = Instruction.getOperand(0).getReg(); - Location.InMemory = Instruction.getOperand(1).isImm(); - Location.Deref = false; Location.FragmentInfo.reset(); // We only handle expressions generated by DIExpression::appendOffset, // which doesn't require a full stack machine. @@ -67,7 +65,8 @@ DbgVariableLocation::extractFromMachineInstruction( Location.FragmentInfo = {Op->getArg(1), Op->getArg(0)}; break; case dwarf::DW_OP_deref: - Location.Deref = true; + Location.LoadChain.push_back(Offset); + Offset = 0; break; default: return None; @@ -75,7 +74,12 @@ DbgVariableLocation::extractFromMachineInstruction( ++Op; } - Location.Offset = Offset; + // Do one final implicit DW_OP_deref if this was an indirect DBG_VALUE + // instruction. + // FIXME: Replace these with DIExpression. + if (Instruction.isIndirectDebugValue()) + Location.LoadChain.push_back(Offset); + return Location; } |