summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/LiveDebugVariables.cpp
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2017-09-15 21:49:56 +0000
committerReid Kleckner <rnk@google.com>2017-09-15 21:49:56 +0000
commit9e6c309ef343acc13a14ca97f370e35079fbea1f (patch)
tree72a3937bb888c2a47ae4f66224fb092ba9d68bfb /llvm/lib/CodeGen/LiveDebugVariables.cpp
parentab211df5de42bf2b2f45fc73134c76f24835b47a (diff)
downloadbcm5719-llvm-9e6c309ef343acc13a14ca97f370e35079fbea1f.tar.gz
bcm5719-llvm-9e6c309ef343acc13a14ca97f370e35079fbea1f.zip
[DebugInfo] Add missing DW_OP_deref when an NRVO pointer is spilled
Summary: Fixes PR34513. Indirect DBG_VALUEs typically come from dbg.declares of non-trivially copyable C++ objects that must be passed by address. We were already handling the case where the virtual register gets allocated to a physical register and is later spilled. That's what usually happens for normal parameters that aren't NRVO variables: they usually appear in physical register parameters, and are spilled later in the function, which would correctly add deref. NRVO variables are different because the dbg.declare can come much later after earlier instructions cause the incoming virtual register to be spilled. Also, clean up this code. We only need to look at the first operand of a DBG_VALUE, which eliminates the operand loop. Reviewers: aprantl, dblaikie, probinson Subscribers: MatzeB, qcolombet, llvm-commits, hiraditya Differential Revision: https://reviews.llvm.org/D37929 llvm-svn: 313399
Diffstat (limited to 'llvm/lib/CodeGen/LiveDebugVariables.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud