diff options
author | Francis Ricci <francisjricci@gmail.com> | 2017-09-08 19:43:53 +0000 |
---|---|---|
committer | Francis Ricci <francisjricci@gmail.com> | 2017-09-08 19:43:53 +0000 |
commit | 94345c67bd1cf0378cc8d6ae1764cc5b4578ca07 (patch) | |
tree | bb17e3a466cb0c5dcf811c20c35f930a4232edcb /test/lsan | |
parent | 3057bb94ded15a39001c6b7d4755f70a3f7ab1a8 (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
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@312824 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/lsan')
-rw-r--r-- | test/lsan/TestCases/link_turned_off.cc | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/test/lsan/TestCases/link_turned_off.cc b/test/lsan/TestCases/link_turned_off.cc index fd11272ce..245fd017b 100644 --- a/test/lsan/TestCases/link_turned_off.cc +++ b/test/lsan/TestCases/link_turned_off.cc @@ -3,15 +3,13 @@ // RUN: %clangxx_lsan %s -o %t // RUN: %env_lsan_opts=$LSAN_BASE %run %t // RUN: %env_lsan_opts=$LSAN_BASE not %run %t foo 2>&1 | FileCheck %s -// -// UNSUPPORTED: darwin #include <sanitizer/lsan_interface.h> int argc_copy; extern "C" { -int __lsan_is_turned_off() { +int __attribute__((used)) __lsan_is_turned_off() { return (argc_copy == 1); } } |