aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/SafeStack.cpp
diff options
context:
space:
mode:
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>2016-06-16 22:34:00 +0000
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>2016-06-16 22:34:00 +0000
commit72d961a1da712ba0f50a8092ac68cde76f44cc5d (patch)
tree4bf7cd33ec06272f313d53500e29fc7f9b41eca4 /llvm/lib/CodeGen/SafeStack.cpp
parent205bb618dec473ea0a7b759b922ee28cc7a99d14 (diff)
downloadllvm-72d961a1da712ba0f50a8092ac68cde76f44cc5d.zip
llvm-72d961a1da712ba0f50a8092ac68cde76f44cc5d.tar.gz
llvm-72d961a1da712ba0f50a8092ac68cde76f44cc5d.tar.bz2
[safestack] Fixup llvm.dbg.value when rewriting unsafe allocas.
When moving unsafe allocas to the unsafe stack, dbg.declare intrinsics are updated to refer to the new location. This change does the same to dbg.value intrinsics. llvm-svn: 272968
Diffstat (limited to 'llvm/lib/CodeGen/SafeStack.cpp')
-rw-r--r--llvm/lib/CodeGen/SafeStack.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SafeStack.cpp b/llvm/lib/CodeGen/SafeStack.cpp
index 1a6635f..28f5ed8 100644
--- a/llvm/lib/CodeGen/SafeStack.cpp
+++ b/llvm/lib/CodeGen/SafeStack.cpp
@@ -614,6 +614,7 @@ Value *SafeStack::moveStaticAllocasToUnsafeStack(
// Replace alloc with the new location.
replaceDbgDeclareForAlloca(AI, BasePointer, DIB, /*Deref=*/true, -StaticOffset);
+ replaceDbgValueForAlloca(AI, BasePointer, DIB, -StaticOffset);
AI->replaceAllUsesWith(NewAI);
AI->eraseFromParent();
}