From f44ad0b1aeb854f105265c2686c06ace46ee375b Mon Sep 17 00:00:00 2001 From: Protobuf Team Bot Date: Tue, 3 Sep 2024 22:31:37 +0000 Subject: [PATCH] Auto-generate files after cl/670722407 --- src/google/protobuf/any.pb.cc | 9 ++---- src/google/protobuf/any.pb.h | 30 ++++++++++++------- src/google/protobuf/api.pb.h | 15 +++++++--- src/google/protobuf/duration.pb.h | 7 +++-- src/google/protobuf/empty.pb.h | 7 +++-- src/google/protobuf/field_mask.pb.h | 7 +++-- src/google/protobuf/source_context.pb.h | 7 +++-- src/google/protobuf/struct.pb.h | 15 +++++++--- src/google/protobuf/timestamp.pb.h | 7 +++-- src/google/protobuf/type.pb.h | 23 +++++++++++---- src/google/protobuf/wrappers.pb.h | 39 ++++++++++++++++++------- 11 files changed, 116 insertions(+), 50 deletions(-) diff --git a/src/google/protobuf/any.pb.cc b/src/google/protobuf/any.pb.cc index f27d031ab561c..e878857bca6b5 100644 --- a/src/google/protobuf/any.pb.cc +++ b/src/google/protobuf/any.pb.cc @@ -39,8 +39,7 @@ inline constexpr Any::Impl_::Impl_( value_( &::google::protobuf::internal::fixed_address_empty_string, ::_pbi::ConstantInitialized()), - _cached_size_{0}, - _any_metadata_{&type_url_, &value_} {} + _cached_size_{0} {} template PROTOBUF_CONSTEXPR Any::Any(::_pbi::ConstantInitialized) @@ -147,8 +146,7 @@ inline PROTOBUF_NDEBUG_INLINE Any::Impl_::Impl_( const Impl_& from, const ::google::protobuf::Any& from_msg) : type_url_(arena, from.type_url_), value_(arena, from.value_), - _cached_size_{0}, - _any_metadata_{&type_url_, &value_} {} + _cached_size_{0} {} Any::Any( ::google::protobuf::Arena* arena, @@ -171,8 +169,7 @@ inline PROTOBUF_NDEBUG_INLINE Any::Impl_::Impl_( ::google::protobuf::Arena* arena) : type_url_(arena), value_(arena), - _cached_size_{0}, - _any_metadata_{&type_url_, &value_} {} + _cached_size_{0} {} inline void Any::SharedCtor(::_pb::Arena* arena) { new (&_impl_) Impl_(internal_visibility(), arena); diff --git a/src/google/protobuf/any.pb.h b/src/google/protobuf/any.pb.h index 3de6e8831c61e..b489755ef1d31 100644 --- a/src/google/protobuf/any.pb.h +++ b/src/google/protobuf/any.pb.h @@ -38,7 +38,8 @@ namespace google { namespace protobuf { namespace internal { -class AnyMetadata; +template +::absl::string_view GetAnyMessageName(); } // namespace internal } // namespace protobuf } // namespace google @@ -127,15 +128,19 @@ class PROTOBUF_EXPORT Any final bool PackFrom(const ::google::protobuf::Message& message) { ABSL_DCHECK_NE(&message, this); - return _impl_._any_metadata_.PackFrom(GetArena(), message); + return ::google::protobuf::internal::InternalPackFrom( + message, mutable_type_url(), _internal_mutable_value()); } bool PackFrom(const ::google::protobuf::Message& message, ::absl::string_view type_url_prefix) { ABSL_DCHECK_NE(&message, this); - return _impl_._any_metadata_.PackFrom(GetArena(), message, type_url_prefix); + return ::google::protobuf::internal::InternalPackFrom( + message, type_url_prefix, mutable_type_url(), + _internal_mutable_value()); } bool UnpackTo(::google::protobuf::Message* message) const { - return _impl_._any_metadata_.UnpackTo(message); + return ::google::protobuf::internal::InternalUnpackTo( + _internal_type_url(), _internal_value(), message); } static bool GetAnyFieldDescriptors( const ::google::protobuf::Message& message, @@ -146,7 +151,8 @@ class PROTOBUF_EXPORT Any final class = typename std::enable_if::value>::type> bool PackFrom(const T& message) { - return _impl_._any_metadata_.PackFrom(GetArena(), message); + return ::google::protobuf::internal::InternalPackFrom( + message, mutable_type_url(), _internal_mutable_value()); } template < typename T, @@ -154,19 +160,22 @@ class PROTOBUF_EXPORT Any final T, const ::google::protobuf::Message&>::value>::type> bool PackFrom(const T& message, ::absl::string_view type_url_prefix) { - return _impl_._any_metadata_.PackFrom(GetArena(), message, type_url_prefix); + return ::google::protobuf::internal::InternalPackFrom( + message, type_url_prefix, mutable_type_url(), + _internal_mutable_value()); } template < typename T, class = typename std::enable_if::value>::type> bool UnpackTo(T* message) const { - return _impl_._any_metadata_.UnpackTo(message); + return ::google::protobuf::internal::InternalUnpackTo( + _internal_type_url(), _internal_value(), message); } template bool Is() const { - return _impl_._any_metadata_.Is(); + return ::google::protobuf::internal::InternalIs(_internal_type_url()); } static bool ParseAnyTypeUrl(::absl::string_view type_url, std::string* full_type_name); @@ -236,7 +245,9 @@ class PROTOBUF_EXPORT Any final void SharedDtor(); void InternalSwap(Any* other); private: - friend class ::google::protobuf::internal::AnyMetadata; + template + friend ::absl::string_view( + ::google::protobuf::internal::GetAnyMessageName)(); static ::absl::string_view FullMessageName() { return "google.protobuf.Any"; } protected: @@ -320,7 +331,6 @@ class PROTOBUF_EXPORT Any final ::google::protobuf::internal::ArenaStringPtr type_url_; ::google::protobuf::internal::ArenaStringPtr value_; ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::internal::AnyMetadata _any_metadata_; PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; diff --git a/src/google/protobuf/api.pb.h b/src/google/protobuf/api.pb.h index 779246729c0bb..bdb42ac2e474e 100644 --- a/src/google/protobuf/api.pb.h +++ b/src/google/protobuf/api.pb.h @@ -40,7 +40,8 @@ namespace google { namespace protobuf { namespace internal { -class AnyMetadata; +template +::absl::string_view GetAnyMessageName(); } // namespace internal } // namespace protobuf } // namespace google @@ -196,7 +197,9 @@ class PROTOBUF_EXPORT Mixin final void SharedDtor(); void InternalSwap(Mixin* other); private: - friend class ::google::protobuf::internal::AnyMetadata; + template + friend ::absl::string_view( + ::google::protobuf::internal::GetAnyMessageName)(); static ::absl::string_view FullMessageName() { return "google.protobuf.Mixin"; } protected: @@ -410,7 +413,9 @@ class PROTOBUF_EXPORT Method final void SharedDtor(); void InternalSwap(Method* other); private: - friend class ::google::protobuf::internal::AnyMetadata; + template + friend ::absl::string_view( + ::google::protobuf::internal::GetAnyMessageName)(); static ::absl::string_view FullMessageName() { return "google.protobuf.Method"; } protected: @@ -697,7 +702,9 @@ class PROTOBUF_EXPORT Api final void SharedDtor(); void InternalSwap(Api* other); private: - friend class ::google::protobuf::internal::AnyMetadata; + template + friend ::absl::string_view( + ::google::protobuf::internal::GetAnyMessageName)(); static ::absl::string_view FullMessageName() { return "google.protobuf.Api"; } protected: diff --git a/src/google/protobuf/duration.pb.h b/src/google/protobuf/duration.pb.h index f5bc59f683025..13bc80648e9ec 100644 --- a/src/google/protobuf/duration.pb.h +++ b/src/google/protobuf/duration.pb.h @@ -38,7 +38,8 @@ namespace google { namespace protobuf { namespace internal { -class AnyMetadata; +template +::absl::string_view GetAnyMessageName(); } // namespace internal } // namespace protobuf } // namespace google @@ -188,7 +189,9 @@ class PROTOBUF_EXPORT Duration final void SharedDtor(); void InternalSwap(Duration* other); private: - friend class ::google::protobuf::internal::AnyMetadata; + template + friend ::absl::string_view( + ::google::protobuf::internal::GetAnyMessageName)(); static ::absl::string_view FullMessageName() { return "google.protobuf.Duration"; } protected: diff --git a/src/google/protobuf/empty.pb.h b/src/google/protobuf/empty.pb.h index 40c0ee255f031..59298974e5350 100644 --- a/src/google/protobuf/empty.pb.h +++ b/src/google/protobuf/empty.pb.h @@ -39,7 +39,8 @@ namespace google { namespace protobuf { namespace internal { -class AnyMetadata; +template +::absl::string_view GetAnyMessageName(); } // namespace internal } // namespace protobuf } // namespace google @@ -160,7 +161,9 @@ class PROTOBUF_EXPORT Empty final return true; } private: - friend class ::google::protobuf::internal::AnyMetadata; + template + friend ::absl::string_view( + ::google::protobuf::internal::GetAnyMessageName)(); static ::absl::string_view FullMessageName() { return "google.protobuf.Empty"; } protected: diff --git a/src/google/protobuf/field_mask.pb.h b/src/google/protobuf/field_mask.pb.h index 6bfd5d08f0aa7..fbc489454c1d5 100644 --- a/src/google/protobuf/field_mask.pb.h +++ b/src/google/protobuf/field_mask.pb.h @@ -38,7 +38,8 @@ namespace google { namespace protobuf { namespace internal { -class AnyMetadata; +template +::absl::string_view GetAnyMessageName(); } // namespace internal } // namespace protobuf } // namespace google @@ -188,7 +189,9 @@ class PROTOBUF_EXPORT FieldMask final void SharedDtor(); void InternalSwap(FieldMask* other); private: - friend class ::google::protobuf::internal::AnyMetadata; + template + friend ::absl::string_view( + ::google::protobuf::internal::GetAnyMessageName)(); static ::absl::string_view FullMessageName() { return "google.protobuf.FieldMask"; } protected: diff --git a/src/google/protobuf/source_context.pb.h b/src/google/protobuf/source_context.pb.h index 5ffdb50bcfa53..0c8223baffafd 100644 --- a/src/google/protobuf/source_context.pb.h +++ b/src/google/protobuf/source_context.pb.h @@ -38,7 +38,8 @@ namespace google { namespace protobuf { namespace internal { -class AnyMetadata; +template +::absl::string_view GetAnyMessageName(); } // namespace internal } // namespace protobuf } // namespace google @@ -188,7 +189,9 @@ class PROTOBUF_EXPORT SourceContext final void SharedDtor(); void InternalSwap(SourceContext* other); private: - friend class ::google::protobuf::internal::AnyMetadata; + template + friend ::absl::string_view( + ::google::protobuf::internal::GetAnyMessageName)(); static ::absl::string_view FullMessageName() { return "google.protobuf.SourceContext"; } protected: diff --git a/src/google/protobuf/struct.pb.h b/src/google/protobuf/struct.pb.h index 110a90eeea29e..30e22161d94ce 100644 --- a/src/google/protobuf/struct.pb.h +++ b/src/google/protobuf/struct.pb.h @@ -42,7 +42,8 @@ namespace google { namespace protobuf { namespace internal { -class AnyMetadata; +template +::absl::string_view GetAnyMessageName(); } // namespace internal } // namespace protobuf } // namespace google @@ -233,7 +234,9 @@ class PROTOBUF_EXPORT ListValue final void SharedDtor(); void InternalSwap(ListValue* other); private: - friend class ::google::protobuf::internal::AnyMetadata; + template + friend ::absl::string_view( + ::google::protobuf::internal::GetAnyMessageName)(); static ::absl::string_view FullMessageName() { return "google.protobuf.ListValue"; } protected: @@ -430,7 +433,9 @@ class PROTOBUF_EXPORT Struct final void SharedDtor(); void InternalSwap(Struct* other); private: - friend class ::google::protobuf::internal::AnyMetadata; + template + friend ::absl::string_view( + ::google::protobuf::internal::GetAnyMessageName)(); static ::absl::string_view FullMessageName() { return "google.protobuf.Struct"; } protected: @@ -676,7 +681,9 @@ class PROTOBUF_EXPORT Value final void SharedDtor(); void InternalSwap(Value* other); private: - friend class ::google::protobuf::internal::AnyMetadata; + template + friend ::absl::string_view( + ::google::protobuf::internal::GetAnyMessageName)(); static ::absl::string_view FullMessageName() { return "google.protobuf.Value"; } protected: diff --git a/src/google/protobuf/timestamp.pb.h b/src/google/protobuf/timestamp.pb.h index 92916535bee29..08cf5c788d799 100644 --- a/src/google/protobuf/timestamp.pb.h +++ b/src/google/protobuf/timestamp.pb.h @@ -38,7 +38,8 @@ namespace google { namespace protobuf { namespace internal { -class AnyMetadata; +template +::absl::string_view GetAnyMessageName(); } // namespace internal } // namespace protobuf } // namespace google @@ -188,7 +189,9 @@ class PROTOBUF_EXPORT Timestamp final void SharedDtor(); void InternalSwap(Timestamp* other); private: - friend class ::google::protobuf::internal::AnyMetadata; + template + friend ::absl::string_view( + ::google::protobuf::internal::GetAnyMessageName)(); static ::absl::string_view FullMessageName() { return "google.protobuf.Timestamp"; } protected: diff --git a/src/google/protobuf/type.pb.h b/src/google/protobuf/type.pb.h index ee8e4332a0631..599857856c39f 100644 --- a/src/google/protobuf/type.pb.h +++ b/src/google/protobuf/type.pb.h @@ -41,7 +41,8 @@ namespace google { namespace protobuf { namespace internal { -class AnyMetadata; +template +::absl::string_view GetAnyMessageName(); } // namespace internal } // namespace protobuf } // namespace google @@ -322,7 +323,9 @@ class PROTOBUF_EXPORT Option final void SharedDtor(); void InternalSwap(Option* other); private: - friend class ::google::protobuf::internal::AnyMetadata; + template + friend ::absl::string_view( + ::google::protobuf::internal::GetAnyMessageName)(); static ::absl::string_view FullMessageName() { return "google.protobuf.Option"; } protected: @@ -536,7 +539,9 @@ class PROTOBUF_EXPORT Field final void SharedDtor(); void InternalSwap(Field* other); private: - friend class ::google::protobuf::internal::AnyMetadata; + template + friend ::absl::string_view( + ::google::protobuf::internal::GetAnyMessageName)(); static ::absl::string_view FullMessageName() { return "google.protobuf.Field"; } protected: @@ -922,7 +927,9 @@ class PROTOBUF_EXPORT EnumValue final void SharedDtor(); void InternalSwap(EnumValue* other); private: - friend class ::google::protobuf::internal::AnyMetadata; + template + friend ::absl::string_view( + ::google::protobuf::internal::GetAnyMessageName)(); static ::absl::string_view FullMessageName() { return "google.protobuf.EnumValue"; } protected: @@ -1149,7 +1156,9 @@ class PROTOBUF_EXPORT Type final void SharedDtor(); void InternalSwap(Type* other); private: - friend class ::google::protobuf::internal::AnyMetadata; + template + friend ::absl::string_view( + ::google::protobuf::internal::GetAnyMessageName)(); static ::absl::string_view FullMessageName() { return "google.protobuf.Type"; } protected: @@ -1455,7 +1464,9 @@ class PROTOBUF_EXPORT Enum final void SharedDtor(); void InternalSwap(Enum* other); private: - friend class ::google::protobuf::internal::AnyMetadata; + template + friend ::absl::string_view( + ::google::protobuf::internal::GetAnyMessageName)(); static ::absl::string_view FullMessageName() { return "google.protobuf.Enum"; } protected: diff --git a/src/google/protobuf/wrappers.pb.h b/src/google/protobuf/wrappers.pb.h index a52796fa35cd6..a26591368dae6 100644 --- a/src/google/protobuf/wrappers.pb.h +++ b/src/google/protobuf/wrappers.pb.h @@ -38,7 +38,8 @@ namespace google { namespace protobuf { namespace internal { -class AnyMetadata; +template +::absl::string_view GetAnyMessageName(); } // namespace internal } // namespace protobuf } // namespace google @@ -212,7 +213,9 @@ class PROTOBUF_EXPORT UInt64Value final void SharedDtor(); void InternalSwap(UInt64Value* other); private: - friend class ::google::protobuf::internal::AnyMetadata; + template + friend ::absl::string_view( + ::google::protobuf::internal::GetAnyMessageName)(); static ::absl::string_view FullMessageName() { return "google.protobuf.UInt64Value"; } protected: @@ -402,7 +405,9 @@ class PROTOBUF_EXPORT UInt32Value final void SharedDtor(); void InternalSwap(UInt32Value* other); private: - friend class ::google::protobuf::internal::AnyMetadata; + template + friend ::absl::string_view( + ::google::protobuf::internal::GetAnyMessageName)(); static ::absl::string_view FullMessageName() { return "google.protobuf.UInt32Value"; } protected: @@ -592,7 +597,9 @@ class PROTOBUF_EXPORT StringValue final void SharedDtor(); void InternalSwap(StringValue* other); private: - friend class ::google::protobuf::internal::AnyMetadata; + template + friend ::absl::string_view( + ::google::protobuf::internal::GetAnyMessageName)(); static ::absl::string_view FullMessageName() { return "google.protobuf.StringValue"; } protected: @@ -788,7 +795,9 @@ class PROTOBUF_EXPORT Int64Value final void SharedDtor(); void InternalSwap(Int64Value* other); private: - friend class ::google::protobuf::internal::AnyMetadata; + template + friend ::absl::string_view( + ::google::protobuf::internal::GetAnyMessageName)(); static ::absl::string_view FullMessageName() { return "google.protobuf.Int64Value"; } protected: @@ -978,7 +987,9 @@ class PROTOBUF_EXPORT Int32Value final void SharedDtor(); void InternalSwap(Int32Value* other); private: - friend class ::google::protobuf::internal::AnyMetadata; + template + friend ::absl::string_view( + ::google::protobuf::internal::GetAnyMessageName)(); static ::absl::string_view FullMessageName() { return "google.protobuf.Int32Value"; } protected: @@ -1168,7 +1179,9 @@ class PROTOBUF_EXPORT FloatValue final void SharedDtor(); void InternalSwap(FloatValue* other); private: - friend class ::google::protobuf::internal::AnyMetadata; + template + friend ::absl::string_view( + ::google::protobuf::internal::GetAnyMessageName)(); static ::absl::string_view FullMessageName() { return "google.protobuf.FloatValue"; } protected: @@ -1358,7 +1371,9 @@ class PROTOBUF_EXPORT DoubleValue final void SharedDtor(); void InternalSwap(DoubleValue* other); private: - friend class ::google::protobuf::internal::AnyMetadata; + template + friend ::absl::string_view( + ::google::protobuf::internal::GetAnyMessageName)(); static ::absl::string_view FullMessageName() { return "google.protobuf.DoubleValue"; } protected: @@ -1548,7 +1563,9 @@ class PROTOBUF_EXPORT BytesValue final void SharedDtor(); void InternalSwap(BytesValue* other); private: - friend class ::google::protobuf::internal::AnyMetadata; + template + friend ::absl::string_view( + ::google::protobuf::internal::GetAnyMessageName)(); static ::absl::string_view FullMessageName() { return "google.protobuf.BytesValue"; } protected: @@ -1744,7 +1761,9 @@ class PROTOBUF_EXPORT BoolValue final void SharedDtor(); void InternalSwap(BoolValue* other); private: - friend class ::google::protobuf::internal::AnyMetadata; + template + friend ::absl::string_view( + ::google::protobuf::internal::GetAnyMessageName)(); static ::absl::string_view FullMessageName() { return "google.protobuf.BoolValue"; } protected: