summaryrefslogtreecommitdiff
path: root/absl/debugging/leak_check.cc
diff options
context:
space:
mode:
authorGravatar Abseil Team <absl-team@google.com>2018-06-20 06:25:23 -0700
committerGravatar Shaindel Schwartz <shaindel@google.com>2018-06-20 10:15:31 -0400
commit6c7de165d1c82684359ccb630bb5f83263fa5ebc (patch)
treef271bc0005ad42773cc0140100699b8bfbaea124 /absl/debugging/leak_check.cc
parente5be80532b5d998813f9db952d2cc5401b1532df (diff)
Project import generated by Copybara.20180600
GitOrigin-RevId: d89dba27e35462d7457121b978fd79214205e686 Change-Id: I0eae80578a93a580820bc90d42e6b42faf7fde0a
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