aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKuba Brecka <kuba.brecka@gmail.com>2016-05-19 11:21:34 +0000
committerKuba Brecka <kuba.brecka@gmail.com>2016-05-19 11:21:34 +0000
commit4087675948c345eefff3ff67175cb0bd4786bd00 (patch)
tree209c85310f2a0bcb29a85ea27913943f216a6aec
parent97728dfb3944c155aaf92e38102115c9d2ec61fa (diff)
downloadllvm-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.cc16
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();
}