summaryrefslogtreecommitdiff
path: root/compiler-rt/include
diff options
context:
space:
mode:
authorFrancis Ricci <francisjricci@gmail.com>2017-09-08 19:43:53 +0000
committerFrancis Ricci <francisjricci@gmail.com>2017-09-08 19:43:53 +0000
commit879bf5bfb46ffc94e8714db7bdcd5126ceba70c7 (patch)
tree4539edb5c28a5018b9f88dfcb90c7cc554eeaee7 /compiler-rt/include
parent0a5b0a25e47797d2911a1d3f678b5540ce5c6285 (diff)
Prevent DCE on __lsan_is_turned_off and re-enable test case
Summary: -dead_strip in ld64 strips weak interface symbols, which I believe is most likely the cause of this test failure. Re-enable after marking the interface function as used. Reviewers: alekseyshl, kubamracek, kcc Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D37635
Diffstat (limited to 'compiler-rt/include')
-rw-r--r--compiler-rt/include/sanitizer/lsan_interface.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler-rt/include/sanitizer/lsan_interface.h b/compiler-rt/include/sanitizer/lsan_interface.h
index 8fb8e756da2..1f2e58909b4 100644
--- a/compiler-rt/include/sanitizer/lsan_interface.h
+++ b/compiler-rt/include/sanitizer/lsan_interface.h
@@ -64,6 +64,8 @@ extern "C" {
// for the program it is linked into (if the return value is non-zero). This
// function must be defined as returning a constant value; any behavior beyond
// that is unsupported.
+ // To avoid dead stripping, you may need to define this function with
+ // __attribute__((used))
int __lsan_is_turned_off();
// This function may be optionally provided by the user and should return