diff options
| author | Kuba Brecka <kuba.brecka@gmail.com> | 2016-05-19 11:21:34 +0000 |
|---|---|---|
| committer | Kuba Brecka <kuba.brecka@gmail.com> | 2016-05-19 11:21:34 +0000 |
| commit | 4087675948c345eefff3ff67175cb0bd4786bd00 (patch) | |
| tree | 209c85310f2a0bcb29a85ea27913943f216a6aec | |
| parent | 97728dfb3944c155aaf92e38102115c9d2ec61fa (diff) | |
| download | llvm-4087675948c345eefff3ff67175cb0bd4786bd00.zip llvm-4087675948c345eefff3ff67175cb0bd4786bd00.tar.gz llvm-4087675948c345eefff3ff67175cb0bd4786bd00.tar.bz2 | |
Revert r270038 ("Change preprocessor `#if` to regular `if` for CAN_SANITIZE_LEAKS")
llvm-svn: 270044
| -rw-r--r-- | compiler-rt/lib/asan/asan_rtl.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/compiler-rt/lib/asan/asan_rtl.cc b/compiler-rt/lib/asan/asan_rtl.cc index 1444850..b289b55 100644 --- a/compiler-rt/lib/asan/asan_rtl.cc +++ b/compiler-rt/lib/asan/asan_rtl.cc @@ -540,12 +540,12 @@ static void AsanInitInternal() { force_interface_symbols(); // no-op. SanitizerInitializeUnwinder(); - if (CAN_SANITIZE_LEAKS) { - __lsan::InitCommonLsan(); - if (common_flags()->detect_leaks && common_flags()->leak_check_at_exit) { - Atexit(__lsan::DoLeakCheck); - } +#if CAN_SANITIZE_LEAKS + __lsan::InitCommonLsan(); + if (common_flags()->detect_leaks && common_flags()->leak_check_at_exit) { + Atexit(__lsan::DoLeakCheck); } +#endif // CAN_SANITIZE_LEAKS #if CAN_SANITIZE_UB __ubsan::InitAsPlugin(); @@ -553,12 +553,12 @@ static void AsanInitInternal() { InitializeSuppressions(); - if (CAN_SANITIZE_LEAKS) { + { +#if CAN_SANITIZE_LEAKS // LateInitialize() calls dlsym, which can allocate an error string buffer // in the TLS. Let's ignore the allocation to avoid reporting a leak. __lsan::ScopedInterceptorDisabler disabler; - Symbolizer::LateInitialize(); - } else { +#endif Symbolizer::LateInitialize(); } |
