From 1fdbe1ea1b8c835c11ed6fbec4d4259ad104f765 Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Tue, 23 Mar 2021 15:07:11 -0700 Subject: Export of internal Abseil changes -- 4b566a7deeba5db473c83f4924c1d182a002779f by Abseil Team : Add absl::LeakCheckerIsActive to check whether a leak checker is built into the target and enabled. For LeakSanitizer, it is by default enabled unless __lsan_is_turned_off() is defined and returns true. PiperOrigin-RevId: 364654465 -- 0a56ff5310b66f9d1ff5e5e2a053335ecfb5c75b by Abseil Team : Update absl::FromTM documentation to reflect implementation. PiperOrigin-RevId: 364388743 GitOrigin-RevId: 4b566a7deeba5db473c83f4924c1d182a002779f Change-Id: I8df35b761b532e79d620f484153083c3499ef55b --- absl/debugging/leak_check.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'absl/debugging/leak_check.h') diff --git a/absl/debugging/leak_check.h b/absl/debugging/leak_check.h index 61c3216f..5fc2b052 100644 --- a/absl/debugging/leak_check.h +++ b/absl/debugging/leak_check.h @@ -43,6 +43,12 @@ ABSL_NAMESPACE_BEGIN // currently built into this target. bool HaveLeakSanitizer(); +// LeakCheckerIsActive() +// +// Returns true if a leak-checking sanitizer (either ASan or standalone LSan) is +// currently built into this target and is turned on. +bool LeakCheckerIsActive(); + // DoIgnoreLeak() // // Implements `IgnoreLeak()` below. This function should usually -- cgit v1.2.3