]> granicus.if.org Git - clang/commitdiff
reapply r198858: Disable LeakSanitizer in TableGen binaries, see PR18325; this time...
authorKostya Serebryany <kcc@google.com>
Fri, 10 Jan 2014 08:05:42 +0000 (08:05 +0000)
committerKostya Serebryany <kcc@google.com>
Fri, 10 Jan 2014 08:05:42 +0000 (08:05 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198922 91177308-0d34-0410-b5e6-96231b3b80d8

utils/TableGen/TableGen.cpp

index 4e7624db151928c9d066dd5962ce2ea8871739d6..1d677e7a2a10c172f579f0f3ea0cce46443ac5c2 100644 (file)
@@ -263,3 +263,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. LeakSanitizerIsTurnedOffForTheCurrentProcess is
+// explained in compiler-rt/include/sanitizer/lsan_interface.h
+int LeakSanitizerIsTurnedOffForTheCurrentProcess() { return 1; }
+} // extern "C"