diff options
author | Marek Gilbert <mcg@google.com> | 2018-04-15 16:10:47 -0700 |
---|---|---|
committer | Marek Gilbert <mcg@google.com> | 2018-04-15 16:45:50 -0700 |
commit | dfb5c04cf87fdff3c7fc16f9de3a2e8e1f4df265 (patch) | |
tree | d82fcc92ef0ba74169ae7d889a5e17c0541b262f /Firestore/third_party/abseil-cpp/absl/base/attributes.h | |
parent | c1061b7362471ddb7cae26c430f8112b0b94bb83 (diff) |
Update abseil-cpp to a new upstream
Actually update to bf7fc9986e20f664958fc227547fd8d2fdcf863e
Change #754 didn't completely do this.
This makes the rest of the sources match optional, which was imported at
this change in #1083.
Also add:
absl/types/optional_test.cc
absl/types/CMakeLists.txt
absl/utility/CMakeLists.txt
Diffstat (limited to 'Firestore/third_party/abseil-cpp/absl/base/attributes.h')
-rw-r--r-- | Firestore/third_party/abseil-cpp/absl/base/attributes.h | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/Firestore/third_party/abseil-cpp/absl/base/attributes.h b/Firestore/third_party/abseil-cpp/absl/base/attributes.h index 4e1fc8b..a4ec7e7 100644 --- a/Firestore/third_party/abseil-cpp/absl/base/attributes.h +++ b/Firestore/third_party/abseil-cpp/absl/base/attributes.h @@ -527,17 +527,34 @@ #define ABSL_ATTRIBUTE_PACKED #endif +// ABSL_ATTRIBUTE_FUNC_ALIGN +// +// Tells the compiler to align the function start at least to certain +// alignment boundary +#if ABSL_HAVE_ATTRIBUTE(aligned) || (defined(__GNUC__) && !defined(__clang__)) +#define ABSL_ATTRIBUTE_FUNC_ALIGN(bytes) __attribute__((aligned(bytes))) +#else +#define ABSL_ATTRIBUTE_FUNC_ALIGN(bytes) +#endif + // ABSL_CONST_INIT // // A variable declaration annotated with the `ABSL_CONST_INIT` attribute will // not compile (on supported platforms) unless the variable has a constant // initializer. This is useful for variables with static and thread storage // duration, because it guarantees that they will not suffer from the so-called -// "static init order fiasco". +// "static init order fiasco". Prefer to put this attribute on the most visible +// declaration of the variable, if there's more than one, because code that +// accesses the variable can then use the attribute for optimization. // // Example: // -// ABSL_CONST_INIT static MyType my_var = MakeMyType(...); +// class MyClass { +// public: +// ABSL_CONST_INIT static MyType my_var; +// }; +// +// MyType MyClass::my_var = MakeMyType(...); // // Note that this attribute is redundant if the variable is declared constexpr. #if ABSL_HAVE_CPP_ATTRIBUTE(clang::require_constant_initialization) |