summaryrefslogtreecommitdiff
path: root/absl/base
diff options
context:
space:
mode:
authorGravatar Derek Mauro <dmauro@google.com>2022-04-25 08:40:42 -0700
committerGravatar Copybara-Service <copybara-worker@google.com>2022-04-25 08:41:33 -0700
commit731689ffc2ad7bb95cc86b5b6160dbe7858f27a0 (patch)
tree6d7c44c1f4532059c1d60b919c70b91457d80361 /absl/base
parent189074734aa1cf774ba2f6956b90f3f6e5680e8e (diff)
Adds ABSL_CONST_INIT to initializing declarations where it is missing
Fixes #1159 PiperOrigin-RevId: 444278141 Change-Id: Iae055fe78b438c31150a9e7601b734f4981f002e
Diffstat (limited to 'absl/base')
-rw-r--r--absl/base/internal/thread_identity.cc1
-rw-r--r--absl/base/log_severity.cc2
2 files changed, 3 insertions, 0 deletions
diff --git a/absl/base/internal/thread_identity.cc b/absl/base/internal/thread_identity.cc
index 9950e63a..db46aafb 100644
--- a/absl/base/internal/thread_identity.cc
+++ b/absl/base/internal/thread_identity.cc
@@ -56,6 +56,7 @@ void AllocateThreadIdentityKey(ThreadIdentityReclaimerFunction reclaimer) {
// *different* instances of this ptr.
// Apple platforms have the visibility attribute, but issue a compile warning
// that protected visibility is unsupported.
+ABSL_CONST_INIT // Must come before __attribute__((visibility("protected")))
#if ABSL_HAVE_ATTRIBUTE(visibility) && !defined(__APPLE__)
__attribute__((visibility("protected")))
#endif // ABSL_HAVE_ATTRIBUTE(visibility) && !defined(__APPLE__)
diff --git a/absl/base/log_severity.cc b/absl/base/log_severity.cc
index de26b06e..60a8fc1f 100644
--- a/absl/base/log_severity.cc
+++ b/absl/base/log_severity.cc
@@ -16,6 +16,8 @@
#include <ostream>
+#include "absl/base/attributes.h"
+
namespace absl {
ABSL_NAMESPACE_BEGIN