summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/utils/TableGen/TableGen.cpp7
-rw-r--r--llvm/utils/TableGen/TableGen.cpp7
2 files changed, 14 insertions, 0 deletions
diff --git a/clang/utils/TableGen/TableGen.cpp b/clang/utils/TableGen/TableGen.cpp
index e0cd027e736..0b60897cd3c 100644
--- a/clang/utils/TableGen/TableGen.cpp
+++ b/clang/utils/TableGen/TableGen.cpp
@@ -255,3 +255,10 @@ int main(int argc, char **argv) {
return TableGenMain(argv[0], &ClangTableGenMain);
}
+
+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"
diff --git a/llvm/utils/TableGen/TableGen.cpp b/llvm/utils/TableGen/TableGen.cpp
index b5c3ca760db..6db54a9006d 100644
--- a/llvm/utils/TableGen/TableGen.cpp
+++ b/llvm/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"
OpenPOWER on IntegriCloud