summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/Local.cpp
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2017-11-03 21:55:03 +0000
committerAdrian Prantl <aprantl@apple.com>2017-11-03 21:55:03 +0000
commit261ac8b23cd628fd244709427a0f59d5f4d144c4 (patch)
tree17fec48ba6790218dbebf7808c295b33cf4a0544 /llvm/lib/Transforms/Utils/Local.cpp
parent36528c2a9b3d37d6692de5738697598abfb5d9c8 (diff)
downloadbcm5719-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/Transforms/Utils/Local.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/Local.cpp2
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
OpenPOWER on IntegriCloud