diff options
author | Marek Gilbert <mcg@google.com> | 2018-04-15 16:47:04 -0700 |
---|---|---|
committer | Marek Gilbert <mcg@google.com> | 2018-04-15 16:47:04 -0700 |
commit | fdaf3cfa3c19c26b6764e78202877035011f8e81 (patch) | |
tree | 58b0a2f221932dbcb6b759b898863cc888ca825a /Firestore/third_party/abseil-cpp/absl/base/attributes.h | |
parent | 5368c9e22f9a6b427466e9422645d688953013c0 (diff) | |
parent | dfb5c04cf87fdff3c7fc16f9de3a2e8e1f4df265 (diff) |
Merge branch 'abseil-update' into abseil-merge
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) |