[llvm] r312914 - [TableGen] Ensure that __lsan_is_turned_off isn't removed by DCE in llvm-tblgen
Francis Ricci via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 11 06:50:39 PDT 2017
Author: fjricci
Date: Mon Sep 11 06:50:39 2017
New Revision: 312914
URL: http://llvm.org/viewvc/llvm-project?rev=312914&view=rev
Log:
[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
Modified:
llvm/trunk/utils/TableGen/TableGen.cpp
Modified: llvm/trunk/utils/TableGen/TableGen.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/TableGen.cpp?rev=312914&r1=312913&r2=312914&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/TableGen.cpp (original)
+++ llvm/trunk/utils/TableGen/TableGen.cpp Mon Sep 11 06:50:39 2017
@@ -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)
More information about the llvm-commits
mailing list