[PATCH] D67908: [tblgen] Disable Leak detection for ASan/GCC and LSan/LLVM
Phabricator via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 24 04:23:41 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL372731: [tblgen] Disable Leak detection for ASan/GCC and LSan/LLVM (authored by kamil, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D67908?vs=221289&id=221507#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67908/new/
https://reviews.llvm.org/D67908
Files:
llvm/trunk/utils/TableGen/TableGen.cpp
Index: llvm/trunk/utils/TableGen/TableGen.cpp
===================================================================
--- llvm/trunk/utils/TableGen/TableGen.cpp
+++ llvm/trunk/utils/TableGen/TableGen.cpp
@@ -263,11 +263,16 @@
return TableGenMain(argv[0], &LLVMTableGenMain);
}
-#ifdef __has_feature
-#if __has_feature(address_sanitizer)
+#ifndef __has_feature
+#define __has_feature(x) 0
+#endif
+
+#if __has_feature(address_sanitizer) || defined(__SANITIZE_ADDRESS__) || \
+ __has_feature(leak_sanitizer)
+
#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 .
LLVM_ATTRIBUTE_USED int __lsan_is_turned_off() { return 1; }
-#endif // __has_feature(address_sanitizer)
-#endif // defined(__has_feature)
+
+#endif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67908.221507.patch
Type: text/x-patch
Size: 872 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190924/d5e79a18/attachment.bin>
More information about the llvm-commits
mailing list