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/Transforms/Utils/Local.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/Transforms/Utils/Local.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/Local.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp index 8c643c93ec4..cb7978f76aa 100644 --- a/llvm/lib/Transforms/Utils/Local.cpp +++ b/llvm/lib/Transforms/Utils/Local.cpp @@ -1366,7 +1366,7 @@ void llvm::salvageDebugInfo(Instruction &I) { return MetadataAsValue::get(I.getContext(), ValueAsMetadata::get(V)); }; - if (isa<BitCastInst>(&I)) { + if (isa<BitCastInst>(&I) || isa<IntToPtrInst>(&I)) { findDbgValues(DbgValues, &I); for (auto *DVI : DbgValues) { // Bitcasts are entirely irrelevant for debug info. Rewrite the dbg.value |