summaryrefslogtreecommitdiff
path: root/absl/base
diff options
context:
space:
mode:
authorGravatar Abseil Team <absl-team@google.com>2021-09-02 11:09:51 -0700
committerGravatar vslashg <gfalcon@google.com>2021-09-03 14:22:32 -0400
commit6039dd95bb62e6072731929279e917c7be39369f (patch)
tree5783b6e72ac4a107ca702da4d7a87f4be5765512 /absl/base
parent4bb9e39c88854dbf466688177257d11810719853 (diff)
Export of internal Abseil changes
-- 7507caf944f8eb98e55730e60e77f9060c572788 by Derek Mauro <dmauro@google.com>: Remove RunningOnValgrind() and ValgrindSlowdown() from dynamic_annotations.h These are defined by some sanitizer implementations and possibly Valgrind. Abseil decided to define them when the implementation was unavailable so that they could be unconditionally called, but we now consider this a mistake. Other libraries, including Python, have copied this method, leading to multiple definitions when these libraries are used together. In the unlikely case that code is using Abseil's definition, it is recommended that the call be guarded instead: ``` #if __has_feature(thread_sanitizer) extern "C" int RunningOnValgrind(); if (RunningOnValgrind()) ... #endif ``` Fixes #1011 PiperOrigin-RevId: 394501460 GitOrigin-RevId: 7507caf944f8eb98e55730e60e77f9060c572788 Change-Id: I5ddaf9a590c857d645461352a0f6fbccbb3d5584
Diffstat (limited to 'absl/base')
-rw-r--r--absl/base/dynamic_annotations.h25
1 files changed, 0 insertions, 25 deletions
diff --git a/absl/base/dynamic_annotations.h b/absl/base/dynamic_annotations.h
index 03d7096b..3ea7c156 100644
--- a/absl/base/dynamic_annotations.h
+++ b/absl/base/dynamic_annotations.h
@@ -433,31 +433,6 @@ ABSL_NAMESPACE_END
#endif
-#ifdef __cplusplus
-#ifdef ABSL_HAVE_THREAD_SANITIZER
-ABSL_INTERNAL_BEGIN_EXTERN_C
-int RunningOnValgrind();
-double ValgrindSlowdown();
-ABSL_INTERNAL_END_EXTERN_C
-#else
-namespace absl {
-ABSL_NAMESPACE_BEGIN
-namespace base_internal {
-ABSL_DEPRECATED(
- "Don't use this interface. It is misleading and is being deleted.")
-ABSL_ATTRIBUTE_ALWAYS_INLINE inline int RunningOnValgrind() { return 0; }
-ABSL_DEPRECATED(
- "Don't use this interface. It is misleading and is being deleted.")
-ABSL_ATTRIBUTE_ALWAYS_INLINE inline double ValgrindSlowdown() { return 1.0; }
-} // namespace base_internal
-ABSL_NAMESPACE_END
-} // namespace absl
-
-using absl::base_internal::RunningOnValgrind;
-using absl::base_internal::ValgrindSlowdown;
-#endif
-#endif
-
// -------------------------------------------------------------------------
// Address sanitizer annotations