aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Transforms/Utils
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2012-12-12 14:31:53 +0000
committerAlexey Samsonov <samsonov@google.com>2012-12-12 14:31:53 +0000
commit1afbb517965e29b07cb42e2335d5eadd87de6535 (patch)
tree4ca2a2f4c8eecd1ca7daeebe22eb5ca9a4355c81 /include/llvm/Transforms/Utils
parentcd5eb17be65627a1bf4b1e87b0a79573ba23463d (diff)
downloadexternal_llvm-1afbb517965e29b07cb42e2335d5eadd87de6535.zip
external_llvm-1afbb517965e29b07cb42e2335d5eadd87de6535.tar.gz
external_llvm-1afbb517965e29b07cb42e2335d5eadd87de6535.tar.bz2
Improve debug info generated with enabled AddressSanitizer.
When ASan replaces <alloca instruction> with <offset into a common large alloca>, it should also patch llvm.dbg.declare calls and replace debug info descriptors to mark that we've replaced alloca with a value that stores an address of the user variable, not the user variable itself. See PR11818 for more context. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169984 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Transforms/Utils')
-rw-r--r--include/llvm/Transforms/Utils/Local.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/llvm/Transforms/Utils/Local.h b/include/llvm/Transforms/Utils/Local.h
index 702628d..0c3be28 100644
--- a/include/llvm/Transforms/Utils/Local.h
+++ b/include/llvm/Transforms/Utils/Local.h
@@ -252,6 +252,11 @@ bool LowerDbgDeclare(Function &F);
/// an alloca, if any.
DbgDeclareInst *FindAllocaDbgDeclare(Value *V);
+/// replaceDbgDeclareForAlloca - Replaces llvm.dbg.declare instruction when
+/// alloca is replaced with a new value.
+bool replaceDbgDeclareForAlloca(AllocaInst *AI, Value *NewAllocaAddress,
+ DIBuilder &Builder);
+
} // End llvm namespace
#endif