summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorFrancis Ricci <francisjricci@gmail.com>2017-09-11 13:50:39 +0000
committerFrancis Ricci <francisjricci@gmail.com>2017-09-11 13:50:39 +0000
commit8a1c2b41e9e1cae05ea84c442708fe5695e6a5de (patch)
treeb496ce67b76c3979e5be96470e5b9f59556388d3 /llvm
parentfa877fd464c9175144be122403b69d20b9556073 (diff)
downloadbcm5719-llvm-8a1c2b41e9e1cae05ea84c442708fe5695e6a5de.tar.gz
bcm5719-llvm-8a1c2b41e9e1cae05ea84c442708fe5695e6a5de.zip
[TableGen] Ensure that __lsan_is_turned_off isn't removed by DCE in llvm-tblgen
Summary: Since asan is linked dynamically on Darwin, the weak interface symbol is removed by -Wl,-dead_strip. Reviewers: kcc, compnerd, aaron.ballman Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D37636 llvm-svn: 312914
Diffstat (limited to 'llvm')
-rw-r--r--llvm/utils/TableGen/TableGen.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/utils/TableGen/TableGen.cpp b/llvm/utils/TableGen/TableGen.cpp
index 00d20f1df6c..a0261c22d64 100644
--- a/llvm/utils/TableGen/TableGen.cpp
+++ b/llvm/utils/TableGen/TableGen.cpp
@@ -217,6 +217,6 @@ int main(int argc, char **argv) {
#include <sanitizer/lsan_interface.h>
// Disable LeakSanitizer for this binary as it has too many leaks that are not
// very interesting to fix. See compiler-rt/include/sanitizer/lsan_interface.h .
-int __lsan_is_turned_off() { return 1; }
+LLVM_ATTRIBUTE_USED int __lsan_is_turned_off() { return 1; }
#endif // __has_feature(address_sanitizer)
#endif // defined(__has_feature)
OpenPOWER on IntegriCloud