return TableGenMain(argv[0], &ClangTableGenMain);
}
-extern "C" {
+#ifdef __has_feature
+#if __has_feature(address_sanitizer)
+#include <sanitizer/lsan_interface.h>
// 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"
+// very interesting to fix. See compiler-rt/include/sanitizer/lsan_interface.h .
+int __lsan_is_turned_off() { return 1; }
+#endif // __has_feature(address_sanitizer)
+#endif // defined(__has_feature)