Skip to content
Snippets Groups Projects
Commit 2ae28d12 authored by Kostya Serebryany's avatar Kostya Serebryany
Browse files

replace LeakSanitizerIsTurnedOffForTheCurrentProcess with...

replace LeakSanitizerIsTurnedOffForTheCurrentProcess with __lsan_is_turned_off, but this time hide it under __has_feature(address_sanitizer); also include <sanitizer/lsan_interface.h>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199303 91177308-0d34-0410-b5e6-96231b3b80d8
parent 41afb42c
No related branches found
No related tags found
No related merge requests found
......@@ -264,9 +264,11 @@ int main(int argc, char **argv) {
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)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment