]> granicus.if.org Git - llvm/commit
Use DW_OP_stack_value when reconstructing variable values with arithmetic.
authorAdrian Prantl <aprantl@apple.com>
Sat, 22 Apr 2017 20:54:06 +0000 (20:54 +0000)
committerAdrian Prantl <aprantl@apple.com>
Sat, 22 Apr 2017 20:54:06 +0000 (20:54 +0000)
commit702614a330c01f746c7a2d01328f639dd72fb5bb
tree88e412ef33b1b864bcac66a78da53a98c78477b6
parent14a80cdb013688f120daf5202c7c7082f2d29f80
Use DW_OP_stack_value when reconstructing variable values with arithmetic.

When the location description of a source variable involves arithmetic
on the value itself, it needs to be marked with DW_OP_stack_value since it
is not describing the variable's location, but rather its value.

This is a follow-up to r297971 and fixes the source testcase quoted in
the comment in debuginfo-dce.ll.

rdar://problem/30725338

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301093 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/Local.cpp
test/Transforms/InstCombine/debuginfo-dce.ll