summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2014-01-09 09:26:26 +0000
committerKostya Serebryany <kcc@google.com>2014-01-09 09:26:26 +0000
commitc50299bab64d9232d992ec3c42b9d5ddf03e5001 (patch)
tree176f42614894a705d6ab8530f11e23ec469b4ae9
parent7b651ce261483d9360c2ac6a4879806ef2826c31 (diff)
downloadllvm-c50299bab64d9232d992ec3c42b9d5ddf03e5001.tar.gz
llvm-c50299bab64d9232d992ec3c42b9d5ddf03e5001.tar.bz2
llvm-c50299bab64d9232d992ec3c42b9d5ddf03e5001.tar.xz
Disable LeakSanitizer in TableGen binaries, see PR18325
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198858 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--utils/TableGen/TableGen.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/utils/TableGen/TableGen.cpp b/utils/TableGen/TableGen.cpp
index b5c3ca760d..6db54a9006 100644
--- a/utils/TableGen/TableGen.cpp
+++ b/utils/TableGen/TableGen.cpp
@@ -180,3 +180,10 @@ int main(int argc, char **argv) {
return TableGenMain(argv[0], &LLVMTableGenMain);
}
+
+extern "C" {
+// Disable LeakSanitizer for this binary as it has too many leaks that are not
+// very interesting to fix. __lsan_is_turned_off is explained in
+// compiler-rt/include/sanitizer/lsan_interface.h
+int __lsan_is_turned_off() { return 1; }
+} // extern "C"