[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
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user