Adds ABSL_CONST_INIT to initializing declarations where it is missing

Fixes #1159

PiperOrigin-RevId: 444278141
Change-Id: Iae055fe78b438c31150a9e7601b734f4981f002e
pull/1163/head
Derek Mauro 3 years ago committed by Copybara-Service
parent 189074734a
commit 731689ffc2
  1. 1
      absl/base/internal/thread_identity.cc
  2. 2
      absl/base/log_severity.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__)

@ -16,6 +16,8 @@
#include <ostream>
#include "absl/base/attributes.h"
namespace absl {
ABSL_NAMESPACE_BEGIN

Loading…
Cancel
Save