summaryrefslogtreecommitdiff
path: root/absl/debugging/leak_check.cc
diff options
context:
space:
mode:
Diffstat (limited to 'absl/debugging/leak_check.cc')
-rw-r--r--absl/debugging/leak_check.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/absl/debugging/leak_check.cc b/absl/debugging/leak_check.cc
index e01e5f8c..7eaaf495 100644
--- a/absl/debugging/leak_check.cc
+++ b/absl/debugging/leak_check.cc
@@ -20,12 +20,14 @@
#ifndef LEAK_SANITIZER
namespace absl {
+inline namespace lts_2018_06_20 {
bool HaveLeakSanitizer() { return false; }
void DoIgnoreLeak(const void*) { }
void RegisterLivePointers(const void*, size_t) { }
void UnRegisterLivePointers(const void*, size_t) { }
LeakCheckDisabler::LeakCheckDisabler() { }
LeakCheckDisabler::~LeakCheckDisabler() { }
+} // inline namespace lts_2018_06_20
} // namespace absl
#else
@@ -33,6 +35,7 @@ LeakCheckDisabler::~LeakCheckDisabler() { }
#include <sanitizer/lsan_interface.h>
namespace absl {
+inline namespace lts_2018_06_20 {
bool HaveLeakSanitizer() { return true; }
void DoIgnoreLeak(const void* ptr) { __lsan_ignore_object(ptr); }
void RegisterLivePointers(const void* ptr, size_t size) {
@@ -43,6 +46,7 @@ void UnRegisterLivePointers(const void* ptr, size_t size) {
}
LeakCheckDisabler::LeakCheckDisabler() { __lsan_disable(); }
LeakCheckDisabler::~LeakCheckDisabler() { __lsan_enable(); }
+} // inline namespace lts_2018_06_20
} // namespace absl
#endif // LEAK_SANITIZER