names.cc: Add missing constinit (#1359)
```
external/upb/upbc/names.cc:49:25: error: 'constinit' specifier missing on initializing declaration of 'kRepeatedFieldArrayGetterPostfix' [-Werror,-Wmissing-constinit]
const absl::string_view kRepeatedFieldArrayGetterPostfix = "upb_array";
^
ABSL_CONST_INIT
external/upb/upbc/names.h:64:1: note: variable declared constinit here
ABSL_CONST_INIT extern const absl::string_view kRepeatedFieldArrayGetterPostfix;
^
external/com_google_absl/absl/base/attributes.h:712:25: note: expanded from macro 'ABSL_CONST_INIT'
#define ABSL_CONST_INIT constinit
^
external/upb/upbc/names.cc:50:25: error: 'constinit' specifier missing on initializing declaration of 'kRepeatedFieldMutableArrayGetterPostfix' [-Werror,-Wmissing-constinit]
const absl::string_view kRepeatedFieldMutableArrayGetterPostfix =
^
ABSL_CONST_INIT
external/upb/upbc/names.h:65:1: note: variable declared constinit here
ABSL_CONST_INIT extern const absl::string_view
^
external/com_google_absl/absl/base/attributes.h:712:25: note: expanded from macro 'ABSL_CONST_INIT'
#define ABSL_CONST_INIT constinit
^
```
Closes #1359
COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/upb/pull/1359 from phallot:fix/missing-constinit 2029fef85ccf6dee5fcc2c9eea31dd38567fe893
PiperOrigin-RevId: 541940178
diff --git a/upbc/names.cc b/upbc/names.cc
index 4d49369..d61655a 100644
--- a/upbc/names.cc
+++ b/upbc/names.cc
@@ -46,9 +46,10 @@
static constexpr absl::string_view kAddToRepeatedMethodPrefix = "add_";
static constexpr absl::string_view kResizeArrayMethodPrefix = "resize_";
-const absl::string_view kRepeatedFieldArrayGetterPostfix = "upb_array";
-const absl::string_view kRepeatedFieldMutableArrayGetterPostfix =
- "mutable_upb_array";
+ABSL_CONST_INIT const absl::string_view kRepeatedFieldArrayGetterPostfix =
+ "upb_array";
+ABSL_CONST_INIT const absl::string_view
+ kRepeatedFieldMutableArrayGetterPostfix = "mutable_upb_array";
// List of generated accessor prefixes to check against.
// Example: