diff --git a/src/file_lists.cmake b/src/file_lists.cmake index a83f17bb9c..f44cf0dffe 100644 --- a/src/file_lists.cmake +++ b/src/file_lists.cmake @@ -745,6 +745,7 @@ set(compiler_test_files ${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/code_generator_unittest.cc ${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/command_line_interface_unittest.cc ${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/cpp/bootstrap_unittest.cc + ${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/cpp/file_unittest.cc ${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/cpp/generator_unittest.cc ${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/cpp/message_size_unittest.cc ${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/cpp/metadata_test.cc diff --git a/src/google/protobuf/api.pb.cc b/src/google/protobuf/api.pb.cc index ac4b71dfa2..201db71211 100644 --- a/src/google/protobuf/api.pb.cc +++ b/src/google/protobuf/api.pb.cc @@ -23,34 +23,28 @@ namespace _fl = ::google::protobuf::internal::field_layout; namespace google { namespace protobuf { template -PROTOBUF_CONSTEXPR Api::Api(::_pbi::ConstantInitialized) +PROTOBUF_CONSTEXPR Mixin::Mixin(::_pbi::ConstantInitialized) : _impl_{ - /*decltype(_impl_._has_bits_)*/ {}, - /*decltype(_impl_._cached_size_)*/ {}, - /*decltype(_impl_.methods_)*/ {}, - /*decltype(_impl_.options_)*/ {}, - /*decltype(_impl_.mixins_)*/ {}, /*decltype(_impl_.name_)*/ { &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}, }, - /*decltype(_impl_.version_)*/ { + /*decltype(_impl_.root_)*/ { &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}, }, - /*decltype(_impl_.source_context_)*/ nullptr, - /*decltype(_impl_.syntax_)*/ 0, + /*decltype(_impl_._cached_size_)*/ {}, } {} -struct ApiDefaultTypeInternal { - PROTOBUF_CONSTEXPR ApiDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~ApiDefaultTypeInternal() {} +struct MixinDefaultTypeInternal { + PROTOBUF_CONSTEXPR MixinDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~MixinDefaultTypeInternal() {} union { - Api _instance; + Mixin _instance; }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_EXPORT - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ApiDefaultTypeInternal _Api_default_instance_; + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MixinDefaultTypeInternal _Mixin_default_instance_; template PROTOBUF_CONSTEXPR Method::Method(::_pbi::ConstantInitialized) : _impl_{ @@ -83,28 +77,34 @@ struct MethodDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_EXPORT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MethodDefaultTypeInternal _Method_default_instance_; template -PROTOBUF_CONSTEXPR Mixin::Mixin(::_pbi::ConstantInitialized) +PROTOBUF_CONSTEXPR Api::Api(::_pbi::ConstantInitialized) : _impl_{ + /*decltype(_impl_._has_bits_)*/ {}, + /*decltype(_impl_._cached_size_)*/ {}, + /*decltype(_impl_.methods_)*/ {}, + /*decltype(_impl_.options_)*/ {}, + /*decltype(_impl_.mixins_)*/ {}, /*decltype(_impl_.name_)*/ { &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}, }, - /*decltype(_impl_.root_)*/ { + /*decltype(_impl_.version_)*/ { &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}, }, - /*decltype(_impl_._cached_size_)*/ {}, + /*decltype(_impl_.source_context_)*/ nullptr, + /*decltype(_impl_.syntax_)*/ 0, } {} -struct MixinDefaultTypeInternal { - PROTOBUF_CONSTEXPR MixinDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~MixinDefaultTypeInternal() {} +struct ApiDefaultTypeInternal { + PROTOBUF_CONSTEXPR ApiDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~ApiDefaultTypeInternal() {} union { - Mixin _instance; + Api _instance; }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_EXPORT - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MixinDefaultTypeInternal _Mixin_default_instance_; + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ApiDefaultTypeInternal _Api_default_instance_; } // namespace protobuf } // namespace google static ::_pb::Metadata file_level_metadata_google_2fprotobuf_2fapi_2eproto[3]; diff --git a/src/google/protobuf/api.pb.h b/src/google/protobuf/api.pb.h index 871baf03bc..6a193fbddd 100644 --- a/src/google/protobuf/api.pb.h +++ b/src/google/protobuf/api.pb.h @@ -77,25 +77,25 @@ namespace protobuf { // ------------------------------------------------------------------- -class PROTOBUF_EXPORT Api final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Api) */ { +class PROTOBUF_EXPORT Mixin final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Mixin) */ { public: - inline Api() : Api(nullptr) {} - ~Api() override; + inline Mixin() : Mixin(nullptr) {} + ~Mixin() override; template - explicit PROTOBUF_CONSTEXPR Api(::google::protobuf::internal::ConstantInitialized); + explicit PROTOBUF_CONSTEXPR Mixin(::google::protobuf::internal::ConstantInitialized); - Api(const Api& from); - Api(Api&& from) noexcept - : Api() { + Mixin(const Mixin& from); + Mixin(Mixin&& from) noexcept + : Mixin() { *this = ::std::move(from); } - inline Api& operator=(const Api& from) { + inline Mixin& operator=(const Mixin& from) { CopyFrom(from); return *this; } - inline Api& operator=(Api&& from) noexcept { + inline Mixin& operator=(Mixin&& from) noexcept { if (this == &from) return *this; if (GetOwningArena() == from.GetOwningArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE @@ -125,20 +125,20 @@ class PROTOBUF_EXPORT Api final : static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const Api& default_instance() { + static const Mixin& default_instance() { return *internal_default_instance(); } - static inline const Api* internal_default_instance() { - return reinterpret_cast( - &_Api_default_instance_); + static inline const Mixin* internal_default_instance() { + return reinterpret_cast( + &_Mixin_default_instance_); } static constexpr int kIndexInFileMessages = - 0; + 2; - friend void swap(Api& a, Api& b) { + friend void swap(Mixin& a, Mixin& b) { a.Swap(&b); } - inline void Swap(Api* other) { + inline void Swap(Mixin* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP if (GetOwningArena() != nullptr && @@ -151,7 +151,7 @@ class PROTOBUF_EXPORT Api final : ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(Api* other) { + void UnsafeArenaSwap(Mixin* other) { if (other == this) return; ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); @@ -159,14 +159,14 @@ class PROTOBUF_EXPORT Api final : // implements Message ---------------------------------------------- - Api* New(::google::protobuf::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + Mixin* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const Api& from); + void CopyFrom(const Mixin& from); using ::google::protobuf::Message::MergeFrom; - void MergeFrom( const Api& from) { - Api::MergeImpl(*this, from); + void MergeFrom( const Mixin& from) { + Mixin::MergeImpl(*this, from); } private: static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); @@ -184,15 +184,15 @@ class PROTOBUF_EXPORT Api final : void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); void SetCachedSize(int size) const final; - void InternalSwap(Api* other); + void InternalSwap(Mixin* other); private: friend class ::google::protobuf::internal::AnyMetadata; static ::absl::string_view FullMessageName() { - return "google.protobuf.Api"; + return "google.protobuf.Mixin"; } protected: - explicit Api(::google::protobuf::Arena* arena); + explicit Mixin(::google::protobuf::Arena* arena); public: static const ClassData _class_data_; @@ -205,68 +205,9 @@ class PROTOBUF_EXPORT Api final : // accessors ------------------------------------------------------- enum : int { - kMethodsFieldNumber = 2, - kOptionsFieldNumber = 3, - kMixinsFieldNumber = 6, kNameFieldNumber = 1, - kVersionFieldNumber = 4, - kSourceContextFieldNumber = 5, - kSyntaxFieldNumber = 7, + kRootFieldNumber = 2, }; - // repeated .google.protobuf.Method methods = 2; - int methods_size() const; - private: - int _internal_methods_size() const; - - public: - void clear_methods() ; - ::google::protobuf::Method* mutable_methods(int index); - ::google::protobuf::RepeatedPtrField< ::google::protobuf::Method >* - mutable_methods(); - private: - const ::google::protobuf::RepeatedPtrField<::google::protobuf::Method>& _internal_methods() const; - ::google::protobuf::RepeatedPtrField<::google::protobuf::Method>* _internal_mutable_methods(); - public: - const ::google::protobuf::Method& methods(int index) const; - ::google::protobuf::Method* add_methods(); - const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Method >& - methods() const; - // repeated .google.protobuf.Option options = 3; - int options_size() const; - private: - int _internal_options_size() const; - - public: - void clear_options() ; - ::google::protobuf::Option* mutable_options(int index); - ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >* - mutable_options(); - private: - const ::google::protobuf::RepeatedPtrField<::google::protobuf::Option>& _internal_options() const; - ::google::protobuf::RepeatedPtrField<::google::protobuf::Option>* _internal_mutable_options(); - public: - const ::google::protobuf::Option& options(int index) const; - ::google::protobuf::Option* add_options(); - const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& - options() const; - // repeated .google.protobuf.Mixin mixins = 6; - int mixins_size() const; - private: - int _internal_mixins_size() const; - - public: - void clear_mixins() ; - ::google::protobuf::Mixin* mutable_mixins(int index); - ::google::protobuf::RepeatedPtrField< ::google::protobuf::Mixin >* - mutable_mixins(); - private: - const ::google::protobuf::RepeatedPtrField<::google::protobuf::Mixin>& _internal_mixins() const; - ::google::protobuf::RepeatedPtrField<::google::protobuf::Mixin>* _internal_mutable_mixins(); - public: - const ::google::protobuf::Mixin& mixins(int index) const; - ::google::protobuf::Mixin* add_mixins(); - const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Mixin >& - mixins() const; // string name = 1; void clear_name() ; const std::string& name() const; @@ -283,69 +224,38 @@ class PROTOBUF_EXPORT Api final : std::string* _internal_mutable_name(); public: - // string version = 4; - void clear_version() ; - const std::string& version() const; + // string root = 2; + void clear_root() ; + const std::string& root() const; template - void set_version(Arg_&& arg, Args_... args); - std::string* mutable_version(); - PROTOBUF_NODISCARD std::string* release_version(); - void set_allocated_version(std::string* ptr); + void set_root(Arg_&& arg, Args_... args); + std::string* mutable_root(); + PROTOBUF_NODISCARD std::string* release_root(); + void set_allocated_root(std::string* ptr); private: - const std::string& _internal_version() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_version( + const std::string& _internal_root() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_root( const std::string& value); - std::string* _internal_mutable_version(); - - public: - // .google.protobuf.SourceContext source_context = 5; - bool has_source_context() const; - void clear_source_context() ; - const ::google::protobuf::SourceContext& source_context() const; - PROTOBUF_NODISCARD ::google::protobuf::SourceContext* release_source_context(); - ::google::protobuf::SourceContext* mutable_source_context(); - void set_allocated_source_context(::google::protobuf::SourceContext* value); - void unsafe_arena_set_allocated_source_context(::google::protobuf::SourceContext* value); - ::google::protobuf::SourceContext* unsafe_arena_release_source_context(); - - private: - const ::google::protobuf::SourceContext& _internal_source_context() const; - ::google::protobuf::SourceContext* _internal_mutable_source_context(); - - public: - // .google.protobuf.Syntax syntax = 7; - void clear_syntax() ; - ::google::protobuf::Syntax syntax() const; - void set_syntax(::google::protobuf::Syntax value); - - private: - ::google::protobuf::Syntax _internal_syntax() const; - void _internal_set_syntax(::google::protobuf::Syntax value); + std::string* _internal_mutable_root(); public: - // @@protoc_insertion_point(class_scope:google.protobuf.Api) + // @@protoc_insertion_point(class_scope:google.protobuf.Mixin) private: class _Internal; friend class ::google::protobuf::internal::TcParser; static const ::google::protobuf::internal::TcParseTable< - 3, 7, 4, - 39, 2> + 1, 2, 0, + 38, 2> _table_; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { - ::google::protobuf::internal::HasBits<1> _has_bits_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::RepeatedPtrField< ::google::protobuf::Method > methods_; - ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option > options_; - ::google::protobuf::RepeatedPtrField< ::google::protobuf::Mixin > mixins_; ::google::protobuf::internal::ArenaStringPtr name_; - ::google::protobuf::internal::ArenaStringPtr version_; - ::google::protobuf::SourceContext* source_context_; - int syntax_; + ::google::protobuf::internal::ArenaStringPtr root_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; PROTOBUF_TSAN_DECLARE_MEMBER; }; union { Impl_ _impl_; }; @@ -611,25 +521,25 @@ class PROTOBUF_EXPORT Method final : friend struct ::TableStruct_google_2fprotobuf_2fapi_2eproto; };// ------------------------------------------------------------------- -class PROTOBUF_EXPORT Mixin final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Mixin) */ { +class PROTOBUF_EXPORT Api final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Api) */ { public: - inline Mixin() : Mixin(nullptr) {} - ~Mixin() override; + inline Api() : Api(nullptr) {} + ~Api() override; template - explicit PROTOBUF_CONSTEXPR Mixin(::google::protobuf::internal::ConstantInitialized); + explicit PROTOBUF_CONSTEXPR Api(::google::protobuf::internal::ConstantInitialized); - Mixin(const Mixin& from); - Mixin(Mixin&& from) noexcept - : Mixin() { + Api(const Api& from); + Api(Api&& from) noexcept + : Api() { *this = ::std::move(from); } - inline Mixin& operator=(const Mixin& from) { + inline Api& operator=(const Api& from) { CopyFrom(from); return *this; } - inline Mixin& operator=(Mixin&& from) noexcept { + inline Api& operator=(Api&& from) noexcept { if (this == &from) return *this; if (GetOwningArena() == from.GetOwningArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE @@ -659,20 +569,20 @@ class PROTOBUF_EXPORT Mixin final : static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const Mixin& default_instance() { + static const Api& default_instance() { return *internal_default_instance(); } - static inline const Mixin* internal_default_instance() { - return reinterpret_cast( - &_Mixin_default_instance_); + static inline const Api* internal_default_instance() { + return reinterpret_cast( + &_Api_default_instance_); } static constexpr int kIndexInFileMessages = - 2; + 0; - friend void swap(Mixin& a, Mixin& b) { + friend void swap(Api& a, Api& b) { a.Swap(&b); } - inline void Swap(Mixin* other) { + inline void Swap(Api* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP if (GetOwningArena() != nullptr && @@ -685,7 +595,7 @@ class PROTOBUF_EXPORT Mixin final : ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(Mixin* other) { + void UnsafeArenaSwap(Api* other) { if (other == this) return; ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); @@ -693,14 +603,14 @@ class PROTOBUF_EXPORT Mixin final : // implements Message ---------------------------------------------- - Mixin* New(::google::protobuf::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + Api* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const Mixin& from); + void CopyFrom(const Api& from); using ::google::protobuf::Message::MergeFrom; - void MergeFrom( const Mixin& from) { - Mixin::MergeImpl(*this, from); + void MergeFrom( const Api& from) { + Api::MergeImpl(*this, from); } private: static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); @@ -718,15 +628,15 @@ class PROTOBUF_EXPORT Mixin final : void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); void SetCachedSize(int size) const final; - void InternalSwap(Mixin* other); + void InternalSwap(Api* other); private: friend class ::google::protobuf::internal::AnyMetadata; static ::absl::string_view FullMessageName() { - return "google.protobuf.Mixin"; + return "google.protobuf.Api"; } protected: - explicit Mixin(::google::protobuf::Arena* arena); + explicit Api(::google::protobuf::Arena* arena); public: static const ClassData _class_data_; @@ -739,9 +649,68 @@ class PROTOBUF_EXPORT Mixin final : // accessors ------------------------------------------------------- enum : int { + kMethodsFieldNumber = 2, + kOptionsFieldNumber = 3, + kMixinsFieldNumber = 6, kNameFieldNumber = 1, - kRootFieldNumber = 2, + kVersionFieldNumber = 4, + kSourceContextFieldNumber = 5, + kSyntaxFieldNumber = 7, }; + // repeated .google.protobuf.Method methods = 2; + int methods_size() const; + private: + int _internal_methods_size() const; + + public: + void clear_methods() ; + ::google::protobuf::Method* mutable_methods(int index); + ::google::protobuf::RepeatedPtrField< ::google::protobuf::Method >* + mutable_methods(); + private: + const ::google::protobuf::RepeatedPtrField<::google::protobuf::Method>& _internal_methods() const; + ::google::protobuf::RepeatedPtrField<::google::protobuf::Method>* _internal_mutable_methods(); + public: + const ::google::protobuf::Method& methods(int index) const; + ::google::protobuf::Method* add_methods(); + const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Method >& + methods() const; + // repeated .google.protobuf.Option options = 3; + int options_size() const; + private: + int _internal_options_size() const; + + public: + void clear_options() ; + ::google::protobuf::Option* mutable_options(int index); + ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >* + mutable_options(); + private: + const ::google::protobuf::RepeatedPtrField<::google::protobuf::Option>& _internal_options() const; + ::google::protobuf::RepeatedPtrField<::google::protobuf::Option>* _internal_mutable_options(); + public: + const ::google::protobuf::Option& options(int index) const; + ::google::protobuf::Option* add_options(); + const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& + options() const; + // repeated .google.protobuf.Mixin mixins = 6; + int mixins_size() const; + private: + int _internal_mixins_size() const; + + public: + void clear_mixins() ; + ::google::protobuf::Mixin* mutable_mixins(int index); + ::google::protobuf::RepeatedPtrField< ::google::protobuf::Mixin >* + mutable_mixins(); + private: + const ::google::protobuf::RepeatedPtrField<::google::protobuf::Mixin>& _internal_mixins() const; + ::google::protobuf::RepeatedPtrField<::google::protobuf::Mixin>* _internal_mutable_mixins(); + public: + const ::google::protobuf::Mixin& mixins(int index) const; + ::google::protobuf::Mixin* add_mixins(); + const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Mixin >& + mixins() const; // string name = 1; void clear_name() ; const std::string& name() const; @@ -758,38 +727,69 @@ class PROTOBUF_EXPORT Mixin final : std::string* _internal_mutable_name(); public: - // string root = 2; - void clear_root() ; - const std::string& root() const; + // string version = 4; + void clear_version() ; + const std::string& version() const; template - void set_root(Arg_&& arg, Args_... args); - std::string* mutable_root(); - PROTOBUF_NODISCARD std::string* release_root(); - void set_allocated_root(std::string* ptr); + void set_version(Arg_&& arg, Args_... args); + std::string* mutable_version(); + PROTOBUF_NODISCARD std::string* release_version(); + void set_allocated_version(std::string* ptr); private: - const std::string& _internal_root() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_root( + const std::string& _internal_version() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_version( const std::string& value); - std::string* _internal_mutable_root(); + std::string* _internal_mutable_version(); public: - // @@protoc_insertion_point(class_scope:google.protobuf.Mixin) + // .google.protobuf.SourceContext source_context = 5; + bool has_source_context() const; + void clear_source_context() ; + const ::google::protobuf::SourceContext& source_context() const; + PROTOBUF_NODISCARD ::google::protobuf::SourceContext* release_source_context(); + ::google::protobuf::SourceContext* mutable_source_context(); + void set_allocated_source_context(::google::protobuf::SourceContext* value); + void unsafe_arena_set_allocated_source_context(::google::protobuf::SourceContext* value); + ::google::protobuf::SourceContext* unsafe_arena_release_source_context(); + + private: + const ::google::protobuf::SourceContext& _internal_source_context() const; + ::google::protobuf::SourceContext* _internal_mutable_source_context(); + + public: + // .google.protobuf.Syntax syntax = 7; + void clear_syntax() ; + ::google::protobuf::Syntax syntax() const; + void set_syntax(::google::protobuf::Syntax value); + + private: + ::google::protobuf::Syntax _internal_syntax() const; + void _internal_set_syntax(::google::protobuf::Syntax value); + + public: + // @@protoc_insertion_point(class_scope:google.protobuf.Api) private: class _Internal; friend class ::google::protobuf::internal::TcParser; static const ::google::protobuf::internal::TcParseTable< - 1, 2, 0, - 38, 2> + 3, 7, 4, + 39, 2> _table_; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { - ::google::protobuf::internal::ArenaStringPtr name_; - ::google::protobuf::internal::ArenaStringPtr root_; + ::google::protobuf::internal::HasBits<1> _has_bits_; mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedPtrField< ::google::protobuf::Method > methods_; + ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option > options_; + ::google::protobuf::RepeatedPtrField< ::google::protobuf::Mixin > mixins_; + ::google::protobuf::internal::ArenaStringPtr name_; + ::google::protobuf::internal::ArenaStringPtr version_; + ::google::protobuf::SourceContext* source_context_; + int syntax_; PROTOBUF_TSAN_DECLARE_MEMBER; }; union { Impl_ _impl_; }; diff --git a/src/google/protobuf/struct.pb.cc b/src/google/protobuf/struct.pb.cc index 2fdc70f76f..89f31bed02 100644 --- a/src/google/protobuf/struct.pb.cc +++ b/src/google/protobuf/struct.pb.cc @@ -22,18 +22,22 @@ namespace _pbi = ::google::protobuf::internal; namespace _fl = ::google::protobuf::internal::field_layout; namespace google { namespace protobuf { - template -PROTOBUF_CONSTEXPR Struct_FieldsEntry_DoNotUse::Struct_FieldsEntry_DoNotUse(::_pbi::ConstantInitialized) {} -struct Struct_FieldsEntry_DoNotUseDefaultTypeInternal { - PROTOBUF_CONSTEXPR Struct_FieldsEntry_DoNotUseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~Struct_FieldsEntry_DoNotUseDefaultTypeInternal() {} + template +PROTOBUF_CONSTEXPR ListValue::ListValue(::_pbi::ConstantInitialized) + : _impl_{ + /*decltype(_impl_.values_)*/ {}, + /*decltype(_impl_._cached_size_)*/ {}, + } {} +struct ListValueDefaultTypeInternal { + PROTOBUF_CONSTEXPR ListValueDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~ListValueDefaultTypeInternal() {} union { - Struct_FieldsEntry_DoNotUse _instance; + ListValue _instance; }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_EXPORT - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Struct_FieldsEntry_DoNotUseDefaultTypeInternal _Struct_FieldsEntry_DoNotUse_default_instance_; + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ListValueDefaultTypeInternal _ListValue_default_instance_; template PROTOBUF_CONSTEXPR Struct::Struct(::_pbi::ConstantInitialized) : _impl_{ @@ -50,6 +54,18 @@ struct StructDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_EXPORT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 StructDefaultTypeInternal _Struct_default_instance_; + template +PROTOBUF_CONSTEXPR Struct_FieldsEntry_DoNotUse::Struct_FieldsEntry_DoNotUse(::_pbi::ConstantInitialized) {} +struct Struct_FieldsEntry_DoNotUseDefaultTypeInternal { + PROTOBUF_CONSTEXPR Struct_FieldsEntry_DoNotUseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~Struct_FieldsEntry_DoNotUseDefaultTypeInternal() {} + union { + Struct_FieldsEntry_DoNotUse _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_EXPORT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Struct_FieldsEntry_DoNotUseDefaultTypeInternal _Struct_FieldsEntry_DoNotUse_default_instance_; template PROTOBUF_CONSTEXPR Value::Value(::_pbi::ConstantInitialized) : _impl_{ @@ -67,22 +83,6 @@ struct ValueDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_EXPORT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ValueDefaultTypeInternal _Value_default_instance_; - template -PROTOBUF_CONSTEXPR ListValue::ListValue(::_pbi::ConstantInitialized) - : _impl_{ - /*decltype(_impl_.values_)*/ {}, - /*decltype(_impl_._cached_size_)*/ {}, - } {} -struct ListValueDefaultTypeInternal { - PROTOBUF_CONSTEXPR ListValueDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~ListValueDefaultTypeInternal() {} - union { - ListValue _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_EXPORT - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ListValueDefaultTypeInternal _ListValue_default_instance_; } // namespace protobuf } // namespace google static ::_pb::Metadata file_level_metadata_google_2fprotobuf_2fstruct_2eproto[4]; diff --git a/src/google/protobuf/struct.pb.h b/src/google/protobuf/struct.pb.h index 880b7129ea..0605c829a7 100644 --- a/src/google/protobuf/struct.pb.h +++ b/src/google/protobuf/struct.pb.h @@ -113,31 +113,174 @@ inline bool NullValue_Parse(absl::string_view name, NullValue* value) { // ------------------------------------------------------------------- -class Struct_FieldsEntry_DoNotUse final : public ::google::protobuf::internal::MapEntry { -public: - typedef ::google::protobuf::internal::MapEntry SuperType; - Struct_FieldsEntry_DoNotUse(); - template - explicit PROTOBUF_CONSTEXPR Struct_FieldsEntry_DoNotUse( - ::google::protobuf::internal::ConstantInitialized); - explicit Struct_FieldsEntry_DoNotUse(::google::protobuf::Arena* arena); - void MergeFrom(const Struct_FieldsEntry_DoNotUse& other); - static const Struct_FieldsEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_Struct_FieldsEntry_DoNotUse_default_instance_); } - static bool ValidateKey(std::string* s) { - return ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.protobuf.Struct.FieldsEntry.key"); - } - static bool ValidateValue(void*) { return true; } +class PROTOBUF_EXPORT ListValue final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.ListValue) */ { + public: + inline ListValue() : ListValue(nullptr) {} + ~ListValue() override; + template + explicit PROTOBUF_CONSTEXPR ListValue(::google::protobuf::internal::ConstantInitialized); + + ListValue(const ListValue& from); + ListValue(ListValue&& from) noexcept + : ListValue() { + *this = ::std::move(from); + } + + inline ListValue& operator=(const ListValue& from) { + CopyFrom(from); + return *this; + } + inline ListValue& operator=(ListValue&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::google::protobuf::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::google::protobuf::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ListValue& default_instance() { + return *internal_default_instance(); + } + static inline const ListValue* internal_default_instance() { + return reinterpret_cast( + &_ListValue_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + friend void swap(ListValue& a, ListValue& b) { + a.Swap(&b); + } + inline void Swap(ListValue* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ListValue* other) { + if (other == this) return; + ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ListValue* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const ListValue& from); using ::google::protobuf::Message::MergeFrom; + void MergeFrom( const ListValue& from) { + ListValue::MergeImpl(*this, from); + } + private: + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* arena); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ListValue* other); + + private: + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { + return "google.protobuf.ListValue"; + } + protected: + explicit ListValue(::google::protobuf::Arena* arena); + public: + + static const ClassData _class_data_; + const ::google::protobuf::Message::ClassData*GetClassData() const final; + ::google::protobuf::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kValuesFieldNumber = 1, + }; + // repeated .google.protobuf.Value values = 1; + int values_size() const; + private: + int _internal_values_size() const; + + public: + void clear_values() ; + ::google::protobuf::Value* mutable_values(int index); + ::google::protobuf::RepeatedPtrField< ::google::protobuf::Value >* + mutable_values(); + private: + const ::google::protobuf::RepeatedPtrField<::google::protobuf::Value>& _internal_values() const; + ::google::protobuf::RepeatedPtrField<::google::protobuf::Value>* _internal_mutable_values(); + public: + const ::google::protobuf::Value& values(int index) const; + ::google::protobuf::Value* add_values(); + const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Value >& + values() const; + // @@protoc_insertion_point(class_scope:google.protobuf.ListValue) + private: + class _Internal; + + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 0, 1, 1, + 0, 2> + _table_; + template friend class ::google::protobuf::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::google::protobuf::RepeatedPtrField< ::google::protobuf::Value > values_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + PROTOBUF_TSAN_DECLARE_MEMBER; + }; + union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2fstruct_2eproto; -}; -// ------------------------------------------------------------------- +};// ------------------------------------------------------------------- class PROTOBUF_EXPORT Struct final : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Struct) */ { @@ -309,6 +452,32 @@ class PROTOBUF_EXPORT Struct final : friend struct ::TableStruct_google_2fprotobuf_2fstruct_2eproto; };// ------------------------------------------------------------------- +class Struct_FieldsEntry_DoNotUse final : public ::google::protobuf::internal::MapEntry { +public: + typedef ::google::protobuf::internal::MapEntry SuperType; + Struct_FieldsEntry_DoNotUse(); + template + explicit PROTOBUF_CONSTEXPR Struct_FieldsEntry_DoNotUse( + ::google::protobuf::internal::ConstantInitialized); + explicit Struct_FieldsEntry_DoNotUse(::google::protobuf::Arena* arena); + void MergeFrom(const Struct_FieldsEntry_DoNotUse& other); + static const Struct_FieldsEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_Struct_FieldsEntry_DoNotUse_default_instance_); } + static bool ValidateKey(std::string* s) { + return ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.protobuf.Struct.FieldsEntry.key"); + } + static bool ValidateValue(void*) { return true; } + using ::google::protobuf::Message::MergeFrom; + ::google::protobuf::Metadata GetMetadata() const final; + friend struct ::TableStruct_google_2fprotobuf_2fstruct_2eproto; +}; +// ------------------------------------------------------------------- + class PROTOBUF_EXPORT Value final : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Value) */ { public: @@ -583,175 +752,6 @@ class PROTOBUF_EXPORT Value final : }; union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2fstruct_2eproto; -};// ------------------------------------------------------------------- - -class PROTOBUF_EXPORT ListValue final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.ListValue) */ { - public: - inline ListValue() : ListValue(nullptr) {} - ~ListValue() override; - template - explicit PROTOBUF_CONSTEXPR ListValue(::google::protobuf::internal::ConstantInitialized); - - ListValue(const ListValue& from); - ListValue(ListValue&& from) noexcept - : ListValue() { - *this = ::std::move(from); - } - - inline ListValue& operator=(const ListValue& from) { - CopyFrom(from); - return *this; - } - inline ListValue& operator=(ListValue&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const ListValue& default_instance() { - return *internal_default_instance(); - } - static inline const ListValue* internal_default_instance() { - return reinterpret_cast( - &_ListValue_default_instance_); - } - static constexpr int kIndexInFileMessages = - 3; - - friend void swap(ListValue& a, ListValue& b) { - a.Swap(&b); - } - inline void Swap(ListValue* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(ListValue* other) { - if (other == this) return; - ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - ListValue* New(::google::protobuf::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const ListValue& from); - using ::google::protobuf::Message::MergeFrom; - void MergeFrom( const ListValue& from) { - ListValue::MergeImpl(*this, from); - } - private: - static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - ::size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; - ::uint8_t* _InternalSerialize( - ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::google::protobuf::Arena* arena); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(ListValue* other); - - private: - friend class ::google::protobuf::internal::AnyMetadata; - static ::absl::string_view FullMessageName() { - return "google.protobuf.ListValue"; - } - protected: - explicit ListValue(::google::protobuf::Arena* arena); - public: - - static const ClassData _class_data_; - const ::google::protobuf::Message::ClassData*GetClassData() const final; - - ::google::protobuf::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kValuesFieldNumber = 1, - }; - // repeated .google.protobuf.Value values = 1; - int values_size() const; - private: - int _internal_values_size() const; - - public: - void clear_values() ; - ::google::protobuf::Value* mutable_values(int index); - ::google::protobuf::RepeatedPtrField< ::google::protobuf::Value >* - mutable_values(); - private: - const ::google::protobuf::RepeatedPtrField<::google::protobuf::Value>& _internal_values() const; - ::google::protobuf::RepeatedPtrField<::google::protobuf::Value>* _internal_mutable_values(); - public: - const ::google::protobuf::Value& values(int index) const; - ::google::protobuf::Value* add_values(); - const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Value >& - values() const; - // @@protoc_insertion_point(class_scope:google.protobuf.ListValue) - private: - class _Internal; - - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable< - 0, 1, 1, - 0, 2> - _table_; - template friend class ::google::protobuf::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::google::protobuf::RepeatedPtrField< ::google::protobuf::Value > values_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; - PROTOBUF_TSAN_DECLARE_MEMBER; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_google_2fprotobuf_2fstruct_2eproto; }; // =================================================================== diff --git a/src/google/protobuf/type.pb.cc b/src/google/protobuf/type.pb.cc index 034dabf2fa..d8486f1db3 100644 --- a/src/google/protobuf/type.pb.cc +++ b/src/google/protobuf/type.pb.cc @@ -23,34 +23,26 @@ namespace _fl = ::google::protobuf::internal::field_layout; namespace google { namespace protobuf { template -PROTOBUF_CONSTEXPR Type::Type(::_pbi::ConstantInitialized) +PROTOBUF_CONSTEXPR Option::Option(::_pbi::ConstantInitialized) : _impl_{ /*decltype(_impl_._has_bits_)*/ {}, /*decltype(_impl_._cached_size_)*/ {}, - /*decltype(_impl_.fields_)*/ {}, - /*decltype(_impl_.oneofs_)*/ {}, - /*decltype(_impl_.options_)*/ {}, /*decltype(_impl_.name_)*/ { &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}, }, - /*decltype(_impl_.edition_)*/ { - &::_pbi::fixed_address_empty_string, - ::_pbi::ConstantInitialized{}, - }, - /*decltype(_impl_.source_context_)*/ nullptr, - /*decltype(_impl_.syntax_)*/ 0, + /*decltype(_impl_.value_)*/ nullptr, } {} -struct TypeDefaultTypeInternal { - PROTOBUF_CONSTEXPR TypeDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~TypeDefaultTypeInternal() {} +struct OptionDefaultTypeInternal { + PROTOBUF_CONSTEXPR OptionDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~OptionDefaultTypeInternal() {} union { - Type _instance; + Option _instance; }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_EXPORT - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TypeDefaultTypeInternal _Type_default_instance_; + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 OptionDefaultTypeInternal _Option_default_instance_; template PROTOBUF_CONSTEXPR Field::Field(::_pbi::ConstantInitialized) : _impl_{ @@ -89,75 +81,83 @@ struct FieldDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_EXPORT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FieldDefaultTypeInternal _Field_default_instance_; template -PROTOBUF_CONSTEXPR Enum::Enum(::_pbi::ConstantInitialized) +PROTOBUF_CONSTEXPR EnumValue::EnumValue(::_pbi::ConstantInitialized) : _impl_{ - /*decltype(_impl_._has_bits_)*/ {}, - /*decltype(_impl_._cached_size_)*/ {}, - /*decltype(_impl_.enumvalue_)*/ {}, /*decltype(_impl_.options_)*/ {}, /*decltype(_impl_.name_)*/ { &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}, }, - /*decltype(_impl_.edition_)*/ { - &::_pbi::fixed_address_empty_string, - ::_pbi::ConstantInitialized{}, - }, - /*decltype(_impl_.source_context_)*/ nullptr, - /*decltype(_impl_.syntax_)*/ 0, + /*decltype(_impl_.number_)*/ 0, + /*decltype(_impl_._cached_size_)*/ {}, } {} -struct EnumDefaultTypeInternal { - PROTOBUF_CONSTEXPR EnumDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~EnumDefaultTypeInternal() {} +struct EnumValueDefaultTypeInternal { + PROTOBUF_CONSTEXPR EnumValueDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~EnumValueDefaultTypeInternal() {} union { - Enum _instance; + EnumValue _instance; }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_EXPORT - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EnumDefaultTypeInternal _Enum_default_instance_; + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EnumValueDefaultTypeInternal _EnumValue_default_instance_; template -PROTOBUF_CONSTEXPR EnumValue::EnumValue(::_pbi::ConstantInitialized) +PROTOBUF_CONSTEXPR Type::Type(::_pbi::ConstantInitialized) : _impl_{ + /*decltype(_impl_._has_bits_)*/ {}, + /*decltype(_impl_._cached_size_)*/ {}, + /*decltype(_impl_.fields_)*/ {}, + /*decltype(_impl_.oneofs_)*/ {}, /*decltype(_impl_.options_)*/ {}, /*decltype(_impl_.name_)*/ { &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}, }, - /*decltype(_impl_.number_)*/ 0, - /*decltype(_impl_._cached_size_)*/ {}, + /*decltype(_impl_.edition_)*/ { + &::_pbi::fixed_address_empty_string, + ::_pbi::ConstantInitialized{}, + }, + /*decltype(_impl_.source_context_)*/ nullptr, + /*decltype(_impl_.syntax_)*/ 0, } {} -struct EnumValueDefaultTypeInternal { - PROTOBUF_CONSTEXPR EnumValueDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~EnumValueDefaultTypeInternal() {} +struct TypeDefaultTypeInternal { + PROTOBUF_CONSTEXPR TypeDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~TypeDefaultTypeInternal() {} union { - EnumValue _instance; + Type _instance; }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_EXPORT - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EnumValueDefaultTypeInternal _EnumValue_default_instance_; + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TypeDefaultTypeInternal _Type_default_instance_; template -PROTOBUF_CONSTEXPR Option::Option(::_pbi::ConstantInitialized) +PROTOBUF_CONSTEXPR Enum::Enum(::_pbi::ConstantInitialized) : _impl_{ /*decltype(_impl_._has_bits_)*/ {}, /*decltype(_impl_._cached_size_)*/ {}, + /*decltype(_impl_.enumvalue_)*/ {}, + /*decltype(_impl_.options_)*/ {}, /*decltype(_impl_.name_)*/ { &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}, }, - /*decltype(_impl_.value_)*/ nullptr, + /*decltype(_impl_.edition_)*/ { + &::_pbi::fixed_address_empty_string, + ::_pbi::ConstantInitialized{}, + }, + /*decltype(_impl_.source_context_)*/ nullptr, + /*decltype(_impl_.syntax_)*/ 0, } {} -struct OptionDefaultTypeInternal { - PROTOBUF_CONSTEXPR OptionDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~OptionDefaultTypeInternal() {} +struct EnumDefaultTypeInternal { + PROTOBUF_CONSTEXPR EnumDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~EnumDefaultTypeInternal() {} union { - Option _instance; + Enum _instance; }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_EXPORT - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 OptionDefaultTypeInternal _Option_default_instance_; + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EnumDefaultTypeInternal _Enum_default_instance_; } // namespace protobuf } // namespace google static ::_pb::Metadata file_level_metadata_google_2fprotobuf_2ftype_2eproto[5]; diff --git a/src/google/protobuf/type.pb.h b/src/google/protobuf/type.pb.h index 28d87dd824..86d890aa53 100644 --- a/src/google/protobuf/type.pb.h +++ b/src/google/protobuf/type.pb.h @@ -200,25 +200,25 @@ inline bool Syntax_Parse(absl::string_view name, Syntax* value) { // ------------------------------------------------------------------- -class PROTOBUF_EXPORT Type final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Type) */ { +class PROTOBUF_EXPORT Option final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Option) */ { public: - inline Type() : Type(nullptr) {} - ~Type() override; + inline Option() : Option(nullptr) {} + ~Option() override; template - explicit PROTOBUF_CONSTEXPR Type(::google::protobuf::internal::ConstantInitialized); + explicit PROTOBUF_CONSTEXPR Option(::google::protobuf::internal::ConstantInitialized); - Type(const Type& from); - Type(Type&& from) noexcept - : Type() { + Option(const Option& from); + Option(Option&& from) noexcept + : Option() { *this = ::std::move(from); } - inline Type& operator=(const Type& from) { + inline Option& operator=(const Option& from) { CopyFrom(from); return *this; } - inline Type& operator=(Type&& from) noexcept { + inline Option& operator=(Option&& from) noexcept { if (this == &from) return *this; if (GetOwningArena() == from.GetOwningArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE @@ -248,20 +248,20 @@ class PROTOBUF_EXPORT Type final : static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const Type& default_instance() { + static const Option& default_instance() { return *internal_default_instance(); } - static inline const Type* internal_default_instance() { - return reinterpret_cast( - &_Type_default_instance_); + static inline const Option* internal_default_instance() { + return reinterpret_cast( + &_Option_default_instance_); } static constexpr int kIndexInFileMessages = - 0; + 4; - friend void swap(Type& a, Type& b) { + friend void swap(Option& a, Option& b) { a.Swap(&b); } - inline void Swap(Type* other) { + inline void Swap(Option* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP if (GetOwningArena() != nullptr && @@ -274,7 +274,7 @@ class PROTOBUF_EXPORT Type final : ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(Type* other) { + void UnsafeArenaSwap(Option* other) { if (other == this) return; ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); @@ -282,14 +282,14 @@ class PROTOBUF_EXPORT Type final : // implements Message ---------------------------------------------- - Type* New(::google::protobuf::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + Option* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage