diff options
author | Adrian Prantl <aprantl@apple.com> | 2017-11-03 21:55:03 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2017-11-03 21:55:03 +0000 |
commit | 261ac8b23cd628fd244709427a0f59d5f4d144c4 (patch) | |
tree | 17fec48ba6790218dbebf7808c295b33cf4a0544 /llvm/lib/CodeGen/CodeGenPrepare.cpp | |
parent | 36528c2a9b3d37d6692de5738697598abfb5d9c8 (diff) | |
download | bcm5719-llvm-261ac8b23cd628fd244709427a0f59d5f4d144c4.tar.gz bcm5719-llvm-261ac8b23cd628fd244709427a0f59d5f4d144c4.zip |
Invoke salvageDebugInfo from CodeGenPrepare's SinkCast()
This preserves the debug info for the cast operation in the original location.
rdar://problem/33460652
Reapplied r317340 with the test moved into an ARM-specific directory.
llvm-svn: 317375
Diffstat (limited to 'llvm/lib/CodeGen/CodeGenPrepare.cpp')
-rw-r--r-- | llvm/lib/CodeGen/CodeGenPrepare.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/CodeGenPrepare.cpp b/llvm/lib/CodeGen/CodeGenPrepare.cpp index 973ddebd987..73f014704b8 100644 --- a/llvm/lib/CodeGen/CodeGenPrepare.cpp +++ b/llvm/lib/CodeGen/CodeGenPrepare.cpp @@ -1171,6 +1171,7 @@ static bool SinkCast(CastInst *CI) { // If we removed all uses, nuke the cast. if (CI->use_empty()) { + salvageDebugInfo(*CI); CI->eraseFromParent(); MadeChange = true; } |