aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
diff options
context:
space:
mode:
authorJeremy Morse <jeremy.morse@sony.com>2020-02-05 15:19:00 +0000
committerJeremy Morse <jeremy.morse@sony.com>2020-02-06 14:41:39 +0000
commited5998d21e4bdffe4baae918bc9065ae8435c49c (patch)
tree7029423e82930e007a001e69ebebe73b48568796 /llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
parentd6da8a1d945361327b8da79195dbfccc2e533e87 (diff)
downloadllvm-ed5998d21e4bdffe4baae918bc9065ae8435c49c.zip
llvm-ed5998d21e4bdffe4baae918bc9065ae8435c49c.tar.gz
llvm-ed5998d21e4bdffe4baae918bc9065ae8435c49c.tar.bz2
Revert "[SafeStack][DebugInfo] Insert DW_OP_deref in correct location"
This reverts commit 2d3174c4df6b5f4131346828d0a31675d80d6e2b. The overall solution for this problem is reverting D68945, which wasn't handling the -O0 path through the codegen backend correctly. See: discussion in D73526.
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp b/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
index 90ff762..c613c25 100644
--- a/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
@@ -751,9 +751,9 @@ InstrEmitter::EmitDbgValue(SDDbgValue *SD,
// Indirect addressing is indicated by an Imm as the second parameter.
if (SD->isIndirect())
- MIB.addImm(0U);
- else
- MIB.addReg(0U, RegState::Debug);
+ Expr = DIExpression::append(Expr, {dwarf::DW_OP_deref});
+
+ MIB.addReg(0U, RegState::Debug);
MIB.addMetadata(Var);
MIB.addMetadata(Expr);