summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2018-02-13 01:09:47 +0000
committerVedant Kumar <vsk@apple.com>2018-02-13 01:09:47 +0000
commit47b16c45d7acef402729e67d66aebafe5295af75 (patch)
treebb6b35773391e832ba95c4e67a56a1669267ef61 /llvm/lib/Transforms/Utils
parent96b7dc041b5e01949f654594b3761d8be7184ee5 (diff)
downloadbcm5719-llvm-47b16c45d7acef402729e67d66aebafe5295af75.tar.gz
bcm5719-llvm-47b16c45d7acef402729e67d66aebafe5295af75.zip
[Utils] Salvage the debug info of DCE'ed 'sub' instructions
This salvages 14 debug values in a stage2 build of clang. llvm-svn: 324974
Diffstat (limited to 'llvm/lib/Transforms/Utils')
-rw-r--r--llvm/lib/Transforms/Utils/Local.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp
index 13668e74006..379b6bf1311 100644
--- a/llvm/lib/Transforms/Utils/Local.cpp
+++ b/llvm/lib/Transforms/Utils/Local.cpp
@@ -1546,6 +1546,9 @@ void llvm::salvageDebugInfo(Instruction &I) {
case Instruction::Add:
applyOffset(DII, Val);
break;
+ case Instruction::Sub:
+ applyOffset(DII, -int64_t(Val));
+ break;
case Instruction::Or:
applyOps(DII, {dwarf::DW_OP_constu, Val, dwarf::DW_OP_or});
break;
OpenPOWER on IntegriCloud