aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-readobj/llvm-readobj.cpp
diff options
context:
space:
mode:
authorDavid Stenberg <david.stenberg@ericsson.com>2018-12-11 10:33:38 +0000
committerDavid Stenberg <david.stenberg@ericsson.com>2018-12-11 10:33:38 +0000
commit2474ce586227b5c11bc50994841281dbaff129d8 (patch)
tree438b4b26e179f50185163d576a9bee5d98269639 /llvm/tools/llvm-readobj/llvm-readobj.cpp
parent4862ff8d17dd8e2bd47394f6c368c2e2c9609c39 (diff)
downloadllvm-2474ce586227b5c11bc50994841281dbaff129d8.zip
llvm-2474ce586227b5c11bc50994841281dbaff129d8.tar.gz
llvm-2474ce586227b5c11bc50994841281dbaff129d8.tar.bz2
[DeadArgElim] Fixes for dbg.values using dead arg/return values
Summary: When eliminating a dead argument or return value in a function with local linkage, all uses, including in dbg.value intrinsics, would be replaced with null constants. This would mean that, for example for an integer argument, the debug info would incorrectly express that the value is 0. Instead, replace all uses with undef to indicate that the argument/return value is optimized out. Also, make sure that metadata uses of return values are rewritten even if there are no non-metadata uses of the value. As a bit of historical curiosity, the code that emitted null constants was introduced in the initial check-in of the pass in 2003, before 'undef' values even existed in LLVM. This fixes PR23260. Reviewers: dblaikie, aprantl, vsk, djtodoro Reviewed By: aprantl Subscribers: llvm-commits Tags: #debug-info Differential Revision: https://reviews.llvm.org/D55513 llvm-svn: 348837
Diffstat (limited to 'llvm/tools/llvm-readobj/llvm-readobj.cpp')
0 files changed, 0 insertions, 0 deletions