summaryrefslogtreecommitdiff
path: root/absl/base/attributes.h
diff options
context:
space:
mode:
authorGravatar Abseil Team <absl-team@google.com>2021-12-28 11:28:18 -0800
committerGravatar Derek Mauro <dmauro@google.com>2021-12-28 15:12:23 -0500
commit04610889a913d29037205ca72e9d7fd7acc925fe (patch)
treed59d9967aa219522ed58e39bc638ad2d21b2e321 /absl/base/attributes.h
parentd758735198573d04e3b01b8495a4bbdb1a0d5f90 (diff)
Export of internal Abseil changes
-- 3fad46c668edd864a62511f2a6875b8b79e38f34 by Evan Brown <ezb@google.com>: Use switches instead of lookup tables for zap_desig_waker and ignore_waiting_writers so that we can avoid dTLB misses. See, e.g., https://godbolt.org/z/a7Gb9vzzj. Also, now that these are functions, follow function style in naming and comments. PiperOrigin-RevId: 418654693 -- ba5107744023a4e9163a44d706fbe8e4a1bc0fd9 by Abseil Team <absl-team@google.com>: Check for Clang before attempting to expand __clang_major__. This avoids a warning about an undefined macro on Windows when compiling with MinGW-GCC. PiperOrigin-RevId: 418287329 GitOrigin-RevId: 3fad46c668edd864a62511f2a6875b8b79e38f34 Change-Id: I28104980c4d3b204537b248447a6bd1022c9ef5d
Diffstat (limited to 'absl/base/attributes.h')
-rw-r--r--absl/base/attributes.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/absl/base/attributes.h b/absl/base/attributes.h
index e3907827..f180cd77 100644
--- a/absl/base/attributes.h
+++ b/absl/base/attributes.h
@@ -136,9 +136,10 @@
// for further information.
// The MinGW compiler doesn't complain about the weak attribute until the link
// step, presumably because Windows doesn't use ELF binaries.
-#if (ABSL_HAVE_ATTRIBUTE(weak) || \
- (defined(__GNUC__) && !defined(__clang__))) && \
- (!defined(_WIN32) || __clang_major__ < 9) && !defined(__MINGW32__)
+#if (ABSL_HAVE_ATTRIBUTE(weak) || \
+ (defined(__GNUC__) && !defined(__clang__))) && \
+ (!defined(_WIN32) || (defined(__clang__) && __clang_major__ < 9)) && \
+ !defined(__MINGW32__)
#undef ABSL_ATTRIBUTE_WEAK
#define ABSL_ATTRIBUTE_WEAK __attribute__((weak))
#define ABSL_HAVE_ATTRIBUTE_WEAK 1