Move `T::_class_data_` static class members out into namespace scope.

This will allow usage of these variables from `.proto.h` files where the dependency types are incomplete.
Improve `TypeId::Get` by using the trait instead of calling through the default. This reduces binary size and runtime costs.

PiperOrigin-RevId: 681604581
pull/18506/head
Protobuf Team Bot 6 months ago committed by Copybara-Service
parent 811cc30578
commit 3998aada39
  1. 7
      src/google/protobuf/compiler/cpp/file.cc
  2. 11
      src/google/protobuf/compiler/cpp/helpers.cc
  3. 3
      src/google/protobuf/compiler/cpp/helpers.h
  4. 128
      src/google/protobuf/compiler/cpp/message.cc
  5. 2
      src/google/protobuf/compiler/cpp/parse_function_generator.cc
  6. 58
      src/google/protobuf/compiler/java/java_features.pb.cc
  7. 6
      src/google/protobuf/compiler/java/java_features.pb.h
  8. 240
      src/google/protobuf/compiler/plugin.pb.cc
  9. 24
      src/google/protobuf/compiler/plugin.pb.h
  10. 58
      src/google/protobuf/cpp_features.pb.cc
  11. 6
      src/google/protobuf/cpp_features.pb.h
  12. 2108
      src/google/protobuf/descriptor.pb.cc
  13. 198
      src/google/protobuf/descriptor.pb.h
  14. 26
      src/google/protobuf/message_lite.h
  15. 9
      src/google/protobuf/message_unittest.inc

