diff options
author | Kostya Serebryany <kcc@google.com> | 2014-01-15 07:59:37 +0000 |
---|---|---|
committer | Kostya Serebryany <kcc@google.com> | 2014-01-15 07:59:37 +0000 |
commit | 3846ce9490bce00573bc6a4ecc7811405cd2bbe8 (patch) | |
tree | 489abe3c2ee26d6cef4dc71938cd41348aabf194 /utils/TableGen/TableGen.cpp | |
parent | a1bcd56f68c6cc0ccea395d3d960d13b81bcc7d9 (diff) |
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/llvm/trunk@199303 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/TableGen.cpp')
-rw-r--r-- | utils/TableGen/TableGen.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/utils/TableGen/TableGen.cpp b/utils/TableGen/TableGen.cpp index 669127c3b0..00c3a6fd91 100644 --- a/utils/TableGen/TableGen.cpp +++ b/utils/TableGen/TableGen.cpp @@ -181,9 +181,11 @@ int main(int argc, char **argv) { return TableGenMain(argv[0], &LLVMTableGenMain); } -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) |