diff options
author | Adrian Prantl <aprantl@apple.com> | 2017-11-03 18:00:02 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2017-11-03 18:00:02 +0000 |
commit | 58e9a0bb1609fb35f2580f1b91ed7c4e9eb890d7 (patch) | |
tree | 24970bcaba3bfeb4bb8ddc07bb6f5b3f85a5a657 /llvm/lib/CodeGen/CodeGenPrepare.cpp | |
parent | 924cff0a3988975996bd5808d3b64e320ee73c84 (diff) | |
download | bcm5719-llvm-58e9a0bb1609fb35f2580f1b91ed7c4e9eb890d7.tar.gz bcm5719-llvm-58e9a0bb1609fb35f2580f1b91ed7c4e9eb890d7.zip |
Invoke salvageDebugInfo from CodeGenPrepare's SinkCast()
This preserves the debug info for the cast operation in the original location.
rdar://problem/33460652
llvm-svn: 317340
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; } |