summaryrefslogtreecommitdiff
path: root/absl/base
diff options
context:
space:
mode:
authorGravatar Abseil Team <absl-team@google.com>2022-01-21 12:05:00 -0800
committerGravatar dinord <dino.radakovich@gmail.com>2022-01-22 01:11:16 -0500
commitb2c96417bd5c2b0a550611e503002a4594a932b2 (patch)
tree8f845577ccd37bc7a4d874cac371fbd41a0da98f /absl/base
parentfbbb5865a562c9a9167d71c1cf56b82025a8f065 (diff)
Export of internal Abseil changes
-- 75504b9d2eb7560359b98b69136d071f980e04f2 by Abseil Team <absl-team@google.com>: Fix typos in documentation. PiperOrigin-RevId: 423376798 -- bf87e5de48a868f49a57d516be027e6e3a3cc3bd by Gennadiy Rozental <rogeeff@google.com>: Correct WEAK attribute enabling condition. ABSL_ATTRIBUTE_WEAK is present if: compiler has built-in attribute weak OR we are using gcc (and not clang) AND we are not on windows OR we use windows clang version >= 9.0.0 AND we are not on MinGW PiperOrigin-RevId: 423357629 -- a01a8f1b7ea3da4ec349db452162a3333953dd9d by Abseil Team <absl-team@google.com>: There are magic numbers in the expected load factors and probe lengths, and they seem to be wrong especially under msvc. Even under the linux tool chain, these tests fail occasionally. Fix the magic numbers to make the tests succeed. PiperOrigin-RevId: 423320829 -- fd109295a1425ca1cb2b69fe34a294b6189542c0 by Laramie Leavitt <lar@google.com>: Manually align buffers in randen_engine. In C++ it's implementation defined whether types with extended alignment are supported. randen_engine uses vector intrinsics with 16-byte alignment requirements in some instances, so internally we allocate an extra 8 bytes to manually align to 16. No detectable performance impact. PiperOrigin-RevId: 423109265 GitOrigin-RevId: 75504b9d2eb7560359b98b69136d071f980e04f2 Change-Id: I8c5ab2269ff6d9e89d3b4d0e95d36ddb6ce8096e
Diffstat (limited to 'absl/base')
-rw-r--r--absl/base/attributes.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/absl/base/attributes.h b/absl/base/attributes.h
index 00aad489..4ab6fa27 100644
--- a/absl/base/attributes.h
+++ b/absl/base/attributes.h
@@ -136,9 +136,9 @@
// 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) || (defined(__clang__) && __clang_major__ < 9)) && \
+#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))
@@ -312,7 +312,6 @@
__attribute__((section(#name))) __attribute__((noinline))
#endif
-
// ABSL_ATTRIBUTE_SECTION_VARIABLE
//
// Tells the compiler/linker to put a given variable into a section and define
@@ -339,8 +338,8 @@
// a no-op on ELF but not on Mach-O.
//
#ifndef ABSL_DECLARE_ATTRIBUTE_SECTION_VARS
-#define ABSL_DECLARE_ATTRIBUTE_SECTION_VARS(name) \
- extern char __start_##name[] ABSL_ATTRIBUTE_WEAK; \
+#define ABSL_DECLARE_ATTRIBUTE_SECTION_VARS(name) \
+ extern char __start_##name[] ABSL_ATTRIBUTE_WEAK; \
extern char __stop_##name[] ABSL_ATTRIBUTE_WEAK
#endif
#ifndef ABSL_DEFINE_ATTRIBUTE_SECTION_VARS
@@ -503,7 +502,7 @@
#define ABSL_XRAY_NEVER_INSTRUMENT [[clang::xray_never_instrument]]
#if ABSL_HAVE_CPP_ATTRIBUTE(clang::xray_log_args)
#define ABSL_XRAY_LOG_ARGS(N) \
- [[clang::xray_always_instrument, clang::xray_log_args(N)]]
+ [[clang::xray_always_instrument, clang::xray_log_args(N)]]
#else
#define ABSL_XRAY_LOG_ARGS(N) [[clang::xray_always_instrument]]
#endif