From 72d961a1da712ba0f50a8092ac68cde76f44cc5d Mon Sep 17 00:00:00 2001 From: Evgeniy Stepanov Date: Thu, 16 Jun 2016 22:34:00 +0000 Subject: [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 --- llvm/lib/CodeGen/SafeStack.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'llvm/lib/CodeGen/SafeStack.cpp') 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(); } -- cgit v1.1