]> granicus.if.org Git - clang/commitdiff
Disable LeakSanitizer in TableGen binaries, see PR18325
authorKostya Serebryany <kcc@google.com>
Thu, 9 Jan 2014 09:26:26 +0000 (09:26 +0000)
committerKostya Serebryany <kcc@google.com>
Thu, 9 Jan 2014 09:26:26 +0000 (09:26 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198858 91177308-0d34-0410-b5e6-96231b3b80d8

utils/TableGen/TableGen.cpp

index e0cd027e736be9c317efd925e2f32599a1536b64..0b60897cd3c4bceea1f213329cb9bef41ee971ea 100644 (file)
@@ -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"