[compiler-rt] r270038 - [asan] Change preprocessor `#if` to regular `if` for CAN_SANITIZE_LEAKS
Kuba Brecka via llvm-commits
llvm-commits at lists.llvm.org
Thu May 19 03:44:51 PDT 2016
Author: kuba.brecka
Date: Thu May 19 05:43:51 2016
New Revision: 270038
URL: http://llvm.org/viewvc/llvm-project?rev=270038&view=rev
Log:
[asan] Change preprocessor `#if` to regular `if` for CAN_SANITIZE_LEAKS
Modified:
compiler-rt/trunk/lib/asan/asan_rtl.cc
Modified: compiler-rt/trunk/lib/asan/asan_rtl.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_rtl.cc?rev=270038&r1=270037&r2=270038&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_rtl.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_rtl.cc Thu May 19 05:43:51 2016
@@ -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;
-#endif
+ Symbolizer::LateInitialize();
+ } else {
Symbolizer::LateInitialize();
}
More information about the llvm-commits
mailing list