OSDN Git Service

[Salvage] Change salvage debug info implementation to use DW_OP_LLVM_convert where...
authorStephen Tozer <stephen.tozer@sony.com>
Wed, 15 May 2019 13:15:48 +0000 (13:15 +0000)
committerStephen Tozer <stephen.tozer@sony.com>
Wed, 15 May 2019 13:15:48 +0000 (13:15 +0000)
commit76562e6377b52be26aa3812b649e0f14734cf226
tree4608999b41542e19c2eda9159a3674d1932ea60f
parentde3c2efffebd761384ed41033bf2b60752843a6b
[Salvage] Change salvage debug info implementation to use DW_OP_LLVM_convert where needed

Fixes issue: https://bugs.llvm.org/show_bug.cgi?id=40645

Previously, LLVM had no functional way of performing casts inside of a
DIExpression(), which made salvaging cast instructions other than Noop
casts impossible. With the recent addition of DW_OP_LLVM_convert this
salvaging is now possible, and so can be used to fix the attached bug as
well as any cases where SExt instruction results are lost in the
debugging metadata. This patch introduces this fix by expanding the
salvage debug info method to cover these cases using the new operator.

Differential revision: https://reviews.llvm.org/D61184

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360772 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/Local.cpp
test/DebugInfo/salvage-cast-debug-info.ll [new file with mode: 0755]
test/Transforms/InstCombine/cast-mul-select.ll