@ -1432,11 +1432,13 @@ class FileGenerator::ForwardDeclarations {
Sub("class", c.first).AnnotatedAs(desc),
{"default_type", DefaultInstanceType(desc, options)},
{"default_name", DefaultInstanceName(desc, options)},
{"classdata_type", ClassDataType(desc, options)},
},
R"cc(
class $class$;
struct $default_type$;
$dllexport_decl $extern $default_type$ $default_name$;
$dllexport_decl $extern const $pbi$::$classdata_type$ $class$_class_data_;
)cc");
}
@ -1484,8 +1486,9 @@ class FileGenerator::ForwardDeclarations {
if (options.dllexport_decl.empty()) {
p->Emit(R"cc(
template <>
internal::GeneratedMessageTraitsT<decltype($default_name$),
&$default_name$>
internal::GeneratedMessageTraitsT<
decltype($default_name$), &$default_name$,
decltype($class$_class_data_), &$class$_class_data_>
internal::MessageTraitsImpl::value<$class$>;
)cc");
}

@ -521,6 +521,17 @@ std::string QualifiedDefaultInstancePtr(const Descriptor* descriptor,
"ptr_");
}
std::string ClassDataType(const Descriptor* descriptor,
const Options& options) {
return HasDescriptorMethods(descriptor->file(), options) ||
// Boostrap protos are always full, even when lite is forced
// via options.
IsBootstrapProto(options, descriptor->file())
? "ClassDataFull"
: absl::StrFormat("ClassDataLite<%d>",
descriptor->full_name().size() + 1);
}
std::string DescriptorTableName(const FileDescriptor* file,
const Options& options) {
return UniqueName("descriptor_table", file, options);

@ -173,6 +173,9 @@ std::string QualifiedDefaultInstancePtr(const Descriptor* descriptor,
const Options& options,
bool split = false);
// Name of the ClassData subclass used for a message.
std::string ClassDataType(const Descriptor* descriptor, const Options& options);
// DescriptorTable variable name.
std::string DescriptorTableName(const FileDescriptor* file,
const Options& options);

@ -1392,6 +1392,8 @@ void MessageGenerator::GenerateMapEntryClassDefinition(io::Printer* p) {
$decl_verify_func$;
static constexpr auto InternalGenerateClassData_();
private:
friend class ::$proto_ns$::MessageLite;
friend struct ::$tablename$;
@ -1403,8 +1405,8 @@ void MessageGenerator::GenerateMapEntryClassDefinition(io::Printer* p) {
static void* PlacementNew_(const void*, void* mem,
::$proto_ns$::Arena* arena);
static constexpr auto InternalNewImpl_();
static const $pbi$::ClassDataFull _class_data_;
};
$dllexport_decl $extern const $pbi$::ClassDataFull $classname$_class_data_;
)cc");
}
@ -2042,11 +2044,7 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* p) {
)cc");
}},
{"decl_impl", [&] { GenerateImplDefinition(p); }},
{"classdata_type",
HasDescriptorMethods(descriptor_->file(), options_)
? "ClassDataFull"
: absl::StrFormat("ClassDataLite<%d>",
descriptor_->full_name().size() + 1)},
{"classdata_type", ClassDataType(descriptor_, options_)},
{"split_friend",
[&] {
if (!ShouldSplit(descriptor_, options_)) return;
@ -2174,9 +2172,14 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* p) {
static void* PlacementNew_(const void*, void* mem,
::$proto_ns$::Arena* arena);
static constexpr auto InternalNewImpl_();
static const $pbi$::$classdata_type$ _class_data_;
public:
//~ We need this in the public section to call it from the initializer
//~ of T_class_data_. However, since it is `constexpr` and has an
//~ `auto` return type it is not callable from outside the .pb.cc
//~ without a definition so it is effectively private.
static constexpr auto InternalGenerateClassData_();
$get_metadata$;
$decl_split_methods$;
// nested types ----------------------------------------------------
@ -2210,6 +2213,8 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* p) {
//~ order to construct the offsets of all members.
friend struct ::$tablename$;
};
$dllexport_decl $extern const $pbi$::$classdata_type$ $classname$_class_data_;
)cc");
} // NOLINT(readability/fn_size)
@ -2290,9 +2295,10 @@ void MessageGenerator::GenerateClassMethods(io::Printer* p) {
{"class_data", [&] { GenerateClassData(p); }}},
R"cc(
#if defined(PROTOBUF_CUSTOM_VTABLE)
$classname$::$classname$() : SuperType(_class_data_.base()) {}
$classname$::$classname$()
: SuperType($classname$_class_data_.base()) {}
$classname$::$classname$(::$proto_ns$::Arena* arena)
: SuperType(arena, _class_data_.base()) {}
: SuperType(arena, $classname$_class_data_.base()) {}
#else // PROTOBUF_CUSTOM_VTABLE
$classname$::$classname$() : SuperType() {}
$classname$::$classname$(::$proto_ns$::Arena* arena) : SuperType(arena) {}
@ -3007,7 +3013,7 @@ void MessageGenerator::GenerateConstexprConstructor(io::Printer* p) {
template <typename>
$constexpr$ $classname$::$classname$(::_pbi::ConstantInitialized)
#if defined(PROTOBUF_CUSTOM_VTABLE)
: $base$(_class_data_.base()){}
: $base$($classname$_class_data_.base()){}
#else // PROTOBUF_CUSTOM_VTABLE
: $base$() {
}
@ -3034,7 +3040,7 @@ void MessageGenerator::GenerateConstexprConstructor(io::Printer* p) {
template <typename>
$constexpr$ $classname$::$classname$(::_pbi::ConstantInitialized)
#if defined(PROTOBUF_CUSTOM_VTABLE)
: $superclass$(_class_data_.base()),
: $superclass$($classname$_class_data_.base()),
#else // PROTOBUF_CUSTOM_VTABLE
: $superclass$(),
#endif // PROTOBUF_CUSTOM_VTABLE
@ -3302,7 +3308,7 @@ void MessageGenerator::GenerateArenaEnabledCopyConstructor(io::Printer* p) {
//~ force alignment
const $classname$& from)
#if defined(PROTOBUF_CUSTOM_VTABLE)
: $superclass$(arena, _class_data_.base()) {
: $superclass$(arena, $classname$_class_data_.base()) {
#else // PROTOBUF_CUSTOM_VTABLE
: $superclass$(arena) {
#endif // PROTOBUF_CUSTOM_VTABLE
@ -3352,7 +3358,7 @@ void MessageGenerator::GenerateStructors(io::Printer* p) {
R"cc(
$classname$::$classname$(::$proto_ns$::Arena* arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
: $superclass$(arena, _class_data_.base()) {
: $superclass$(arena, $classname$_class_data_.base()) {
#else // PROTOBUF_CUSTOM_VTABLE
: $superclass$(arena) {
#endif // PROTOBUF_CUSTOM_VTABLE
@ -4050,33 +4056,39 @@ void MessageGenerator::GenerateClassData(io::Printer* p) {
}},
},
R"cc(
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const $pbi$::ClassDataFull $classname$::_class_data_ = {
$pbi$::ClassData{
$default_instance$,
&_table_.header,
$on_demand_register_arena_dtor$,
$is_initialized$,
&$classname$::MergeImpl,
$superclass$::GetNewImpl<$classname$>(),
constexpr auto $classname$::InternalGenerateClassData_() {
return $pbi$::ClassDataFull{
$pbi$::ClassData{
$default_instance$,
&_table_.header,
$on_demand_register_arena_dtor$,
$is_initialized$,
&$classname$::MergeImpl,
$superclass$::GetNewImpl<$classname$>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
&$classname$::SharedDtor,
$custom_vtable_methods$,
&$classname$::SharedDtor,
$custom_vtable_methods$,
#endif // PROTOBUF_CUSTOM_VTABLE
PROTOBUF_FIELD_OFFSET($classname$, $cached_size$),
false,
$v2_msg_table$,
},
&$classname$::kDescriptorMethods,
&$desc_table$,
$tracker_on_get_metadata$,
};
PROTOBUF_FIELD_OFFSET($classname$, $cached_size$),
false,
$v2_msg_table$,
},
&$classname$::kDescriptorMethods,
&$desc_table$,
$tracker_on_get_metadata$,
};
}
PROTOBUF_CONSTINIT$ dllexport_decl$
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const $pbi$::ClassDataFull
$classname$_class_data_ =
$classname$::InternalGenerateClassData_();
const $pbi$::ClassData* $classname$::GetClassData() const {
$pin_weak_descriptor$;
$pbi$::PrefetchToLocalCache(&_class_data_);
$pbi$::PrefetchToLocalCache(_class_data_.tc_table);
return _class_data_.base();
$pbi$::PrefetchToLocalCache(&$classname$_class_data_);
$pbi$::PrefetchToLocalCache($classname$_class_data_.tc_table);
return $classname$_class_data_.base();
}
)cc");
} else {
@ -4091,28 +4103,34 @@ void MessageGenerator::GenerateClassData(io::Printer* p) {
}},
},
R"cc(
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const $pbi$::ClassDataLite<$type_size$> $classname$::_class_data_ = {
{
$default_instance$,
&_table_.header,
$on_demand_register_arena_dtor$,
$is_initialized$,
&$classname$::MergeImpl,
$superclass$::GetNewImpl<$classname$>(),
constexpr auto $classname$::InternalGenerateClassData_() {
return $pbi$::ClassDataLite<$type_size$>{
{
$default_instance$,
&_table_.header,
$on_demand_register_arena_dtor$,
$is_initialized$,
&$classname$::MergeImpl,
$superclass$::GetNewImpl<$classname$>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
&$classname$::SharedDtor,
$custom_vtable_methods$,
&$classname$::SharedDtor,
$custom_vtable_methods$,
#endif // PROTOBUF_CUSTOM_VTABLE
PROTOBUF_FIELD_OFFSET($classname$, $cached_size$),
true,
$v2_msg_table$,
},
"$full_name$",
};
PROTOBUF_FIELD_OFFSET($classname$, $cached_size$),
true,
$v2_msg_table$,
},
"$full_name$",
};
}
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const $pbi$::ClassDataLite<$type_size$> $classname$_class_data_ =
$classname$::InternalGenerateClassData_();
const $pbi$::ClassData* $classname$::GetClassData() const {
return _class_data_.base();
return $classname$_class_data_.base();
}
)cc");
}

@ -313,7 +313,7 @@ void ParseFunctionGenerator::GenerateTailCallTable(io::Printer* printer) {
} else {
format("offsetof(decltype(_table_), aux_entries),\n");
}
format("_class_data_.base(),\n");
format("$classname$_class_data_.base(),\n");
if (NeedsPostLoopHandler(descriptor_, options_)) {
printer->Emit(R"cc(
&$classname$::PostLoopHandler,

@ -35,7 +35,7 @@ inline constexpr JavaFeatures::Impl_::Impl_(
template <typename>
PROTOBUF_CONSTEXPR JavaFeatures::JavaFeatures(::_pbi::ConstantInitialized)
#if defined(PROTOBUF_CUSTOM_VTABLE)
: ::google::protobuf::Message(_class_data_.base()),
: ::google::protobuf::Message(JavaFeatures_class_data_.base()),
#else // PROTOBUF_CUSTOM_VTABLE
: ::google::protobuf::Message(),
#endif // PROTOBUF_CUSTOM_VTABLE
@ -158,7 +158,7 @@ class JavaFeatures::_Internal {
JavaFeatures::JavaFeatures(::google::protobuf::Arena* arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
: ::google::protobuf::Message(arena, _class_data_.base()) {
: ::google::protobuf::Message(arena, JavaFeatures_class_data_.base()) {
#else // PROTOBUF_CUSTOM_VTABLE
: ::google::protobuf::Message(arena) {
#endif // PROTOBUF_CUSTOM_VTABLE
@ -203,32 +203,38 @@ constexpr auto JavaFeatures::InternalNewImpl_() {
return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(JavaFeatures),
alignof(JavaFeatures));
}
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataFull JavaFeatures::_class_data_ = {
::google::protobuf::internal::ClassData{
&_JavaFeatures_default_instance_._instance,
&_table_.header,
nullptr, // OnDemandRegisterArenaDtor
nullptr, // IsInitialized
&JavaFeatures::MergeImpl,
::google::protobuf::Message::GetNewImpl<JavaFeatures>(),
constexpr auto JavaFeatures::InternalGenerateClassData_() {
return ::google::protobuf::internal::ClassDataFull{
::google::protobuf::internal::ClassData{
&_JavaFeatures_default_instance_._instance,
&_table_.header,
nullptr, // OnDemandRegisterArenaDtor
nullptr, // IsInitialized
&JavaFeatures::MergeImpl,
::google::protobuf::Message::GetNewImpl<JavaFeatures>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
&JavaFeatures::SharedDtor,
::google::protobuf::Message::GetClearImpl<JavaFeatures>(), &JavaFeatures::ByteSizeLong,
&JavaFeatures::_InternalSerialize,
&JavaFeatures::SharedDtor,
::google::protobuf::Message::GetClearImpl<JavaFeatures>(), &JavaFeatures::ByteSizeLong,
&JavaFeatures::_InternalSerialize,
#endif // PROTOBUF_CUSTOM_VTABLE
PROTOBUF_FIELD_OFFSET(JavaFeatures, _impl_._cached_size_),
false,
},
&JavaFeatures::kDescriptorMethods,
&descriptor_table_google_2fprotobuf_2fcompiler_2fjava_2fjava_5ffeatures_2eproto,
nullptr, // tracker
};
PROTOBUF_FIELD_OFFSET(JavaFeatures, _impl_._cached_size_),
false,
},
&JavaFeatures::kDescriptorMethods,
&descriptor_table_google_2fprotobuf_2fcompiler_2fjava_2fjava_5ffeatures_2eproto,
nullptr, // tracker
};
}
PROTOBUF_CONSTINIT PROTOC_EXPORT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const ::google::protobuf::internal::ClassDataFull
JavaFeatures_class_data_ =
JavaFeatures::InternalGenerateClassData_();
const ::google::protobuf::internal::ClassData* JavaFeatures::GetClassData() const {
::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
return _class_data_.base();
::google::protobuf::internal::PrefetchToLocalCache(&JavaFeatures_class_data_);
::google::protobuf::internal::PrefetchToLocalCache(JavaFeatures_class_data_.tc_table);
return JavaFeatures_class_data_.base();
}
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::_pbi::TcParseTable<1, 2, 1, 0, 2> JavaFeatures::_table_ = {
@ -242,7 +248,7 @@ const ::_pbi::TcParseTable<1, 2, 1, 0, 2> JavaFeatures::_table_ = {
2, // num_field_entries
1, // num_aux_entries
offsetof(decltype(_table_), aux_entries),
_class_data_.base(),
JavaFeatures_class_data_.base(),
nullptr, // post_loop_handler
::_pbi::TcParser::GenericFallback, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE

@ -57,6 +57,7 @@ namespace pb {
class JavaFeatures;
struct JavaFeaturesDefaultTypeInternal;
PROTOC_EXPORT extern JavaFeaturesDefaultTypeInternal _JavaFeatures_default_instance_;
PROTOC_EXPORT extern const ::google::protobuf::internal::ClassDataFull JavaFeatures_class_data_;
} // namespace pb
namespace google {
namespace protobuf {
@ -239,9 +240,10 @@ class PROTOC_EXPORT JavaFeatures final
static void* PlacementNew_(const void*, void* mem,
::google::protobuf::Arena* arena);
static constexpr auto InternalNewImpl_();
static const ::google::protobuf::internal::ClassDataFull _class_data_;
public:
static constexpr auto InternalGenerateClassData_();
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
using Utf8Validation = JavaFeatures_Utf8Validation;
@ -325,6 +327,8 @@ class PROTOC_EXPORT JavaFeatures final
friend struct ::TableStruct_google_2fprotobuf_2fcompiler_2fjava_2fjava_5ffeatures_2eproto;
};
PROTOC_EXPORT extern const ::google::protobuf::internal::ClassDataFull JavaFeatures_class_data_;
// ===================================================================

@ -41,7 +41,7 @@ inline constexpr Version::Impl_::Impl_(
template <typename>
PROTOBUF_CONSTEXPR Version::Version(::_pbi::ConstantInitialized)
#if defined(PROTOBUF_CUSTOM_VTABLE)
: ::google::protobuf::Message(_class_data_.base()),
: ::google::protobuf::Message(Version_class_data_.base()),
#else // PROTOBUF_CUSTOM_VTABLE
: ::google::protobuf::Message(),
#endif // PROTOBUF_CUSTOM_VTABLE
@ -75,7 +75,7 @@ inline constexpr CodeGeneratorResponse_File::Impl_::Impl_(
template <typename>
PROTOBUF_CONSTEXPR CodeGeneratorResponse_File::CodeGeneratorResponse_File(::_pbi::ConstantInitialized)
#if defined(PROTOBUF_CUSTOM_VTABLE)
: ::google::protobuf::Message(_class_data_.base()),
: ::google::protobuf::Message(CodeGeneratorResponse_File_class_data_.base()),
#else // PROTOBUF_CUSTOM_VTABLE
: ::google::protobuf::Message(),
#endif // PROTOBUF_CUSTOM_VTABLE
@ -106,7 +106,7 @@ inline constexpr CodeGeneratorResponse::Impl_::Impl_(
template <typename>
PROTOBUF_CONSTEXPR CodeGeneratorResponse::CodeGeneratorResponse(::_pbi::ConstantInitialized)
#if defined(PROTOBUF_CUSTOM_VTABLE)
: ::google::protobuf::Message(_class_data_.base()),
: ::google::protobuf::Message(CodeGeneratorResponse_class_data_.base()),
#else // PROTOBUF_CUSTOM_VTABLE
: ::google::protobuf::Message(),
#endif // PROTOBUF_CUSTOM_VTABLE
@ -137,7 +137,7 @@ inline constexpr CodeGeneratorRequest::Impl_::Impl_(
template <typename>
PROTOBUF_CONSTEXPR CodeGeneratorRequest::CodeGeneratorRequest(::_pbi::ConstantInitialized)
#if defined(PROTOBUF_CUSTOM_VTABLE)
: ::google::protobuf::Message(_class_data_.base()),
: ::google::protobuf::Message(CodeGeneratorRequest_class_data_.base()),
#else // PROTOBUF_CUSTOM_VTABLE
: ::google::protobuf::Message(),
#endif // PROTOBUF_CUSTOM_VTABLE
@ -329,7 +329,7 @@ class Version::_Internal {
Version::Version(::google::protobuf::Arena* arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
: ::google::protobuf::Message(arena, _class_data_.base()) {
: ::google::protobuf::Message(arena, Version_class_data_.base()) {
#else // PROTOBUF_CUSTOM_VTABLE
: ::google::protobuf::Message(arena) {
#endif // PROTOBUF_CUSTOM_VTABLE
@ -347,7 +347,7 @@ Version::Version(
::google::protobuf::Arena* arena,
const Version& from)
#if defined(PROTOBUF_CUSTOM_VTABLE)
: ::google::protobuf::Message(arena, _class_data_.base()) {
: ::google::protobuf::Message(arena, Version_class_data_.base()) {
#else // PROTOBUF_CUSTOM_VTABLE
: ::google::protobuf::Message(arena) {
#endif // PROTOBUF_CUSTOM_VTABLE
@ -401,32 +401,38 @@ constexpr auto Version::InternalNewImpl_() {
return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(Version),
alignof(Version));
}
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataFull Version::_class_data_ = {
::google::protobuf::internal::ClassData{
&_Version_default_instance_._instance,
&_table_.header,
nullptr, // OnDemandRegisterArenaDtor
nullptr, // IsInitialized
&Version::MergeImpl,
::google::protobuf::Message::GetNewImpl<Version>(),
constexpr auto Version::InternalGenerateClassData_() {
return ::google::protobuf::internal::ClassDataFull{
::google::protobuf::internal::ClassData{
&_Version_default_instance_._instance,
&_table_.header,
nullptr, // OnDemandRegisterArenaDtor
nullptr, // IsInitialized
&Version::MergeImpl,
::google::protobuf::Message::GetNewImpl<Version>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
&Version::SharedDtor,
::google::protobuf::Message::GetClearImpl<Version>(), &Version::ByteSizeLong,
&Version::_InternalSerialize,
&Version::SharedDtor,
::google::protobuf::Message::GetClearImpl<Version>(), &Version::ByteSizeLong,
&Version::_InternalSerialize,
#endif // PROTOBUF_CUSTOM_VTABLE
PROTOBUF_FIELD_OFFSET(Version, _impl_._cached_size_),
false,
},
&Version::kDescriptorMethods,
&descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto,
nullptr, // tracker
};
PROTOBUF_FIELD_OFFSET(Version, _impl_._cached_size_),
false,
},
&Version::kDescriptorMethods,
&descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto,
nullptr, // tracker
};
}
PROTOBUF_CONSTINIT PROTOC_EXPORT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const ::google::protobuf::internal::ClassDataFull
Version_class_data_ =
Version::InternalGenerateClassData_();
const ::google::protobuf::internal::ClassData* Version::GetClassData() const {
::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
return _class_data_.base();
::google::protobuf::internal::PrefetchToLocalCache(&Version_class_data_);
::google::protobuf::internal::PrefetchToLocalCache(Version_class_data_.tc_table);
return Version_class_data_.base();
}
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::_pbi::TcParseTable<2, 4, 0, 47, 2> Version::_table_ = {
@ -440,7 +446,7 @@ const ::_pbi::TcParseTable<2, 4, 0, 47, 2> Version::_table_ = {
4, // num_field_entries
0, // num_aux_entries
offsetof(decltype(_table_), field_names), // no aux_entries
_class_data_.base(),
Version_class_data_.base(),
nullptr, // post_loop_handler
::_pbi::TcParser::GenericFallback, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
@ -672,7 +678,7 @@ void CodeGeneratorRequest::clear_source_file_descriptors() {
}
CodeGeneratorRequest::CodeGeneratorRequest(::google::protobuf::Arena* arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
: ::google::protobuf::Message(arena, _class_data_.base()) {
: ::google::protobuf::Message(arena, CodeGeneratorRequest_class_data_.base()) {
#else // PROTOBUF_CUSTOM_VTABLE
: ::google::protobuf::Message(arena) {
#endif // PROTOBUF_CUSTOM_VTABLE
@ -693,7 +699,7 @@ CodeGeneratorRequest::CodeGeneratorRequest(
::google::protobuf::Arena* arena,
const CodeGeneratorRequest& from)
#if defined(PROTOBUF_CUSTOM_VTABLE)
: ::google::protobuf::Message(arena, _class_data_.base()) {
: ::google::protobuf::Message(arena, CodeGeneratorRequest_class_data_.base()) {
#else // PROTOBUF_CUSTOM_VTABLE
: ::google::protobuf::Message(arena) {
#endif // PROTOBUF_CUSTOM_VTABLE
@ -763,32 +769,38 @@ constexpr auto CodeGeneratorRequest::InternalNewImpl_() {
alignof(CodeGeneratorRequest));
}
}
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataFull CodeGeneratorRequest::_class_data_ = {
::google::protobuf::internal::ClassData{
&_CodeGeneratorRequest_default_instance_._instance,
&_table_.header,
nullptr, // OnDemandRegisterArenaDtor
CodeGeneratorRequest::IsInitializedImpl,
&CodeGeneratorRequest::MergeImpl,
::google::protobuf::Message::GetNewImpl<CodeGeneratorRequest>(),
constexpr auto CodeGeneratorRequest::InternalGenerateClassData_() {
return ::google::protobuf::internal::ClassDataFull{
::google::protobuf::internal::ClassData{
&_CodeGeneratorRequest_default_instance_._instance,
&_table_.header,
nullptr, // OnDemandRegisterArenaDtor
CodeGeneratorRequest::IsInitializedImpl,
&CodeGeneratorRequest::MergeImpl,
::google::protobuf::Message::GetNewImpl<CodeGeneratorRequest>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
&CodeGeneratorRequest::SharedDtor,
::google::protobuf::Message::GetClearImpl<CodeGeneratorRequest>(), &CodeGeneratorRequest::ByteSizeLong,
&CodeGeneratorRequest::_InternalSerialize,
&CodeGeneratorRequest::SharedDtor,
::google::protobuf::Message::GetClearImpl<CodeGeneratorRequest>(), &CodeGeneratorRequest::ByteSizeLong,
&CodeGeneratorRequest::_InternalSerialize,
#endif // PROTOBUF_CUSTOM_VTABLE
PROTOBUF_FIELD_OFFSET(CodeGeneratorRequest, _impl_._cached_size_),
false,
},
&CodeGeneratorRequest::kDescriptorMethods,
&descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto,
nullptr, // tracker
};
PROTOBUF_FIELD_OFFSET(CodeGeneratorRequest, _impl_._cached_size_),
false,
},
&CodeGeneratorRequest::kDescriptorMethods,
&descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto,
nullptr, // tracker
};
}
PROTOBUF_CONSTINIT PROTOC_EXPORT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const ::google::protobuf::internal::ClassDataFull
CodeGeneratorRequest_class_data_ =
CodeGeneratorRequest::InternalGenerateClassData_();
const ::google::protobuf::internal::ClassData* CodeGeneratorRequest::GetClassData() const {
::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
return _class_data_.base();
::google::protobuf::internal::PrefetchToLocalCache(&CodeGeneratorRequest_class_data_);
::google::protobuf::internal::PrefetchToLocalCache(CodeGeneratorRequest_class_data_.tc_table);
return CodeGeneratorRequest_class_data_.base();
}
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::_pbi::TcParseTable<3, 5, 3, 79, 2> CodeGeneratorRequest::_table_ = {
@ -802,7 +814,7 @@ const ::_pbi::TcParseTable<3, 5, 3, 79, 2> CodeGeneratorRequest::_table_ = {
5, // num_field_entries
3, // num_aux_entries
offsetof(decltype(_table_), aux_entries),
_class_data_.base(),
CodeGeneratorRequest_class_data_.base(),
nullptr, // post_loop_handler
::_pbi::TcParser::GenericFallback, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
@ -1089,7 +1101,7 @@ void CodeGeneratorResponse_File::clear_generated_code_info() {
}
CodeGeneratorResponse_File::CodeGeneratorResponse_File(::google::protobuf::Arena* arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
: ::google::protobuf::Message(arena, _class_data_.base()) {
: ::google::protobuf::Message(arena, CodeGeneratorResponse_File_class_data_.base()) {
#else // PROTOBUF_CUSTOM_VTABLE
: ::google::protobuf::Message(arena) {
#endif // PROTOBUF_CUSTOM_VTABLE
@ -1109,7 +1121,7 @@ CodeGeneratorResponse_File::CodeGeneratorResponse_File(
::google::protobuf::Arena* arena,
const CodeGeneratorResponse_File& from)
#if defined(PROTOBUF_CUSTOM_VTABLE)
: ::google::protobuf::Message(arena, _class_data_.base()) {
: ::google::protobuf::Message(arena, CodeGeneratorResponse_File_class_data_.base()) {
#else // PROTOBUF_CUSTOM_VTABLE
: ::google::protobuf::Message(arena) {
#endif // PROTOBUF_CUSTOM_VTABLE
@ -1160,32 +1172,38 @@ constexpr auto CodeGeneratorResponse_File::InternalNewImpl_() {
return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(CodeGeneratorResponse_File),
alignof(CodeGeneratorResponse_File));
}
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataFull CodeGeneratorResponse_File::_class_data_ = {
::google::protobuf::internal::ClassData{
&_CodeGeneratorResponse_File_default_instance_._instance,
&_table_.header,
nullptr, // OnDemandRegisterArenaDtor
nullptr, // IsInitialized
&CodeGeneratorResponse_File::MergeImpl,
::google::protobuf::Message::GetNewImpl<CodeGeneratorResponse_File>(),
constexpr auto CodeGeneratorResponse_File::InternalGenerateClassData_() {
return ::google::protobuf::internal::ClassDataFull{
::google::protobuf::internal::ClassData{
&_CodeGeneratorResponse_File_default_instance_._instance,
&_table_.header,
nullptr, // OnDemandRegisterArenaDtor
nullptr, // IsInitialized
&CodeGeneratorResponse_File::MergeImpl,
::google::protobuf::Message::GetNewImpl<CodeGeneratorResponse_File>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
&CodeGeneratorResponse_File::SharedDtor,
::google::protobuf::Message::GetClearImpl<CodeGeneratorResponse_File>(), &CodeGeneratorResponse_File::ByteSizeLong,
&CodeGeneratorResponse_File::_InternalSerialize,
&CodeGeneratorResponse_File::SharedDtor,
::google::protobuf::Message::GetClearImpl<CodeGeneratorResponse_File>(), &CodeGeneratorResponse_File::ByteSizeLong,
&CodeGeneratorResponse_File::_InternalSerialize,
#endif // PROTOBUF_CUSTOM_VTABLE
PROTOBUF_FIELD_OFFSET(CodeGeneratorResponse_File, _impl_._cached_size_),
false,
},
&CodeGeneratorResponse_File::kDescriptorMethods,
&descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto,
nullptr, // tracker
};
PROTOBUF_FIELD_OFFSET(CodeGeneratorResponse_File, _impl_._cached_size_),
false,
},
&CodeGeneratorResponse_File::kDescriptorMethods,
&descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto,
nullptr, // tracker
};
}
PROTOBUF_CONSTINIT PROTOC_EXPORT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const ::google::protobuf::internal::ClassDataFull
CodeGeneratorResponse_File_class_data_ =
CodeGeneratorResponse_File::InternalGenerateClassData_();
const ::google::protobuf::internal::ClassData* CodeGeneratorResponse_File::GetClassData() const {
::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
return _class_data_.base();
::google::protobuf::internal::PrefetchToLocalCache(&CodeGeneratorResponse_File_class_data_);
::google::protobuf::internal::PrefetchToLocalCache(CodeGeneratorResponse_File_class_data_.tc_table);
return CodeGeneratorResponse_File_class_data_.base();
}
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::_pbi::TcParseTable<2, 4, 1, 86, 2> CodeGeneratorResponse_File::_table_ = {
@ -1199,7 +1217,7 @@ const ::_pbi::TcParseTable<2, 4, 1, 86, 2> CodeGeneratorResponse_File::_table_ =
4, // num_field_entries
1, // num_aux_entries
offsetof(decltype(_table_), aux_entries),
_class_data_.base(),
CodeGeneratorResponse_File_class_data_.base(),
nullptr, // post_loop_handler
::_pbi::TcParser::GenericFallback, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
@ -1438,7 +1456,7 @@ class CodeGeneratorResponse::_Internal {
CodeGeneratorResponse::CodeGeneratorResponse(::google::protobuf::Arena* arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
: ::google::protobuf::Message(arena, _class_data_.base()) {
: ::google::protobuf::Message(arena, CodeGeneratorResponse_class_data_.base()) {
#else // PROTOBUF_CUSTOM_VTABLE
: ::google::protobuf::Message(arena) {
#endif // PROTOBUF_CUSTOM_VTABLE
@ -1457,7 +1475,7 @@ CodeGeneratorResponse::CodeGeneratorResponse(
::google::protobuf::Arena* arena,
const CodeGeneratorResponse& from)
#if defined(PROTOBUF_CUSTOM_VTABLE)
: ::google::protobuf::Message(arena, _class_data_.base()) {
: ::google::protobuf::Message(arena, CodeGeneratorResponse_class_data_.base()) {
#else // PROTOBUF_CUSTOM_VTABLE
: ::google::protobuf::Message(arena) {
#endif // PROTOBUF_CUSTOM_VTABLE
@ -1524,32 +1542,38 @@ constexpr auto CodeGeneratorResponse::InternalNewImpl_() {
alignof(CodeGeneratorResponse));
}
}
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataFull CodeGeneratorResponse::_class_data_ = {
::google::protobuf::internal::ClassData{
&_CodeGeneratorResponse_default_instance_._instance,
&_table_.header,
nullptr, // OnDemandRegisterArenaDtor
nullptr, // IsInitialized
&CodeGeneratorResponse::MergeImpl,
::google::protobuf::Message::GetNewImpl<CodeGeneratorResponse>(),
constexpr auto CodeGeneratorResponse::InternalGenerateClassData_() {
return ::google::protobuf::internal::ClassDataFull{
::google::protobuf::internal::ClassData{
&_CodeGeneratorResponse_default_instance_._instance,
&_table_.header,
nullptr, // OnDemandRegisterArenaDtor
nullptr, // IsInitialized
&CodeGeneratorResponse::MergeImpl,
::google::protobuf::Message::GetNewImpl<CodeGeneratorResponse>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
&CodeGeneratorResponse::SharedDtor,
::google::protobuf::Message::GetClearImpl<CodeGeneratorResponse>(), &CodeGeneratorResponse::ByteSizeLong,
&CodeGeneratorResponse::_InternalSerialize,
&CodeGeneratorResponse::SharedDtor,
::google::protobuf::Message::GetClearImpl<CodeGeneratorResponse>(), &CodeGeneratorResponse::ByteSizeLong,
&CodeGeneratorResponse::_InternalSerialize,
#endif // PROTOBUF_CUSTOM_VTABLE
PROTOBUF_FIELD_OFFSET(CodeGeneratorResponse, _impl_._cached_size_),
false,
},
&CodeGeneratorResponse::kDescriptorMethods,
&descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto,
nullptr, // tracker
};
PROTOBUF_FIELD_OFFSET(CodeGeneratorResponse, _impl_._cached_size_),
false,
},
&CodeGeneratorResponse::kDescriptorMethods,
&descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto,
nullptr, // tracker
};
}
PROTOBUF_CONSTINIT PROTOC_EXPORT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const ::google::protobuf::internal::ClassDataFull
CodeGeneratorResponse_class_data_ =
CodeGeneratorResponse::InternalGenerateClassData_();
const ::google::protobuf::internal::ClassData* CodeGeneratorResponse::GetClassData() const {
::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
return _class_data_.base();
::google::protobuf::internal::PrefetchToLocalCache(&CodeGeneratorResponse_class_data_);
::google::protobuf::internal::PrefetchToLocalCache(CodeGeneratorResponse_class_data_.tc_table);
return CodeGeneratorResponse_class_data_.base();
}
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::_pbi::TcParseTable<3, 5, 1, 60, 2> CodeGeneratorResponse::_table_ = {
@ -1563,7 +1587,7 @@ const ::_pbi::TcParseTable<3, 5, 1, 60, 2> CodeGeneratorResponse::_table_ = {
5, // num_field_entries
1, // num_aux_entries
offsetof(decltype(_table_), aux_entries),
_class_data_.base(),
CodeGeneratorResponse_class_data_.base(),
nullptr, // post_loop_handler
::_pbi::TcParser::GenericFallback, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE

@ -65,15 +65,19 @@ namespace compiler {
class CodeGeneratorRequest;
struct CodeGeneratorRequestDefaultTypeInternal;
PROTOC_EXPORT extern CodeGeneratorRequestDefaultTypeInternal _CodeGeneratorRequest_default_instance_;
PROTOC_EXPORT extern const ::google::protobuf::internal::ClassDataFull CodeGeneratorRequest_class_data_;
class CodeGeneratorResponse;
struct CodeGeneratorResponseDefaultTypeInternal;
PROTOC_EXPORT extern CodeGeneratorResponseDefaultTypeInternal _CodeGeneratorResponse_default_instance_;
PROTOC_EXPORT extern const ::google::protobuf::internal::ClassDataFull CodeGeneratorResponse_class_data_;
class CodeGeneratorResponse_File;
struct CodeGeneratorResponse_FileDefaultTypeInternal;
PROTOC_EXPORT extern CodeGeneratorResponse_FileDefaultTypeInternal _CodeGeneratorResponse_File_default_instance_;
PROTOC_EXPORT extern const ::google::protobuf::internal::ClassDataFull CodeGeneratorResponse_File_class_data_;
class Version;
struct VersionDefaultTypeInternal;
PROTOC_EXPORT extern VersionDefaultTypeInternal _Version_default_instance_;
PROTOC_EXPORT extern const ::google::protobuf::internal::ClassDataFull Version_class_data_;
} // namespace compiler
} // namespace protobuf
} // namespace google
@ -256,9 +260,10 @@ class PROTOC_EXPORT Version final
static void* PlacementNew_(const void*, void* mem,
::google::protobuf::Arena* arena);
static constexpr auto InternalNewImpl_();
static const ::google::protobuf::internal::ClassDataFull _class_data_;
public:
static constexpr auto InternalGenerateClassData_();
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
@ -353,6 +358,8 @@ class PROTOC_EXPORT Version final
union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fcompiler_2fplugin_2eproto;
};
PROTOC_EXPORT extern const ::google::protobuf::internal::ClassDataFull Version_class_data_;
// -------------------------------------------------------------------
class PROTOC_EXPORT CodeGeneratorResponse_File final
@ -494,9 +501,10 @@ class PROTOC_EXPORT CodeGeneratorResponse_File final
static void* PlacementNew_(const void*, void* mem,
::google::protobuf::Arena* arena);
static constexpr auto InternalNewImpl_();
static const ::google::protobuf::internal::ClassDataFull _class_data_;
public:
static constexpr auto InternalGenerateClassData_();
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
@ -607,6 +615,8 @@ class PROTOC_EXPORT CodeGeneratorResponse_File final
union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fcompiler_2fplugin_2eproto;
};
PROTOC_EXPORT extern const ::google::protobuf::internal::ClassDataFull CodeGeneratorResponse_File_class_data_;
// -------------------------------------------------------------------
class PROTOC_EXPORT CodeGeneratorResponse final
@ -748,9 +758,10 @@ class PROTOC_EXPORT CodeGeneratorResponse final
static void* PlacementNew_(const void*, void* mem,
::google::protobuf::Arena* arena);
static constexpr auto InternalNewImpl_();
static const ::google::protobuf::internal::ClassDataFull _class_data_;
public:
static constexpr auto InternalGenerateClassData_();
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
using File = CodeGeneratorResponse_File;
@ -885,6 +896,8 @@ class PROTOC_EXPORT CodeGeneratorResponse final
union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fcompiler_2fplugin_2eproto;
};
PROTOC_EXPORT extern const ::google::protobuf::internal::ClassDataFull CodeGeneratorResponse_class_data_;
// -------------------------------------------------------------------
class PROTOC_EXPORT CodeGeneratorRequest final
@ -1031,9 +1044,10 @@ class PROTOC_EXPORT CodeGeneratorRequest final
static void* PlacementNew_(const void*, void* mem,
::google::protobuf::Arena* arena);
static constexpr auto InternalNewImpl_();
static const ::google::protobuf::internal::ClassDataFull _class_data_;
public:
static constexpr auto InternalGenerateClassData_();
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
@ -1169,6 +1183,8 @@ class PROTOC_EXPORT CodeGeneratorRequest final
friend struct ::TableStruct_google_2fprotobuf_2fcompiler_2fplugin_2eproto;
};
PROTOC_EXPORT extern const ::google::protobuf::internal::ClassDataFull CodeGeneratorRequest_class_data_;
// ===================================================================

@ -36,7 +36,7 @@ inline constexpr CppFeatures::Impl_::Impl_(
template <typename>
PROTOBUF_CONSTEXPR CppFeatures::CppFeatures(::_pbi::ConstantInitialized)
#if defined(PROTOBUF_CUSTOM_VTABLE)
: ::google::protobuf::Message(_class_data_.base()),
: ::google::protobuf::Message(CppFeatures_class_data_.base()),
#else // PROTOBUF_CUSTOM_VTABLE
: ::google::protobuf::Message(),
#endif // PROTOBUF_CUSTOM_VTABLE
@ -158,7 +158,7 @@ class CppFeatures::_Internal {
CppFeatures::CppFeatures(::google::protobuf::Arena* arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
: ::google::protobuf::Message(arena, _class_data_.base()) {
: ::google::protobuf::Message(arena, CppFeatures_class_data_.base()) {
#else // PROTOBUF_CUSTOM_VTABLE
: ::google::protobuf::Message(arena) {
#endif // PROTOBUF_CUSTOM_VTABLE
@ -203,32 +203,38 @@ constexpr auto CppFeatures::InternalNewImpl_() {
return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(CppFeatures),
alignof(CppFeatures));
}
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataFull CppFeatures::_class_data_ = {
::google::protobuf::internal::ClassData{
&_CppFeatures_default_instance_._instance,
&_table_.header,
nullptr, // OnDemandRegisterArenaDtor
nullptr, // IsInitialized
&CppFeatures::MergeImpl,
::google::protobuf::Message::GetNewImpl<CppFeatures>(),
constexpr auto CppFeatures::InternalGenerateClassData_() {
return ::google::protobuf::internal::ClassDataFull{
::google::protobuf::internal::ClassData{
&_CppFeatures_default_instance_._instance,
&_table_.header,
nullptr, // OnDemandRegisterArenaDtor
nullptr, // IsInitialized
&CppFeatures::MergeImpl,
::google::protobuf::Message::GetNewImpl<CppFeatures>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
&CppFeatures::SharedDtor,
::google::protobuf::Message::GetClearImpl<CppFeatures>(), &CppFeatures::ByteSizeLong,
&CppFeatures::_InternalSerialize,
&CppFeatures::SharedDtor,
::google::protobuf::Message::GetClearImpl<CppFeatures>(), &CppFeatures::ByteSizeLong,
&CppFeatures::_InternalSerialize,
#endif // PROTOBUF_CUSTOM_VTABLE
PROTOBUF_FIELD_OFFSET(CppFeatures, _impl_._cached_size_),
false,
},
&CppFeatures::kDescriptorMethods,
&descriptor_table_google_2fprotobuf_2fcpp_5ffeatures_2eproto,
nullptr, // tracker
};
PROTOBUF_FIELD_OFFSET(CppFeatures, _impl_._cached_size_),
false,
},
&CppFeatures::kDescriptorMethods,
&descriptor_table_google_2fprotobuf_2fcpp_5ffeatures_2eproto,
nullptr, // tracker
};
}
PROTOBUF_CONSTINIT PROTOBUF_EXPORT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const ::google::protobuf::internal::ClassDataFull
CppFeatures_class_data_ =
CppFeatures::InternalGenerateClassData_();
const ::google::protobuf::internal::ClassData* CppFeatures::GetClassData() const {
::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
return _class_data_.base();
::google::protobuf::internal::PrefetchToLocalCache(&CppFeatures_class_data_);
::google::protobuf::internal::PrefetchToLocalCache(CppFeatures_class_data_.tc_table);
return CppFeatures_class_data_.base();
}
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::_pbi::TcParseTable<2, 3, 1, 0, 2> CppFeatures::_table_ = {
@ -242,7 +248,7 @@ const ::_pbi::TcParseTable<2, 3, 1, 0, 2> CppFeatures::_table_ = {
3, // num_field_entries
1, // num_aux_entries
offsetof(decltype(_table_), aux_entries),
_class_data_.base(),
CppFeatures_class_data_.base(),
nullptr, // post_loop_handler
::_pbi::TcParser::GenericFallback, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE

@ -57,6 +57,7 @@ namespace pb {
class CppFeatures;
struct CppFeaturesDefaultTypeInternal;
PROTOBUF_EXPORT extern CppFeaturesDefaultTypeInternal _CppFeatures_default_instance_;
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull CppFeatures_class_data_;
} // namespace pb
namespace google {
namespace protobuf {
@ -240,9 +241,10 @@ class PROTOBUF_EXPORT CppFeatures final
static void* PlacementNew_(const void*, void* mem,
::google::protobuf::Arena* arena);
static constexpr auto InternalNewImpl_();
static const ::google::protobuf::internal::ClassDataFull _class_data_;
public:
static constexpr auto InternalGenerateClassData_();
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
using StringType = CppFeatures_StringType;
@ -340,6 +342,8 @@ class PROTOBUF_EXPORT CppFeatures final
friend struct ::TableStruct_google_2fprotobuf_2fcpp_5ffeatures_2eproto;
};
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull CppFeatures_class_data_;
// ===================================================================

File diff suppressed because it is too large Load Diff

@ -57,102 +57,135 @@ namespace protobuf {
class DescriptorProto;
struct DescriptorProtoDefaultTypeInternal;
PROTOBUF_EXPORT extern DescriptorProtoDefaultTypeInternal _DescriptorProto_default_instance_;
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull DescriptorProto_class_data_;
class DescriptorProto_ExtensionRange;
struct DescriptorProto_ExtensionRangeDefaultTypeInternal;
PROTOBUF_EXPORT extern DescriptorProto_ExtensionRangeDefaultTypeInternal _DescriptorProto_ExtensionRange_default_instance_;
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull DescriptorProto_ExtensionRange_class_data_;
class DescriptorProto_ReservedRange;
struct DescriptorProto_ReservedRangeDefaultTypeInternal;
PROTOBUF_EXPORT extern DescriptorProto_ReservedRangeDefaultTypeInternal _DescriptorProto_ReservedRange_default_instance_;
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull DescriptorProto_ReservedRange_class_data_;
class EnumDescriptorProto;
struct EnumDescriptorProtoDefaultTypeInternal;
PROTOBUF_EXPORT extern EnumDescriptorProtoDefaultTypeInternal _EnumDescriptorProto_default_instance_;
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull EnumDescriptorProto_class_data_;
class EnumDescriptorProto_EnumReservedRange;
struct EnumDescriptorProto_EnumReservedRangeDefaultTypeInternal;
PROTOBUF_EXPORT extern EnumDescriptorProto_EnumReservedRangeDefaultTypeInternal _EnumDescriptorProto_EnumReservedRange_default_instance_;
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull EnumDescriptorProto_EnumReservedRange_class_data_;
class EnumOptions;
struct EnumOptionsDefaultTypeInternal;
PROTOBUF_EXPORT extern EnumOptionsDefaultTypeInternal _EnumOptions_default_instance_;
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull EnumOptions_class_data_;
class EnumValueDescriptorProto;
struct EnumValueDescriptorProtoDefaultTypeInternal;
PROTOBUF_EXPORT extern EnumValueDescriptorProtoDefaultTypeInternal _EnumValueDescriptorProto_default_instance_;
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull EnumValueDescriptorProto_class_data_;
class EnumValueOptions;
struct EnumValueOptionsDefaultTypeInternal;
PROTOBUF_EXPORT extern EnumValueOptionsDefaultTypeInternal _EnumValueOptions_default_instance_;
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull EnumValueOptions_class_data_;
class ExtensionRangeOptions;
struct ExtensionRangeOptionsDefaultTypeInternal;
PROTOBUF_EXPORT extern ExtensionRangeOptionsDefaultTypeInternal _ExtensionRangeOptions_default_instance_;
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull ExtensionRangeOptions_class_data_;
class ExtensionRangeOptions_Declaration;
struct ExtensionRangeOptions_DeclarationDefaultTypeInternal;
PROTOBUF_EXPORT extern ExtensionRangeOptions_DeclarationDefaultTypeInternal _ExtensionRangeOptions_Declaration_default_instance_;
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull ExtensionRangeOptions_Declaration_class_data_;
class FeatureSet;
struct FeatureSetDefaultTypeInternal;
PROTOBUF_EXPORT extern FeatureSetDefaultTypeInternal _FeatureSet_default_instance_;
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull FeatureSet_class_data_;
class FeatureSetDefaults;
struct FeatureSetDefaultsDefaultTypeInternal;
PROTOBUF_EXPORT extern FeatureSetDefaultsDefaultTypeInternal _FeatureSetDefaults_default_instance_;
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull FeatureSetDefaults_class_data_;
class FeatureSetDefaults_FeatureSetEditionDefault;
struct FeatureSetDefaults_FeatureSetEditionDefaultDefaultTypeInternal;
PROTOBUF_EXPORT extern FeatureSetDefaults_FeatureSetEditionDefaultDefaultTypeInternal _FeatureSetDefaults_FeatureSetEditionDefault_default_instance_;
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull FeatureSetDefaults_FeatureSetEditionDefault_class_data_;
class FieldDescriptorProto;
struct FieldDescriptorProtoDefaultTypeInternal;
PROTOBUF_EXPORT extern FieldDescriptorProtoDefaultTypeInternal _FieldDescriptorProto_default_instance_;
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull FieldDescriptorProto_class_data_;
class FieldOptions;
struct FieldOptionsDefaultTypeInternal;
PROTOBUF_EXPORT extern FieldOptionsDefaultTypeInternal _FieldOptions_default_instance_;
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull FieldOptions_class_data_;
class FieldOptions_EditionDefault;
struct FieldOptions_EditionDefaultDefaultTypeInternal;
PROTOBUF_EXPORT extern FieldOptions_EditionDefaultDefaultTypeInternal _FieldOptions_EditionDefault_default_instance_;
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull FieldOptions_EditionDefault_class_data_;
class FieldOptions_FeatureSupport;
struct FieldOptions_FeatureSupportDefaultTypeInternal;
PROTOBUF_EXPORT extern FieldOptions_FeatureSupportDefaultTypeInternal _FieldOptions_FeatureSupport_default_instance_;
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull FieldOptions_FeatureSupport_class_data_;
class FileDescriptorProto;
struct FileDescriptorProtoDefaultTypeInternal;
PROTOBUF_EXPORT extern FileDescriptorProtoDefaultTypeInternal _FileDescriptorProto_default_instance_;
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull FileDescriptorProto_class_data_;
class FileDescriptorSet;
struct FileDescriptorSetDefaultTypeInternal;
PROTOBUF_EXPORT extern FileDescriptorSetDefaultTypeInternal _FileDescriptorSet_default_instance_;
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull FileDescriptorSet_class_data_;
class FileOptions;
struct FileOptionsDefaultTypeInternal;
PROTOBUF_EXPORT extern FileOptionsDefaultTypeInternal _FileOptions_default_instance_;
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull FileOptions_class_data_;
class GeneratedCodeInfo;
struct GeneratedCodeInfoDefaultTypeInternal;
PROTOBUF_EXPORT extern GeneratedCodeInfoDefaultTypeInternal _GeneratedCodeInfo_default_instance_;
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull GeneratedCodeInfo_class_data_;
class GeneratedCodeInfo_Annotation;
struct GeneratedCodeInfo_AnnotationDefaultTypeInternal;
PROTOBUF_EXPORT extern GeneratedCodeInfo_AnnotationDefaultTypeInternal _GeneratedCodeInfo_Annotation_default_instance_;
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull GeneratedCodeInfo_Annotation_class_data_;
class MessageOptions;
struct MessageOptionsDefaultTypeInternal;
PROTOBUF_EXPORT extern MessageOptionsDefaultTypeInternal _MessageOptions_default_instance_;
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull MessageOptions_class_data_;
class MethodDescriptorProto;
struct MethodDescriptorProtoDefaultTypeInternal;
PROTOBUF_EXPORT extern MethodDescriptorProtoDefaultTypeInternal _MethodDescriptorProto_default_instance_;
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull MethodDescriptorProto_class_data_;
class MethodOptions;
struct MethodOptionsDefaultTypeInternal;
PROTOBUF_EXPORT extern MethodOptionsDefaultTypeInternal _MethodOptions_default_instance_;
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull MethodOptions_class_data_;
class OneofDescriptorProto;
struct OneofDescriptorProtoDefaultTypeInternal;
PROTOBUF_EXPORT extern OneofDescriptorProtoDefaultTypeInternal _OneofDescriptorProto_default_instance_;
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull OneofDescriptorProto_class_data_;
class OneofOptions;
struct OneofOptionsDefaultTypeInternal;
PROTOBUF_EXPORT extern OneofOptionsDefaultTypeInternal _OneofOptions_default_instance_;
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull OneofOptions_class_data_;
class ServiceDescriptorProto;
struct ServiceDescriptorProtoDefaultTypeInternal;
PROTOBUF_EXPORT extern ServiceDescriptorProtoDefaultTypeInternal _ServiceDescriptorProto_default_instance_;
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull ServiceDescriptorProto_class_data_;
class ServiceOptions;
struct ServiceOptionsDefaultTypeInternal;
PROTOBUF_EXPORT extern ServiceOptionsDefaultTypeInternal _ServiceOptions_default_instance_;
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull ServiceOptions_class_data_;
class SourceCodeInfo;
struct SourceCodeInfoDefaultTypeInternal;
PROTOBUF_EXPORT extern SourceCodeInfoDefaultTypeInternal _SourceCodeInfo_default_instance_;
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull SourceCodeInfo_class_data_;
class SourceCodeInfo_Location;
struct SourceCodeInfo_LocationDefaultTypeInternal;
PROTOBUF_EXPORT extern SourceCodeInfo_LocationDefaultTypeInternal _SourceCodeInfo_Location_default_instance_;
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull SourceCodeInfo_Location_class_data_;
class UninterpretedOption;
struct UninterpretedOptionDefaultTypeInternal;
PROTOBUF_EXPORT extern UninterpretedOptionDefaultTypeInternal _UninterpretedOption_default_instance_;
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull UninterpretedOption_class_data_;
class UninterpretedOption_NamePart;
struct UninterpretedOption_NamePartDefaultTypeInternal;
PROTOBUF_EXPORT extern UninterpretedOption_NamePartDefaultTypeInternal _UninterpretedOption_NamePart_default_instance_;
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull UninterpretedOption_NamePart_class_data_;
namespace internal {
#if !defined(PROTOBUF_CONSTINIT_DEFAULT_INSTANCES)
PROTOBUF_EXPORT void InitializeFileDescriptorDefaultInstancesSlow();
@ -847,9 +880,10 @@ class PROTOBUF_EXPORT UninterpretedOption_NamePart final
static void* PlacementNew_(const void*, void* mem,
::google::protobuf::Arena* arena);
static constexpr auto InternalNewImpl_();
static const ::google::protobuf::internal::ClassDataFull _class_data_;
public:
static constexpr auto InternalGenerateClassData_();
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
@ -918,6 +952,8 @@ class PROTOBUF_EXPORT UninterpretedOption_NamePart final
union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull UninterpretedOption_NamePart_class_data_;
// -------------------------------------------------------------------
class PROTOBUF_EXPORT SourceCodeInfo_Location final
@ -1059,9 +1095,10 @@ class PROTOBUF_EXPORT SourceCodeInfo_Location final
static void* PlacementNew_(const void*, void* mem,
::google::protobuf::Arena* arena);
static constexpr auto InternalNewImpl_();
static const ::google::protobuf::internal::ClassDataFull _class_data_;
public:
static constexpr auto InternalGenerateClassData_();
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
@ -1202,6 +1239,8 @@ class PROTOBUF_EXPORT SourceCodeInfo_Location final
union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull SourceCodeInfo_Location_class_data_;
// -------------------------------------------------------------------
class PROTOBUF_EXPORT GeneratedCodeInfo_Annotation final
@ -1343,9 +1382,10 @@ class PROTOBUF_EXPORT GeneratedCodeInfo_Annotation final
static void* PlacementNew_(const void*, void* mem,
::google::protobuf::Arena* arena);
static constexpr auto InternalNewImpl_();
static const ::google::protobuf::internal::ClassDataFull _class_data_;
public:
static constexpr auto InternalGenerateClassData_();
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
using Semantic = GeneratedCodeInfo_Annotation_Semantic;
@ -1481,6 +1521,8 @@ class PROTOBUF_EXPORT GeneratedCodeInfo_Annotation final
union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull GeneratedCodeInfo_Annotation_class_data_;
// -------------------------------------------------------------------
class PROTOBUF_EXPORT FieldOptions_FeatureSupport final
@ -1622,9 +1664,10 @@ class PROTOBUF_EXPORT FieldOptions_FeatureSupport final
static void* PlacementNew_(const void*, void* mem,
::google::protobuf::Arena* arena);
static constexpr auto InternalNewImpl_();
static const ::google::protobuf::internal::ClassDataFull _class_data_;
public:
static constexpr auto InternalGenerateClassData_();
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
@ -1719,6 +1762,8 @@ class PROTOBUF_EXPORT FieldOptions_FeatureSupport final
union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull FieldOptions_FeatureSupport_class_data_;
// -------------------------------------------------------------------
class PROTOBUF_EXPORT FieldOptions_EditionDefault final
@ -1860,9 +1905,10 @@ class PROTOBUF_EXPORT FieldOptions_EditionDefault final
static void* PlacementNew_(const void*, void* mem,
::google::protobuf::Arena* arena);
static constexpr auto InternalNewImpl_();
static const ::google::protobuf::internal::ClassDataFull _class_data_;
public:
static constexpr auto InternalGenerateClassData_();
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
@ -1931,6 +1977,8 @@ class PROTOBUF_EXPORT FieldOptions_EditionDefault final
union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull FieldOptions_EditionDefault_class_data_;
// -------------------------------------------------------------------
class PROTOBUF_EXPORT FeatureSet final
@ -2077,9 +2125,10 @@ class PROTOBUF_EXPORT FeatureSet final
static void* PlacementNew_(const void*, void* mem,
::google::protobuf::Arena* arena);
static constexpr auto InternalNewImpl_();
static const ::google::protobuf::internal::ClassDataFull _class_data_;
public:
static constexpr auto InternalGenerateClassData_();
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
using FieldPresence = FeatureSet_FieldPresence;
@ -2495,6 +2544,8 @@ class PROTOBUF_EXPORT FeatureSet final
union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull FeatureSet_class_data_;
// -------------------------------------------------------------------
class PROTOBUF_EXPORT ExtensionRangeOptions_Declaration final
@ -2636,9 +2687,10 @@ class PROTOBUF_EXPORT ExtensionRangeOptions_Declaration final
static void* PlacementNew_(const void*, void* mem,
::google::protobuf::Arena* arena);
static constexpr auto InternalNewImpl_();
static const ::google::protobuf::internal::ClassDataFull _class_data_;
public:
static constexpr auto InternalGenerateClassData_();
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
@ -2752,6 +2804,8 @@ class PROTOBUF_EXPORT ExtensionRangeOptions_Declaration final
union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull ExtensionRangeOptions_Declaration_class_data_;
// -------------------------------------------------------------------
class PROTOBUF_EXPORT EnumDescriptorProto_EnumReservedRange final
@ -2893,9 +2947,10 @@ class PROTOBUF_EXPORT EnumDescriptorProto_EnumReservedRange final
static void* PlacementNew_(const void*, void* mem,
::google::protobuf::Arena* arena);
static constexpr auto InternalNewImpl_();
static const ::google::protobuf::internal::ClassDataFull _class_data_;
public:
static constexpr auto InternalGenerateClassData_();
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
@ -2958,6 +3013,8 @@ class PROTOBUF_EXPORT EnumDescriptorProto_EnumReservedRange final
union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull EnumDescriptorProto_EnumReservedRange_class_data_;
// -------------------------------------------------------------------
class PROTOBUF_EXPORT DescriptorProto_ReservedRange final
@ -3099,9 +3156,10 @@ class PROTOBUF_EXPORT DescriptorProto_ReservedRange final
static void* PlacementNew_(const void*, void* mem,
::google::protobuf::Arena* arena);
static constexpr auto InternalNewImpl_();
static const ::google::protobuf::internal::ClassDataFull _class_data_;
public:
static constexpr auto InternalGenerateClassData_();
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
@ -3164,6 +3222,8 @@ class PROTOBUF_EXPORT DescriptorProto_ReservedRange final
union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull DescriptorProto_ReservedRange_class_data_;
// -------------------------------------------------------------------
class PROTOBUF_EXPORT UninterpretedOption final
@ -3310,9 +3370,10 @@ class PROTOBUF_EXPORT UninterpretedOption final
static void* PlacementNew_(const void*, void* mem,
::google::protobuf::Arena* arena);
static constexpr auto InternalNewImpl_();
static const ::google::protobuf::internal::ClassDataFull _class_data_;
public:
static constexpr auto InternalGenerateClassData_();
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
using NamePart = UninterpretedOption_NamePart;
@ -3465,6 +3526,8 @@ class PROTOBUF_EXPORT UninterpretedOption final
union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull UninterpretedOption_class_data_;
// -------------------------------------------------------------------
class PROTOBUF_EXPORT SourceCodeInfo final
@ -3606,9 +3669,10 @@ class PROTOBUF_EXPORT SourceCodeInfo final
static void* PlacementNew_(const void*, void* mem,
::google::protobuf::Arena* arena);
static constexpr auto InternalNewImpl_();
static const ::google::protobuf::internal::ClassDataFull _class_data_;
public:
static constexpr auto InternalGenerateClassData_();
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
using Location = SourceCodeInfo_Location;
@ -3664,6 +3728,8 @@ class PROTOBUF_EXPORT SourceCodeInfo final
union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull SourceCodeInfo_class_data_;
// -------------------------------------------------------------------
class PROTOBUF_EXPORT GeneratedCodeInfo final
@ -3805,9 +3871,10 @@ class PROTOBUF_EXPORT GeneratedCodeInfo final
static void* PlacementNew_(const void*, void* mem,
::google::protobuf::Arena* arena);
static constexpr auto InternalNewImpl_();
static const ::google::protobuf::internal::ClassDataFull _class_data_;
public:
static constexpr auto InternalGenerateClassData_();
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
using Annotation = GeneratedCodeInfo_Annotation;
@ -3863,6 +3930,8 @@ class PROTOBUF_EXPORT GeneratedCodeInfo final
union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull GeneratedCodeInfo_class_data_;
// -------------------------------------------------------------------
class PROTOBUF_EXPORT FeatureSetDefaults_FeatureSetEditionDefault final
@ -4009,9 +4078,10 @@ class PROTOBUF_EXPORT FeatureSetDefaults_FeatureSetEditionDefault final
static void* PlacementNew_(const void*, void* mem,
::google::protobuf::Arena* arena);
static constexpr auto InternalNewImpl_();
static const ::google::protobuf::internal::ClassDataFull _class_data_;
public:
static constexpr auto InternalGenerateClassData_();
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
@ -4095,6 +4165,8 @@ class PROTOBUF_EXPORT FeatureSetDefaults_FeatureSetEditionDefault final
union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull FeatureSetDefaults_FeatureSetEditionDefault_class_data_;
// -------------------------------------------------------------------
class PROTOBUF_EXPORT ServiceOptions final
@ -4241,9 +4313,10 @@ class PROTOBUF_EXPORT ServiceOptions final
static void* PlacementNew_(const void*, void* mem,
::google::protobuf::Arena* arena);
static constexpr auto InternalNewImpl_();
static const ::google::protobuf::internal::ClassDataFull _class_data_;
public:
static constexpr auto InternalGenerateClassData_();
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
@ -4509,6 +4582,8 @@ class PROTOBUF_EXPORT ServiceOptions final
union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull ServiceOptions_class_data_;
// -------------------------------------------------------------------
class PROTOBUF_EXPORT OneofOptions final
@ -4655,9 +4730,10 @@ class PROTOBUF_EXPORT OneofOptions final
static void* PlacementNew_(const void*, void* mem,
::google::protobuf::Arena* arena);
static constexpr auto InternalNewImpl_();
static const ::google::protobuf::internal::ClassDataFull _class_data_;
public:
static constexpr auto InternalGenerateClassData_();
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
@ -4910,6 +4986,8 @@ class PROTOBUF_EXPORT OneofOptions final
union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull OneofOptions_class_data_;
// -------------------------------------------------------------------
class PROTOBUF_EXPORT MethodOptions final
@ -5056,9 +5134,10 @@ class PROTOBUF_EXPORT MethodOptions final
static void* PlacementNew_(const void*, void* mem,
::google::protobuf::Arena* arena);
static constexpr auto InternalNewImpl_();
static const ::google::protobuf::internal::ClassDataFull _class_data_;
public:
static constexpr auto InternalGenerateClassData_();
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
using IdempotencyLevel = MethodOptions_IdempotencyLevel;
@ -5357,6 +5436,8 @@ class PROTOBUF_EXPORT MethodOptions final
union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull MethodOptions_class_data_;
// -------------------------------------------------------------------
class PROTOBUF_EXPORT MessageOptions final
@ -5503,9 +5584,10 @@ class PROTOBUF_EXPORT MessageOptions final
static void* PlacementNew_(const void*, void* mem,
::google::protobuf::Arena* arena);
static constexpr auto InternalNewImpl_();
static const ::google::protobuf::internal::ClassDataFull _class_data_;
public:
static constexpr auto InternalGenerateClassData_();
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
@ -5823,6 +5905,8 @@ class PROTOBUF_EXPORT MessageOptions final
union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull MessageOptions_class_data_;
// -------------------------------------------------------------------
class PROTOBUF_EXPORT FileOptions final
@ -5969,9 +6053,10 @@ class PROTOBUF_EXPORT FileOptions final
static void* PlacementNew_(const void*, void* mem,
::google::protobuf::Arena* arena);
static constexpr auto InternalNewImpl_();
static const ::google::protobuf::internal::ClassDataFull _class_data_;
public:
static constexpr auto InternalGenerateClassData_();
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
using OptimizeMode = FileOptions_OptimizeMode;
@ -6551,6 +6636,8 @@ class PROTOBUF_EXPORT FileOptions final
union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull FileOptions_class_data_;
// -------------------------------------------------------------------
class PROTOBUF_EXPORT FieldOptions final
@ -6697,9 +6784,10 @@ class PROTOBUF_EXPORT FieldOptions final
static void* PlacementNew_(const void*, void* mem,
::google::protobuf::Arena* arena);
static constexpr auto InternalNewImpl_();
static const ::google::protobuf::internal::ClassDataFull _class_data_;
public:
static constexpr auto InternalGenerateClassData_();
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
using EditionDefault = FieldOptions_EditionDefault;
@ -7215,6 +7303,8 @@ class PROTOBUF_EXPORT FieldOptions final
union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull FieldOptions_class_data_;
// -------------------------------------------------------------------
class PROTOBUF_EXPORT FeatureSetDefaults final
@ -7361,9 +7451,10 @@ class PROTOBUF_EXPORT FeatureSetDefaults final
static void* PlacementNew_(const void*, void* mem,
::google::protobuf::Arena* arena);
static constexpr auto InternalNewImpl_();
static const ::google::protobuf::internal::ClassDataFull _class_data_;
public:
static constexpr auto InternalGenerateClassData_();
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
using FeatureSetEditionDefault = FeatureSetDefaults_FeatureSetEditionDefault;
@ -7446,6 +7537,8 @@ class PROTOBUF_EXPORT FeatureSetDefaults final
union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull FeatureSetDefaults_class_data_;
// -------------------------------------------------------------------
class PROTOBUF_EXPORT ExtensionRangeOptions final
@ -7592,9 +7685,10 @@ class PROTOBUF_EXPORT ExtensionRangeOptions final
static void* PlacementNew_(const void*, void* mem,
::google::protobuf::Arena* arena);
static constexpr auto InternalNewImpl_();
static const ::google::protobuf::internal::ClassDataFull _class_data_;
public:
static constexpr auto InternalGenerateClassData_();
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
using Declaration = ExtensionRangeOptions_Declaration;
@ -7899,6 +7993,8 @@ class PROTOBUF_EXPORT ExtensionRangeOptions final
union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull ExtensionRangeOptions_class_data_;
// -------------------------------------------------------------------
class PROTOBUF_EXPORT EnumValueOptions final
@ -8045,9 +8141,10 @@ class PROTOBUF_EXPORT EnumValueOptions final
static void* PlacementNew_(const void*, void* mem,
::google::protobuf::Arena* arena);
static constexpr auto InternalNewImpl_();
static const ::google::protobuf::internal::ClassDataFull _class_data_;
public:
static constexpr auto InternalGenerateClassData_();
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
@ -8343,6 +8440,8 @@ class PROTOBUF_EXPORT EnumValueOptions final
union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull EnumValueOptions_class_data_;
// -------------------------------------------------------------------
class PROTOBUF_EXPORT EnumOptions final
@ -8489,9 +8588,10 @@ class PROTOBUF_EXPORT EnumOptions final
static void* PlacementNew_(const void*, void* mem,
::google::protobuf::Arena* arena);
static constexpr auto InternalNewImpl_();
static const ::google::protobuf::internal::ClassDataFull _class_data_;
public:
static constexpr auto InternalGenerateClassData_();
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
@ -8783,6 +8883,8 @@ class PROTOBUF_EXPORT EnumOptions final
union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull EnumOptions_class_data_;
// -------------------------------------------------------------------
class PROTOBUF_EXPORT OneofDescriptorProto final
@ -8929,9 +9031,10 @@ class PROTOBUF_EXPORT OneofDescriptorProto final
static void* PlacementNew_(const void*, void* mem,
::google::protobuf::Arena* arena);
static constexpr auto InternalNewImpl_();
static const ::google::protobuf::internal::ClassDataFull _class_data_;
public:
static constexpr auto InternalGenerateClassData_();
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
@ -9004,6 +9107,8 @@ class PROTOBUF_EXPORT OneofDescriptorProto final
union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull OneofDescriptorProto_class_data_;
// -------------------------------------------------------------------
class PROTOBUF_EXPORT MethodDescriptorProto final
@ -9150,9 +9255,10 @@ class PROTOBUF_EXPORT MethodDescriptorProto final
static void* PlacementNew_(const void*, void* mem,
::google::protobuf::Arena* arena);
static constexpr auto InternalNewImpl_();
static const ::google::protobuf::internal::ClassDataFull _class_data_;
public:
static constexpr auto InternalGenerateClassData_();
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
@ -9289,6 +9395,8 @@ class PROTOBUF_EXPORT MethodDescriptorProto final
union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull MethodDescriptorProto_class_data_;
// -------------------------------------------------------------------
class PROTOBUF_EXPORT FieldDescriptorProto final
@ -9435,9 +9543,10 @@ class PROTOBUF_EXPORT FieldDescriptorProto final
static void* PlacementNew_(const void*, void* mem,
::google::protobuf::Arena* arena);
static constexpr auto InternalNewImpl_();
static const ::google::protobuf::internal::ClassDataFull _class_data_;
public:
static constexpr auto InternalGenerateClassData_();
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
using Type = FieldDescriptorProto_Type;
@ -9706,6 +9815,8 @@ class PROTOBUF_EXPORT FieldDescriptorProto final
union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull FieldDescriptorProto_class_data_;
// -------------------------------------------------------------------
class PROTOBUF_EXPORT EnumValueDescriptorProto final
@ -9852,9 +9963,10 @@ class PROTOBUF_EXPORT EnumValueDescriptorProto final
static void* PlacementNew_(const void*, void* mem,
::google::protobuf::Arena* arena);
static constexpr auto InternalNewImpl_();
static const ::google::protobuf::internal::ClassDataFull _class_data_;
public:
static constexpr auto InternalGenerateClassData_();
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
@ -9940,6 +10052,8 @@ class PROTOBUF_EXPORT EnumValueDescriptorProto final
union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull EnumValueDescriptorProto_class_data_;
// -------------------------------------------------------------------
class PROTOBUF_EXPORT DescriptorProto_ExtensionRange final
@ -10086,9 +10200,10 @@ class PROTOBUF_EXPORT DescriptorProto_ExtensionRange final
static void* PlacementNew_(const void*, void* mem,
::google::protobuf::Arena* arena);
static constexpr auto InternalNewImpl_();
static const ::google::protobuf::internal::ClassDataFull _class_data_;
public:
static constexpr auto InternalGenerateClassData_();
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
@ -10168,6 +10283,8 @@ class PROTOBUF_EXPORT DescriptorProto_ExtensionRange final
union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull DescriptorProto_ExtensionRange_class_data_;
// -------------------------------------------------------------------
class PROTOBUF_EXPORT ServiceDescriptorProto final
@ -10314,9 +10431,10 @@ class PROTOBUF_EXPORT ServiceDescriptorProto final
static void* PlacementNew_(const void*, void* mem,
::google::protobuf::Arena* arena);
static constexpr auto InternalNewImpl_();
static const ::google::protobuf::internal::ClassDataFull _class_data_;
public:
static constexpr auto InternalGenerateClassData_();
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
@ -10408,6 +10526,8 @@ class PROTOBUF_EXPORT ServiceDescriptorProto final
union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull ServiceDescriptorProto_class_data_;
// -------------------------------------------------------------------
class PROTOBUF_EXPORT EnumDescriptorProto final
@ -10554,9 +10674,10 @@ class PROTOBUF_EXPORT EnumDescriptorProto final
static void* PlacementNew_(const void*, void* mem,
::google::protobuf::Arena* arena);
static constexpr auto InternalNewImpl_();
static const ::google::protobuf::internal::ClassDataFull _class_data_;
public:
static constexpr auto InternalGenerateClassData_();
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
using EnumReservedRange = EnumDescriptorProto_EnumReservedRange;
@ -10692,6 +10813,8 @@ class PROTOBUF_EXPORT EnumDescriptorProto final
union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull EnumDescriptorProto_class_data_;
// -------------------------------------------------------------------
class PROTOBUF_EXPORT DescriptorProto final
@ -10838,9 +10961,10 @@ class PROTOBUF_EXPORT DescriptorProto final
static void* PlacementNew_(const void*, void* mem,
::google::protobuf::Arena* arena);
static constexpr auto InternalNewImpl_();
static const ::google::protobuf::internal::ClassDataFull _class_data_;
public:
static constexpr auto InternalGenerateClassData_();
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
using ExtensionRange = DescriptorProto_ExtensionRange;
@ -11072,6 +11196,8 @@ class PROTOBUF_EXPORT DescriptorProto final
union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull DescriptorProto_class_data_;
// -------------------------------------------------------------------
class PROTOBUF_EXPORT FileDescriptorProto final
@ -11218,9 +11344,10 @@ class PROTOBUF_EXPORT FileDescriptorProto final
static void* PlacementNew_(const void*, void* mem,
::google::protobuf::Arena* arena);
static constexpr auto InternalNewImpl_();
static const ::google::protobuf::internal::ClassDataFull _class_data_;
public:
static constexpr auto InternalGenerateClassData_();
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
@ -11501,6 +11628,8 @@ class PROTOBUF_EXPORT FileDescriptorProto final
union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull FileDescriptorProto_class_data_;
// -------------------------------------------------------------------
class PROTOBUF_EXPORT FileDescriptorSet final
@ -11647,9 +11776,10 @@ class PROTOBUF_EXPORT FileDescriptorSet final
static void* PlacementNew_(const void*, void* mem,
::google::protobuf::Arena* arena);
static constexpr auto InternalNewImpl_();
static const ::google::protobuf::internal::ClassDataFull _class_data_;
public:
static constexpr auto InternalGenerateClassData_();
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
@ -11705,6 +11835,8 @@ class PROTOBUF_EXPORT FileDescriptorSet final
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull FileDescriptorSet_class_data_;
// ===================================================================

@ -224,16 +224,23 @@ class PROTOBUF_EXPORT CachedSize {
#endif
};
auto GetClassData(const MessageLite& msg);
// TODO: Upgrade to `auto` parameters when we drop C++14 support.
template <typename T, const T* kDefault>
template <typename T, const T* kDefault, typename ClassData,
const ClassData* kClassData>
struct GeneratedMessageTraitsT {
static constexpr const void* default_instance() { return kDefault; }
static constexpr const auto* class_data() { return kClassData->base(); }
static constexpr auto StrongPointer() { return default_instance(); }
};
template <typename T>
struct FallbackMessageTraits {
static const void* default_instance() { return T::default_instance(); }
static const void* default_instance() { return &T::default_instance(); }
static constexpr const auto* class_data() {
return GetClassData(T::default_instance());
}
// We can't make a constexpr pointer to the default, so use a function pointer
// instead.
static constexpr auto StrongPointer() { return &T::default_instance; }
@ -252,9 +259,6 @@ struct MessageTraitsImpl {
template <typename T>
using MessageTraits = decltype(MessageTraitsImpl::value<T>);
// For MessageLite to friend.
auto GetClassData(const MessageLite& msg);
class SwapFieldHelper;
// See parse_context.h for explanation
@ -898,16 +902,6 @@ class PROTOBUF_EXPORT MessageLite {
virtual const internal::ClassData* GetClassData() const = 0;
#endif // PROTOBUF_CUSTOM_VTABLE
template <typename T>
static auto GetClassDataGenerated() {
static_assert(std::is_base_of<MessageLite, T>::value, "");
// We could speed this up if needed by avoiding the function call.
// In LTO this is likely inlined, so it might not matter.
static_assert(
std::is_same<const T&, decltype(T::default_instance())>::value, "");
return T::default_instance().T::GetClassData();
}
internal::InternalMetadata _internal_metadata_;
#if defined(PROTOBUF_CUSTOM_VTABLE)
const internal::ClassData* _class_data_;
@ -1038,7 +1032,7 @@ class TypeId {
template <typename T>
static TypeId Get() {
return TypeId(MessageLite::GetClassDataGenerated<T>());
return TypeId(internal::MessageTraits<T>::class_data());
}
// Name of the message type.

@ -1307,6 +1307,15 @@ TEST(MESSAGE_TEST_NAME, MOMIParserEdgeCases) {
}
}
TEST(MESSAGE_TEST_NAME, MessageTraitsWork) {
EXPECT_EQ(
&UNITTEST::TestAllTypes::default_instance(),
internal::MessageTraits<UNITTEST::TestAllTypes>::default_instance());
EXPECT_EQ(
internal::GetClassData(UNITTEST::TestAllTypes::default_instance()),
internal::MessageTraits<UNITTEST::TestAllTypes>::class_data());
}
TEST(MESSAGE_TEST_NAME, CheckSerializationWhenInterleavedExtensions) {
UNITTEST::TestExtensionRangeSerialize in_message;

Loading…
Cancel
Save