From 92e81e7cd576e97b489bdc2a37df7f9d40f7ea83 Mon Sep 17 00:00:00 2001 From: Protobuf Team Bot Date: Tue, 6 Jun 2023 16:35:20 -0700 Subject: [PATCH] Automated rollback of commit 026da8ee9a2726996c989b8521687c1320252577. PiperOrigin-RevId: 538323872 --- .../cpp/field_generators/enum_field.cc | 33 +-- .../cpp/field_generators/primitive_field.cc | 29 +-- .../cpp/field_generators/string_field.cc | 53 +++-- src/google/protobuf/compiler/plugin.pb.cc | 20 +- src/google/protobuf/compiler/plugin.pb.h | 35 +-- src/google/protobuf/descriptor.pb.cc | 143 ++++++------ src/google/protobuf/descriptor.pb.h | 212 +++++++++--------- 7 files changed, 283 insertions(+), 242 deletions(-) diff --git a/src/google/protobuf/compiler/cpp/field_generators/enum_field.cc b/src/google/protobuf/compiler/cpp/field_generators/enum_field.cc index 40295554e8..d88f2d08b6 100644 --- a/src/google/protobuf/compiler/cpp/field_generators/enum_field.cc +++ b/src/google/protobuf/compiler/cpp/field_generators/enum_field.cc @@ -258,25 +258,26 @@ class RepeatedEnum : public FieldGeneratorBase { void GenerateClearingCode(io::Printer* p) const override { p->Emit(R"cc( - $field_$.Clear(); + _internal_mutable_$name$()->Clear(); )cc"); } void GenerateMergingCode(io::Printer* p) const override { p->Emit(R"cc( - _this->$field_$.MergeFrom(from.$field_$); + _this->_internal_mutable_$name$()->MergeFrom(from._internal_$name$()); )cc"); } void GenerateSwappingCode(io::Printer* p) const override { p->Emit(R"cc( - $field_$.InternalSwap(&other->$field_$); + _internal_mutable_$name$()->InternalSwap( + other->_internal_mutable_$name$()); )cc"); } void GenerateDestructorCode(io::Printer* p) const override { p->Emit(R"cc( - $field_$.~RepeatedField(); + _internal_mutable_$name$()->~RepeatedField(); )cc"); } @@ -306,7 +307,7 @@ class RepeatedEnum : public FieldGeneratorBase { void GenerateCopyAggregateInitializer(io::Printer* p) const override { p->Emit(R"cc( - decltype($field_$){from.$field_$}, + decltype($field_$){from._internal_$name$()}, )cc"); if (has_cached_size_) { // std::atomic has no copy constructor. @@ -362,29 +363,29 @@ void RepeatedEnum::GenerateInlineAccessorDefinitions(io::Printer* p) const { inline $Enum$ $Msg$::$name$(int index) const { $annotate_get$; // @@protoc_insertion_point(field_get:$pkg.Msg.field$) - return static_cast<$Enum$>($field_$.Get(index)); + return static_cast<$Enum$>(_internal_$name$().Get(index)); } inline void $Msg$::set_$name$(int index, $Enum$ value) { $assert_valid$; - $field_$.Set(index, value); + _internal_mutable_$name$()->Set(index, value); $annotate_set$ // @@protoc_insertion_point(field_set:$pkg.Msg.field$) } inline void $Msg$::add_$name$($Enum$ value) { $assert_valid$; - $field_$.Add(value); + _internal_mutable_$name$()->Add(value); $annotate_add$ // @@protoc_insertion_point(field_add:$pkg.Msg.field$) } inline const $pb$::RepeatedField& $Msg$::$name$() const { $annotate_list$; // @@protoc_insertion_point(field_list:$pkg.Msg.field$) - return $field_$; + return _internal_$name$(); } inline $pb$::RepeatedField* $Msg$::mutable_$name$() { $annotate_mutable_list$; // @@protoc_insertion_point(field_mutable_list:$pkg.Msg.field$) - return &$field_$; + return _internal_mutable_$name$(); } inline const $pb$::RepeatedField& $Msg$::_internal_$name$() const { return $field_$; @@ -402,17 +403,19 @@ void RepeatedEnum::GenerateSerializeWithCachedSizesToArray( { int byte_size = $cached_size_$.Get(); if (byte_size > 0) { - target = stream->WriteEnumPacked($number$, $field_$, byte_size, target); + target = stream->WriteEnumPacked($number$, _internal_$name$(), + byte_size, target); } } )cc"); return; } p->Emit(R"cc( - for (int i = 0, n = this->$field_$.size(); i < n; ++i) { + for (int i = 0, n = this->_internal_$name$_size(); i < n; ++i) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( - $number$, static_cast<$Enum$>(this->$field_$.Get(i)), target); + $number$, static_cast<$Enum$>(this->_internal_$name$().Get(i)), + target); } )cc"); } @@ -442,11 +445,11 @@ void RepeatedEnum::GenerateByteSize(io::Printer* p) const { R"cc( { std::size_t data_size = 0; - auto count = static_cast(this->$field_$.size()); + auto count = static_cast(this->_internal_$name$_size()); for (std::size_t i = 0; i < count; ++i) { data_size += ::_pbi::WireFormatLite::EnumSize( - this->$field_$.Get(static_cast(i))); + this->_internal_$name$().Get(static_cast(i))); } total_size += data_size; $add_to_size$; diff --git a/src/google/protobuf/compiler/cpp/field_generators/primitive_field.cc b/src/google/protobuf/compiler/cpp/field_generators/primitive_field.cc index a81f07d8ad..66d138b059 100644 --- a/src/google/protobuf/compiler/cpp/field_generators/primitive_field.cc +++ b/src/google/protobuf/compiler/cpp/field_generators/primitive_field.cc @@ -315,7 +315,7 @@ class RepeatedPrimitive final : public FieldGeneratorBase { void GenerateClearingCode(io::Printer* p) const override { p->Emit(R"cc( - $field_$.Clear(); + _internal_mutable_$name$()->Clear(); )cc"); } @@ -431,27 +431,27 @@ void RepeatedPrimitive::GenerateInlineAccessorDefinitions( inline $Type$ $Msg$::$name$(int index) const { $annotate_get$; // @@protoc_insertion_point(field_get:$pkg.Msg.field$) - return $field_$.Get(index); + return _internal_$name$().Get(index); } inline void $Msg$::set_$name$(int index, $Type$ value) { $annotate_set$; - $field_$.Set(index, value); + _internal_mutable_$name$()->Set(index, value); // @@protoc_insertion_point(field_set:$pkg.Msg.field$) } inline void $Msg$::add_$name$($Type$ value) { - $field_$.Add(value); + _internal_mutable_$name$()->Add(value); $annotate_add$; // @@protoc_insertion_point(field_add:$pkg.Msg.field$) } inline const $pb$::RepeatedField<$Type$>& $Msg$::$name$() const { $annotate_list$; // @@protoc_insertion_point(field_list:$pkg.Msg.field$) - return $field_$; + return _internal_$name$(); } inline $pb$::RepeatedField<$Type$>* $Msg$::mutable_$name$() { $annotate_mutable_list$; // @@protoc_insertion_point(field_mutable_list:$pkg.Msg.field$) - return &$field_$; + return _internal_mutable_$name$(); } inline const $pb$::RepeatedField<$Type$>& $Msg$::_internal_$name$() const { @@ -467,10 +467,10 @@ void RepeatedPrimitive::GenerateSerializeWithCachedSizesToArray( io::Printer* p) const { if (!field_->is_packed()) { p->Emit(R"cc( - for (int i = 0, n = this->$field_$.size(); i < n; ++i) { + for (int i = 0, n = this->_internal_$name$_size(); i < n; ++i) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::Write$DeclaredType$ToArray( - $number$, this->$field_$.Get(i), target); + $number$, this->_internal_$name$().Get(i), target); } )cc"); return; @@ -478,8 +478,8 @@ void RepeatedPrimitive::GenerateSerializeWithCachedSizesToArray( if (FixedSize(field_->type()).has_value()) { p->Emit(R"cc( - if (this->$field_$.size() > 0) { - target = stream->WriteFixedPacked($number$, $field_$, target); + if (this->_internal_$name$_size() > 0) { + target = stream->WriteFixedPacked($number$, _internal_$name$(), target); } )cc"); return; @@ -489,7 +489,7 @@ void RepeatedPrimitive::GenerateSerializeWithCachedSizesToArray( { int byte_size = $_field_cached_byte_size_$.Get(); if (byte_size > 0) { - target = stream->Write$DeclaredType$Packed($number$, $field_$, + target = stream->Write$DeclaredType$Packed($number$, _internal_$name$(), byte_size, target); } } @@ -505,11 +505,12 @@ void RepeatedPrimitive::GenerateByteSize(io::Printer* p) const { if (fixed_size.has_value()) { p->Emit({{"kFixed", *fixed_size}}, R"cc( std::size_t{$kFixed$} * - ::_pbi::FromIntSize(this->$field_$.size()) + ::_pbi::FromIntSize(this->_internal_$name$_size()) )cc"); } else { p->Emit(R"cc( - ::_pbi::WireFormatLite::$DeclaredType$Size(this->$field_$) + ::_pbi::WireFormatLite::$DeclaredType$Size( + this->_internal_$name$()) )cc"); } }} // Here and below, we need to disable the default ;-chomping @@ -534,7 +535,7 @@ void RepeatedPrimitive::GenerateByteSize(io::Printer* p) const { } else { p->Emit(R"cc( std::size_t{$kTagBytes$} * - ::_pbi::FromIntSize(this->$field_$.size()); + ::_pbi::FromIntSize(this->_internal_$name$_size()); )cc"); } }} diff --git a/src/google/protobuf/compiler/cpp/field_generators/string_field.cc b/src/google/protobuf/compiler/cpp/field_generators/string_field.cc index c0c073e3d2..7beea973dc 100644 --- a/src/google/protobuf/compiler/cpp/field_generators/string_field.cc +++ b/src/google/protobuf/compiler/cpp/field_generators/string_field.cc @@ -710,25 +710,26 @@ class RepeatedString : public FieldGeneratorBase { void GenerateClearingCode(io::Printer* p) const override { p->Emit(R"cc( - $field_$.Clear(); + _internal_mutable_$name$()->Clear(); )cc"); } void GenerateMergingCode(io::Printer* p) const override { p->Emit(R"cc( - _this->$field_$.MergeFrom(from.$field_$); + _this->_internal_mutable_$name$()->MergeFrom(from._internal_$name$()); )cc"); } void GenerateSwappingCode(io::Printer* p) const override { p->Emit(R"cc( - $field_$.InternalSwap(&other->$field_$); + _internal_mutable_$name$()->InternalSwap( + other->_internal_mutable_$name$()); )cc"); } void GenerateDestructorCode(io::Printer* p) const override { p->Emit(R"cc( - $field_$.~RepeatedPtrField(); + _internal_mutable_$name$()->~RepeatedPtrField(); )cc"); } @@ -740,9 +741,10 @@ class RepeatedString : public FieldGeneratorBase { void GenerateByteSize(io::Printer* p) const override { p->Emit(R"cc( - total_size += $kTagBytes$ * $pbi$::FromIntSize($field_$.size()); - for (int i = 0, n = $field_$.size(); i < n; ++i) { - total_size += $pbi$::WireFormatLite::$DeclaredType$Size($field_$.Get(i)); + total_size += $kTagBytes$ * $pbi$::FromIntSize(_internal_$name$().size()); + for (int i = 0, n = _internal_$name$().size(); i < n; ++i) { + total_size += $pbi$::WireFormatLite::$DeclaredType$Size( + _internal_$name$().Get(i)); } )cc"); } @@ -807,7 +809,7 @@ void RepeatedString::GenerateInlineAccessorDefinitions(io::Printer* p) const { }}}, R"cc( inline std::string* $Msg$::add_$name$() { - std::string* _s = $field_$.Add(); + std::string* _s = _internal_mutable_$name$()->Add(); $annotate_add_mutable$; // @@protoc_insertion_point(field_add_mutable:$pkg.Msg.field$) return _s; @@ -815,63 +817,66 @@ void RepeatedString::GenerateInlineAccessorDefinitions(io::Printer* p) const { inline const std::string& $Msg$::$name$(int index) const { $annotate_get$; // @@protoc_insertion_point(field_get:$pkg.Msg.field$) - return $field_$.$Get$(index$GetExtraArg$); + return _internal_$name$().$Get$(index$GetExtraArg$); } inline std::string* $Msg$::mutable_$name$(int index) { $annotate_mutable$; // @@protoc_insertion_point(field_mutable:$pkg.Msg.field$) - return $field_$.Mutable(index); + return _internal_mutable_$name$()->Mutable(index); } inline void $Msg$::set_$name$(int index, const std::string& value) { - $field_$.Mutable(index)->assign(value); + _internal_mutable_$name$()->Mutable(index)->assign(value); $annotate_set$; // @@protoc_insertion_point(field_set:$pkg.Msg.field$) } inline void $Msg$::set_$name$(int index, std::string&& value) { - $field_$.Mutable(index)->assign(std::move(value)); + _internal_mutable_$name$()->Mutable(index)->assign(std::move(value)); $annotate_set$; // @@protoc_insertion_point(field_set:$pkg.Msg.field$) } inline void $Msg$::set_$name$(int index, const char* value) { $DCHK$(value != nullptr); - $field_$.Mutable(index)->assign(value); + _internal_mutable_$name$()->Mutable(index)->assign(value); $annotate_set$; // @@protoc_insertion_point(field_set_char:$pkg.Msg.field$) } inline void $Msg$::set_$name$(int index, const $byte$* value, std::size_t size) { - $field_$.Mutable(index)->assign(reinterpret_cast(value), size); + _internal_mutable_$name$()->Mutable(index)->assign( + reinterpret_cast(value), size); $annotate_set$; // @@protoc_insertion_point(field_set_pointer:$pkg.Msg.field$) } inline void $Msg$::set_$name$(int index, absl::string_view value) { - $field_$.Mutable(index)->assign(value.data(), value.size()); + _internal_mutable_$name$()->Mutable(index)->assign(value.data(), + value.size()); $annotate_set$; // @@protoc_insertion_point(field_set_string_piece:$pkg.Msg.field$) } inline void $Msg$::add_$name$(const std::string& value) { - $field_$.Add()->assign(value); + _internal_mutable_$name$()->Add()->assign(value); $annotate_add$; // @@protoc_insertion_point(field_add:$pkg.Msg.field$) } inline void $Msg$::add_$name$(std::string&& value) { - $field_$.Add(std::move(value)); + _internal_mutable_$name$()->Add(std::move(value)); $annotate_add$; // @@protoc_insertion_point(field_add:$pkg.Msg.field$) } inline void $Msg$::add_$name$(const char* value) { $DCHK$(value != nullptr); - $field_$.Add()->assign(value); + _internal_mutable_$name$()->Add()->assign(value); $annotate_add$; // @@protoc_insertion_point(field_add_char:$pkg.Msg.field$) } inline void $Msg$::add_$name$(const $byte$* value, std::size_t size) { - $field_$.Add()->assign(reinterpret_cast(value), size); + _internal_mutable_$name$()->Add()->assign( + reinterpret_cast(value), size); $annotate_add$; // @@protoc_insertion_point(field_add_pointer:$pkg.Msg.field$) } inline void $Msg$::add_$name$(absl::string_view value) { - $field_$.Add()->assign(value.data(), value.size()); + _internal_mutable_$name$()->Add()->assign(value.data(), value.size()); $annotate_add$; // @@protoc_insertion_point(field_add_string_piece:$pkg.Msg.field$) } @@ -879,12 +884,12 @@ void RepeatedString::GenerateInlineAccessorDefinitions(io::Printer* p) const { $Msg$::$name$() const { $annotate_list$; // @@protoc_insertion_point(field_list:$pkg.Msg.field$) - return $field_$; + return _internal_$name$(); } inline ::$proto_ns$::RepeatedPtrField* $Msg$::mutable_$name$() { $annotate_mutable_list$; // @@protoc_insertion_point(field_mutable_list:$pkg.Msg.field$) - return &$field_$; + return _internal_mutable_$name$(); } inline const ::$proto_ns$::RepeatedPtrField& $Msg$::_internal_$name$() const { @@ -906,8 +911,8 @@ void RepeatedString::GenerateSerializeWithCachedSizesToArray( "s.data(), static_cast(s.length()),"); }}}, R"cc( - for (int i = 0, n = this->$field_$.size(); i < n; ++i) { - const auto& s = this->$field_$.Get(i); + for (int i = 0, n = this->_internal_$name$_size(); i < n; ++i) { + const auto& s = this->_internal_$name$().Get(i); $utf8_check$; target = stream->Write$DeclaredType$($number$, s, target); } diff --git a/src/google/protobuf/compiler/plugin.pb.cc b/src/google/protobuf/compiler/plugin.pb.cc index 07e09f93b8..f7e6a371d5 100644 --- a/src/google/protobuf/compiler/plugin.pb.cc +++ b/src/google/protobuf/compiler/plugin.pb.cc @@ -678,7 +678,7 @@ CodeGeneratorRequest::~CodeGeneratorRequest() { } inline void CodeGeneratorRequest::SharedDtor() { ABSL_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.file_to_generate_.~RepeatedPtrField(); + _internal_mutable_file_to_generate()->~RepeatedPtrField(); _impl_.proto_file_.~RepeatedPtrField(); _impl_.parameter_.Destroy(); if (this != internal_default_instance()) delete _impl_.compiler_version_; @@ -693,7 +693,7 @@ PROTOBUF_NOINLINE void CodeGeneratorRequest::Clear() { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - _impl_.file_to_generate_.Clear(); + _internal_mutable_file_to_generate()->Clear(); _internal_mutable_proto_file()->Clear(); cached_has_bits = _impl_._has_bits_[0]; if (cached_has_bits & 0x00000003u) { @@ -781,8 +781,8 @@ const ::_pbi::TcParseTable<3, 4, 2, 79, 2> CodeGeneratorRequest::_table_ = { (void)cached_has_bits; // repeated string file_to_generate = 1; - for (int i = 0, n = this->_impl_.file_to_generate_.size(); i < n; ++i) { - const auto& s = this->_impl_.file_to_generate_.Get(i); + for (int i = 0, n = this->_internal_file_to_generate_size(); i < n; ++i) { + const auto& s = this->_internal_file_to_generate().Get(i); ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(s.data(), static_cast(s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.compiler.CodeGeneratorRequest.file_to_generate"); target = stream->WriteString(1, s, target); @@ -830,9 +830,10 @@ const ::_pbi::TcParseTable<3, 4, 2, 79, 2> CodeGeneratorRequest::_table_ = { (void) cached_has_bits; // repeated string file_to_generate = 1; - total_size += 1 * ::google::protobuf::internal::FromIntSize(_impl_.file_to_generate_.size()); - for (int i = 0, n = _impl_.file_to_generate_.size(); i < n; ++i) { - total_size += ::google::protobuf::internal::WireFormatLite::StringSize(_impl_.file_to_generate_.Get(i)); + total_size += 1 * ::google::protobuf::internal::FromIntSize(_internal_file_to_generate().size()); + for (int i = 0, n = _internal_file_to_generate().size(); i < n; ++i) { + total_size += ::google::protobuf::internal::WireFormatLite::StringSize( + _internal_file_to_generate().Get(i)); } // repeated .google.protobuf.FileDescriptorProto proto_file = 15; total_size += 1UL * this->_internal_proto_file_size(); @@ -874,7 +875,7 @@ void CodeGeneratorRequest::MergeImpl(::google::protobuf::Message& to_msg, const ::uint32_t cached_has_bits = 0; (void) cached_has_bits; - _this->_impl_.file_to_generate_.MergeFrom(from._impl_.file_to_generate_); + _this->_internal_mutable_file_to_generate()->MergeFrom(from._internal_file_to_generate()); _this->_internal_mutable_proto_file()->MergeFrom(from._internal_proto_file()); cached_has_bits = from._impl_._has_bits_[0]; if (cached_has_bits & 0x00000003u) { @@ -908,7 +909,8 @@ void CodeGeneratorRequest::InternalSwap(CodeGeneratorRequest* other) { auto* rhs_arena = other->GetArenaForAllocation(); _internal_metadata_.InternalSwap(&other->_internal_metadata_); swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - _impl_.file_to_generate_.InternalSwap(&other->_impl_.file_to_generate_); + _internal_mutable_file_to_generate()->InternalSwap( + other->_internal_mutable_file_to_generate()); _internal_mutable_proto_file()->InternalSwap(other->_internal_mutable_proto_file()); ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.parameter_, lhs_arena, &other->_impl_.parameter_, rhs_arena); diff --git a/src/google/protobuf/compiler/plugin.pb.h b/src/google/protobuf/compiler/plugin.pb.h index a2274ae689..153feda757 100644 --- a/src/google/protobuf/compiler/plugin.pb.h +++ b/src/google/protobuf/compiler/plugin.pb.h @@ -1167,72 +1167,75 @@ inline int CodeGeneratorRequest::file_to_generate_size() const { return _internal_file_to_generate_size(); } inline void CodeGeneratorRequest::clear_file_to_generate() { - _impl_.file_to_generate_.Clear(); + _internal_mutable_file_to_generate()->Clear(); } inline std::string* CodeGeneratorRequest::add_file_to_generate() { - std::string* _s = _impl_.file_to_generate_.Add(); + std::string* _s = _internal_mutable_file_to_generate()->Add(); // @@protoc_insertion_point(field_add_mutable:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate) return _s; } inline const std::string& CodeGeneratorRequest::file_to_generate(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate) - return _impl_.file_to_generate_.Get(index); + return _internal_file_to_generate().Get(index); } inline std::string* CodeGeneratorRequest::mutable_file_to_generate(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate) - return _impl_.file_to_generate_.Mutable(index); + return _internal_mutable_file_to_generate()->Mutable(index); } inline void CodeGeneratorRequest::set_file_to_generate(int index, const std::string& value) { - _impl_.file_to_generate_.Mutable(index)->assign(value); + _internal_mutable_file_to_generate()->Mutable(index)->assign(value); // @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate) } inline void CodeGeneratorRequest::set_file_to_generate(int index, std::string&& value) { - _impl_.file_to_generate_.Mutable(index)->assign(std::move(value)); + _internal_mutable_file_to_generate()->Mutable(index)->assign(std::move(value)); // @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate) } inline void CodeGeneratorRequest::set_file_to_generate(int index, const char* value) { ABSL_DCHECK(value != nullptr); - _impl_.file_to_generate_.Mutable(index)->assign(value); + _internal_mutable_file_to_generate()->Mutable(index)->assign(value); // @@protoc_insertion_point(field_set_char:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate) } inline void CodeGeneratorRequest::set_file_to_generate(int index, const char* value, std::size_t size) { - _impl_.file_to_generate_.Mutable(index)->assign(reinterpret_cast(value), size); + _internal_mutable_file_to_generate()->Mutable(index)->assign( + reinterpret_cast(value), size); // @@protoc_insertion_point(field_set_pointer:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate) } inline void CodeGeneratorRequest::set_file_to_generate(int index, absl::string_view value) { - _impl_.file_to_generate_.Mutable(index)->assign(value.data(), value.size()); + _internal_mutable_file_to_generate()->Mutable(index)->assign(value.data(), + value.size()); // @@protoc_insertion_point(field_set_string_piece:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate) } inline void CodeGeneratorRequest::add_file_to_generate(const std::string& value) { - _impl_.file_to_generate_.Add()->assign(value); + _internal_mutable_file_to_generate()->Add()->assign(value); // @@protoc_insertion_point(field_add:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate) } inline void CodeGeneratorRequest::add_file_to_generate(std::string&& value) { - _impl_.file_to_generate_.Add(std::move(value)); + _internal_mutable_file_to_generate()->Add(std::move(value)); // @@protoc_insertion_point(field_add:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate) } inline void CodeGeneratorRequest::add_file_to_generate(const char* value) { ABSL_DCHECK(value != nullptr); - _impl_.file_to_generate_.Add()->assign(value); + _internal_mutable_file_to_generate()->Add()->assign(value); // @@protoc_insertion_point(field_add_char:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate) } inline void CodeGeneratorRequest::add_file_to_generate(const char* value, std::size_t size) { - _impl_.file_to_generate_.Add()->assign(reinterpret_cast(value), size); + _internal_mutable_file_to_generate()->Add()->assign( + reinterpret_cast(value), size); // @@protoc_insertion_point(field_add_pointer:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate) } inline void CodeGeneratorRequest::add_file_to_generate(absl::string_view value) { - _impl_.file_to_generate_.Add()->assign(value.data(), value.size()); + _internal_mutable_file_to_generate()->Add()->assign(value.data(), value.size()); // @@protoc_insertion_point(field_add_string_piece:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate) } inline const ::google::protobuf::RepeatedPtrField& CodeGeneratorRequest::file_to_generate() const { // @@protoc_insertion_point(field_list:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate) - return _impl_.file_to_generate_; + return _internal_file_to_generate(); } inline ::google::protobuf::RepeatedPtrField* CodeGeneratorRequest::mutable_file_to_generate() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate) - return &_impl_.file_to_generate_; + return _internal_mutable_file_to_generate(); } inline const ::google::protobuf::RepeatedPtrField& CodeGeneratorRequest::_internal_file_to_generate() const { diff --git a/src/google/protobuf/descriptor.pb.cc b/src/google/protobuf/descriptor.pb.cc index 2b23948920..1a9ba4e230 100644 --- a/src/google/protobuf/descriptor.pb.cc +++ b/src/google/protobuf/descriptor.pb.cc @@ -2328,7 +2328,7 @@ FileDescriptorProto::~FileDescriptorProto() { } inline void FileDescriptorProto::SharedDtor() { ABSL_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.dependency_.~RepeatedPtrField(); + _internal_mutable_dependency()->~RepeatedPtrField(); _impl_.message_type_.~RepeatedPtrField(); _impl_.enum_type_.~RepeatedPtrField(); _impl_.service_.~RepeatedPtrField(); @@ -2352,13 +2352,13 @@ PROTOBUF_NOINLINE void FileDescriptorProto::Clear() { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - _impl_.dependency_.Clear(); + _internal_mutable_dependency()->Clear(); _internal_mutable_message_type()->Clear(); _internal_mutable_enum_type()->Clear(); _internal_mutable_service()->Clear(); _internal_mutable_extension()->Clear(); - _impl_.public_dependency_.Clear(); - _impl_.weak_dependency_.Clear(); + _internal_mutable_public_dependency()->Clear(); + _internal_mutable_weak_dependency()->Clear(); cached_has_bits = _impl_._has_bits_[0]; if (cached_has_bits & 0x0000003fu) { if (cached_has_bits & 0x00000001u) { @@ -2534,8 +2534,8 @@ constexpr ::_pbi::TcParseTable<4, 13, 6, 86, 2> FileDescriptorProto::_table_ = { } // repeated string dependency = 3; - for (int i = 0, n = this->_impl_.dependency_.size(); i < n; ++i) { - const auto& s = this->_impl_.dependency_.Get(i); + for (int i = 0, n = this->_internal_dependency_size(); i < n; ++i) { + const auto& s = this->_internal_dependency().Get(i); ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(s.data(), static_cast(s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.FileDescriptorProto.dependency"); target = stream->WriteString(3, s, target); @@ -2588,17 +2588,17 @@ constexpr ::_pbi::TcParseTable<4, 13, 6, 86, 2> FileDescriptorProto::_table_ = { } // repeated int32 public_dependency = 10; - for (int i = 0, n = this->_impl_.public_dependency_.size(); i < n; ++i) { + for (int i = 0, n = this->_internal_public_dependency_size(); i < n; ++i) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteInt32ToArray( - 10, this->_impl_.public_dependency_.Get(i), target); + 10, this->_internal_public_dependency().Get(i), target); } // repeated int32 weak_dependency = 11; - for (int i = 0, n = this->_impl_.weak_dependency_.size(); i < n; ++i) { + for (int i = 0, n = this->_internal_weak_dependency_size(); i < n; ++i) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteInt32ToArray( - 11, this->_impl_.weak_dependency_.Get(i), target); + 11, this->_internal_weak_dependency().Get(i), target); } // optional string syntax = 12; @@ -2635,9 +2635,10 @@ constexpr ::_pbi::TcParseTable<4, 13, 6, 86, 2> FileDescriptorProto::_table_ = { (void) cached_has_bits; // repeated string dependency = 3; - total_size += 1 * ::google::protobuf::internal::FromIntSize(_impl_.dependency_.size()); - for (int i = 0, n = _impl_.dependency_.size(); i < n; ++i) { - total_size += ::google::protobuf::internal::WireFormatLite::StringSize(_impl_.dependency_.Get(i)); + total_size += 1 * ::google::protobuf::internal::FromIntSize(_internal_dependency().size()); + for (int i = 0, n = _internal_dependency().size(); i < n; ++i) { + total_size += ::google::protobuf::internal::WireFormatLite::StringSize( + _internal_dependency().Get(i)); } // repeated .google.protobuf.DescriptorProto message_type = 4; total_size += 1UL * this->_internal_message_type_size(); @@ -2665,19 +2666,21 @@ constexpr ::_pbi::TcParseTable<4, 13, 6, 86, 2> FileDescriptorProto::_table_ = { } // repeated int32 public_dependency = 10; { - std::size_t data_size = ::_pbi::WireFormatLite::Int32Size(this->_impl_.public_dependency_) + std::size_t data_size = ::_pbi::WireFormatLite::Int32Size( + this->_internal_public_dependency()) ; std::size_t tag_size = std::size_t{1} * - ::_pbi::FromIntSize(this->_impl_.public_dependency_.size()); + ::_pbi::FromIntSize(this->_internal_public_dependency_size()); ; total_size += tag_size + data_size; } // repeated int32 weak_dependency = 11; { - std::size_t data_size = ::_pbi::WireFormatLite::Int32Size(this->_impl_.weak_dependency_) + std::size_t data_size = ::_pbi::WireFormatLite::Int32Size( + this->_internal_weak_dependency()) ; std::size_t tag_size = std::size_t{1} * - ::_pbi::FromIntSize(this->_impl_.weak_dependency_.size()); + ::_pbi::FromIntSize(this->_internal_weak_dependency_size()); ; total_size += tag_size + data_size; } @@ -2740,7 +2743,7 @@ void FileDescriptorProto::MergeImpl(::google::protobuf::Message& to_msg, const : ::uint32_t cached_has_bits = 0; (void) cached_has_bits; - _this->_impl_.dependency_.MergeFrom(from._impl_.dependency_); + _this->_internal_mutable_dependency()->MergeFrom(from._internal_dependency()); _this->_internal_mutable_message_type()->MergeFrom(from._internal_message_type()); _this->_internal_mutable_enum_type()->MergeFrom(from._internal_enum_type()); _this->_internal_mutable_service()->MergeFrom(from._internal_service()); @@ -2801,7 +2804,8 @@ void FileDescriptorProto::InternalSwap(FileDescriptorProto* other) { auto* rhs_arena = other->GetArenaForAllocation(); _internal_metadata_.InternalSwap(&other->_internal_metadata_); swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - _impl_.dependency_.InternalSwap(&other->_impl_.dependency_); + _internal_mutable_dependency()->InternalSwap( + other->_internal_mutable_dependency()); _internal_mutable_message_type()->InternalSwap(other->_internal_mutable_message_type()); _internal_mutable_enum_type()->InternalSwap(other->_internal_mutable_enum_type()); _internal_mutable_service()->InternalSwap(other->_internal_mutable_service()); @@ -3412,7 +3416,7 @@ inline void DescriptorProto::SharedDtor() { _impl_.extension_.~RepeatedPtrField(); _impl_.oneof_decl_.~RepeatedPtrField(); _impl_.reserved_range_.~RepeatedPtrField(); - _impl_.reserved_name_.~RepeatedPtrField(); + _internal_mutable_reserved_name()->~RepeatedPtrField(); _impl_.name_.Destroy(); if (this != internal_default_instance()) delete _impl_.options_; } @@ -3433,7 +3437,7 @@ PROTOBUF_NOINLINE void DescriptorProto::Clear() { _internal_mutable_extension()->Clear(); _internal_mutable_oneof_decl()->Clear(); _internal_mutable_reserved_range()->Clear(); - _impl_.reserved_name_.Clear(); + _internal_mutable_reserved_name()->Clear(); cached_has_bits = _impl_._has_bits_[0]; if (cached_has_bits & 0x00000003u) { if (cached_has_bits & 0x00000001u) { @@ -3635,8 +3639,8 @@ constexpr ::_pbi::TcParseTable<4, 10, 8, 65, 2> DescriptorProto::_table_ = { } // repeated string reserved_name = 10; - for (int i = 0, n = this->_impl_.reserved_name_.size(); i < n; ++i) { - const auto& s = this->_impl_.reserved_name_.Get(i); + for (int i = 0, n = this->_internal_reserved_name_size(); i < n; ++i) { + const auto& s = this->_internal_reserved_name().Get(i); ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(s.data(), static_cast(s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.DescriptorProto.reserved_name"); target = stream->WriteString(10, s, target); @@ -3702,9 +3706,10 @@ constexpr ::_pbi::TcParseTable<4, 10, 8, 65, 2> DescriptorProto::_table_ = { ::google::protobuf::internal::WireFormatLite::MessageSize(msg); } // repeated string reserved_name = 10; - total_size += 1 * ::google::protobuf::internal::FromIntSize(_impl_.reserved_name_.size()); - for (int i = 0, n = _impl_.reserved_name_.size(); i < n; ++i) { - total_size += ::google::protobuf::internal::WireFormatLite::StringSize(_impl_.reserved_name_.Get(i)); + total_size += 1 * ::google::protobuf::internal::FromIntSize(_internal_reserved_name().size()); + for (int i = 0, n = _internal_reserved_name().size(); i < n; ++i) { + total_size += ::google::protobuf::internal::WireFormatLite::StringSize( + _internal_reserved_name().Get(i)); } cached_has_bits = _impl_._has_bits_[0]; if (cached_has_bits & 0x00000003u) { @@ -3747,7 +3752,7 @@ void DescriptorProto::MergeImpl(::google::protobuf::Message& to_msg, const ::goo _this->_internal_mutable_extension()->MergeFrom(from._internal_extension()); _this->_internal_mutable_oneof_decl()->MergeFrom(from._internal_oneof_decl()); _this->_internal_mutable_reserved_range()->MergeFrom(from._internal_reserved_range()); - _this->_impl_.reserved_name_.MergeFrom(from._impl_.reserved_name_); + _this->_internal_mutable_reserved_name()->MergeFrom(from._internal_reserved_name()); cached_has_bits = from._impl_._has_bits_[0]; if (cached_has_bits & 0x00000003u) { if (cached_has_bits & 0x00000001u) { @@ -3800,7 +3805,8 @@ void DescriptorProto::InternalSwap(DescriptorProto* other) { _internal_mutable_extension()->InternalSwap(other->_internal_mutable_extension()); _internal_mutable_oneof_decl()->InternalSwap(other->_internal_mutable_oneof_decl()); _internal_mutable_reserved_range()->InternalSwap(other->_internal_mutable_reserved_range()); - _impl_.reserved_name_.InternalSwap(&other->_impl_.reserved_name_); + _internal_mutable_reserved_name()->InternalSwap( + other->_internal_mutable_reserved_name()); ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.name_, lhs_arena, &other->_impl_.name_, rhs_arena); swap(_impl_.options_, other->_impl_.options_); @@ -5601,7 +5607,7 @@ inline void EnumDescriptorProto::SharedDtor() { ABSL_DCHECK(GetArenaForAllocation() == nullptr); _impl_.value_.~RepeatedPtrField(); _impl_.reserved_range_.~RepeatedPtrField(); - _impl_.reserved_name_.~RepeatedPtrField(); + _internal_mutable_reserved_name()->~RepeatedPtrField(); _impl_.name_.Destroy(); if (this != internal_default_instance()) delete _impl_.options_; } @@ -5617,7 +5623,7 @@ PROTOBUF_NOINLINE void EnumDescriptorProto::Clear() { _internal_mutable_value()->Clear(); _internal_mutable_reserved_range()->Clear(); - _impl_.reserved_name_.Clear(); + _internal_mutable_reserved_name()->Clear(); cached_has_bits = _impl_._has_bits_[0]; if (cached_has_bits & 0x00000003u) { if (cached_has_bits & 0x00000001u) { @@ -5741,8 +5747,8 @@ constexpr ::_pbi::TcParseTable<3, 5, 3, 61, 2> EnumDescriptorProto::_table_ = { } // repeated string reserved_name = 5; - for (int i = 0, n = this->_impl_.reserved_name_.size(); i < n; ++i) { - const auto& s = this->_impl_.reserved_name_.Get(i); + for (int i = 0, n = this->_internal_reserved_name_size(); i < n; ++i) { + const auto& s = this->_internal_reserved_name().Get(i); ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(s.data(), static_cast(s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.EnumDescriptorProto.reserved_name"); target = stream->WriteString(5, s, target); @@ -5778,9 +5784,10 @@ constexpr ::_pbi::TcParseTable<3, 5, 3, 61, 2> EnumDescriptorProto::_table_ = { ::google::protobuf::internal::WireFormatLite::MessageSize(msg); } // repeated string reserved_name = 5; - total_size += 1 * ::google::protobuf::internal::FromIntSize(_impl_.reserved_name_.size()); - for (int i = 0, n = _impl_.reserved_name_.size(); i < n; ++i) { - total_size += ::google::protobuf::internal::WireFormatLite::StringSize(_impl_.reserved_name_.Get(i)); + total_size += 1 * ::google::protobuf::internal::FromIntSize(_internal_reserved_name().size()); + for (int i = 0, n = _internal_reserved_name().size(); i < n; ++i) { + total_size += ::google::protobuf::internal::WireFormatLite::StringSize( + _internal_reserved_name().Get(i)); } cached_has_bits = _impl_._has_bits_[0]; if (cached_has_bits & 0x00000003u) { @@ -5818,7 +5825,7 @@ void EnumDescriptorProto::MergeImpl(::google::protobuf::Message& to_msg, const : _this->_internal_mutable_value()->MergeFrom(from._internal_value()); _this->_internal_mutable_reserved_range()->MergeFrom(from._internal_reserved_range()); - _this->_impl_.reserved_name_.MergeFrom(from._impl_.reserved_name_); + _this->_internal_mutable_reserved_name()->MergeFrom(from._internal_reserved_name()); cached_has_bits = from._impl_._has_bits_[0]; if (cached_has_bits & 0x00000003u) { if (cached_has_bits & 0x00000001u) { @@ -5856,7 +5863,8 @@ void EnumDescriptorProto::InternalSwap(EnumDescriptorProto* other) { swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); _internal_mutable_value()->InternalSwap(other->_internal_mutable_value()); _internal_mutable_reserved_range()->InternalSwap(other->_internal_mutable_reserved_range()); - _impl_.reserved_name_.InternalSwap(&other->_impl_.reserved_name_); + _internal_mutable_reserved_name()->InternalSwap( + other->_internal_mutable_reserved_name()); ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.name_, lhs_arena, &other->_impl_.name_, rhs_arena); swap(_impl_.options_, other->_impl_.options_); @@ -8235,7 +8243,7 @@ FieldOptions::FieldOptions(const FieldOptions& from) : ::google::protobuf::Messa /*decltype(_impl_._extensions_)*/ {}, decltype(_impl_._has_bits_){from._impl_._has_bits_}, /*decltype(_impl_._cached_size_)*/ {}, - decltype(_impl_.targets_){from._impl_.targets_}, + decltype(_impl_.targets_){from._internal_targets()}, decltype(_impl_.uninterpreted_option_){from._impl_.uninterpreted_option_}, decltype(_impl_.ctype_){}, decltype(_impl_.jstype_){}, @@ -8286,7 +8294,7 @@ FieldOptions::~FieldOptions() { inline void FieldOptions::SharedDtor() { ABSL_DCHECK(GetArenaForAllocation() == nullptr); _impl_._extensions_.~ExtensionSet(); - _impl_.targets_.~RepeatedField(); + _internal_mutable_targets()->~RepeatedField(); _impl_.uninterpreted_option_.~RepeatedPtrField(); } void FieldOptions::SetCachedSize(int size) const { @@ -8300,7 +8308,7 @@ PROTOBUF_NOINLINE void FieldOptions::Clear() { (void) cached_has_bits; _impl_._extensions_.Clear(); - _impl_.targets_.Clear(); + _internal_mutable_targets()->Clear(); _internal_mutable_uninterpreted_option()->Clear(); cached_has_bits = _impl_._has_bits_[0]; if (cached_has_bits & 0x000000ffu) { @@ -8503,10 +8511,11 @@ constexpr ::_pbi::TcParseTable<4, 12, 6, 0, 7> FieldOptions::_table_ = { } // repeated .google.protobuf.FieldOptions.OptionTargetType targets = 19; - for (int i = 0, n = this->_impl_.targets_.size(); i < n; ++i) { + for (int i = 0, n = this->_internal_targets_size(); i < n; ++i) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( - 19, static_cast<::google::protobuf::FieldOptions_OptionTargetType>(this->_impl_.targets_.Get(i)), target); + 19, static_cast<::google::protobuf::FieldOptions_OptionTargetType>(this->_internal_targets().Get(i)), + target); } // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; @@ -8542,11 +8551,11 @@ constexpr ::_pbi::TcParseTable<4, 12, 6, 0, 7> FieldOptions::_table_ = { // repeated .google.protobuf.FieldOptions.OptionTargetType targets = 19; { std::size_t data_size = 0; - auto count = static_cast(this->_impl_.targets_.size()); + auto count = static_cast(this->_internal_targets_size()); for (std::size_t i = 0; i < count; ++i) { data_size += ::_pbi::WireFormatLite::EnumSize( - this->_impl_.targets_.Get(static_cast(i))); + this->_internal_targets().Get(static_cast(i))); } total_size += data_size; total_size += std::size_t{2} * count; @@ -8634,7 +8643,7 @@ void FieldOptions::MergeImpl(::google::protobuf::Message& to_msg, const ::google ::uint32_t cached_has_bits = 0; (void) cached_has_bits; - _this->_impl_.targets_.MergeFrom(from._impl_.targets_); + _this->_internal_mutable_targets()->MergeFrom(from._internal_targets()); _this->_internal_mutable_uninterpreted_option()->MergeFrom(from._internal_uninterpreted_option()); cached_has_bits = from._impl_._has_bits_[0]; if (cached_has_bits & 0x000000ffu) { @@ -8698,7 +8707,8 @@ void FieldOptions::InternalSwap(FieldOptions* other) { _impl_._extensions_.InternalSwap(&other->_impl_._extensions_); _internal_metadata_.InternalSwap(&other->_internal_metadata_); swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - _impl_.targets_.InternalSwap(&other->_impl_.targets_); + _internal_mutable_targets()->InternalSwap( + other->_internal_mutable_targets()); _internal_mutable_uninterpreted_option()->InternalSwap(other->_internal_mutable_uninterpreted_option()); ::google::protobuf::internal::memswap< PROTOBUF_FIELD_OFFSET(FieldOptions, _impl_.target_obsolete_do_not_use_) @@ -10737,7 +10747,7 @@ inline void SourceCodeInfo_Location::SharedDtor() { ABSL_DCHECK(GetArenaForAllocation() == nullptr); _impl_.path_.~RepeatedField(); _impl_.span_.~RepeatedField(); - _impl_.leading_detached_comments_.~RepeatedPtrField(); + _internal_mutable_leading_detached_comments()->~RepeatedPtrField(); _impl_.leading_comments_.Destroy(); _impl_.trailing_comments_.Destroy(); } @@ -10751,9 +10761,9 @@ PROTOBUF_NOINLINE void SourceCodeInfo_Location::Clear() { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - _impl_.path_.Clear(); - _impl_.span_.Clear(); - _impl_.leading_detached_comments_.Clear(); + _internal_mutable_path()->Clear(); + _internal_mutable_span()->Clear(); + _internal_mutable_leading_detached_comments()->Clear(); cached_has_bits = _impl_._has_bits_[0]; if (cached_has_bits & 0x00000003u) { if (cached_has_bits & 0x00000001u) { @@ -10846,7 +10856,7 @@ constexpr ::_pbi::TcParseTable<3, 5, 0, 106, 2> SourceCodeInfo_Location::_table_ { int byte_size = _impl_._path_cached_byte_size_.Get(); if (byte_size > 0) { - target = stream->WriteInt32Packed(1, _impl_.path_, + target = stream->WriteInt32Packed(1, _internal_path(), byte_size, target); } } @@ -10855,7 +10865,7 @@ constexpr ::_pbi::TcParseTable<3, 5, 0, 106, 2> SourceCodeInfo_Location::_table_ { int byte_size = _impl_._span_cached_byte_size_.Get(); if (byte_size > 0) { - target = stream->WriteInt32Packed(2, _impl_.span_, + target = stream->WriteInt32Packed(2, _internal_span(), byte_size, target); } } @@ -10878,8 +10888,8 @@ constexpr ::_pbi::TcParseTable<3, 5, 0, 106, 2> SourceCodeInfo_Location::_table_ } // repeated string leading_detached_comments = 6; - for (int i = 0, n = this->_impl_.leading_detached_comments_.size(); i < n; ++i) { - const auto& s = this->_impl_.leading_detached_comments_.Get(i); + for (int i = 0, n = this->_internal_leading_detached_comments_size(); i < n; ++i) { + const auto& s = this->_internal_leading_detached_comments().Get(i); ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(s.data(), static_cast(s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, "google.protobuf.SourceCodeInfo.Location.leading_detached_comments"); target = stream->WriteString(6, s, target); @@ -10904,7 +10914,8 @@ constexpr ::_pbi::TcParseTable<3, 5, 0, 106, 2> SourceCodeInfo_Location::_table_ // repeated int32 path = 1 [packed = true]; { - std::size_t data_size = ::_pbi::WireFormatLite::Int32Size(this->_impl_.path_) + std::size_t data_size = ::_pbi::WireFormatLite::Int32Size( + this->_internal_path()) ; _impl_._path_cached_byte_size_.Set(::_pbi::ToCachedSize(data_size)); std::size_t tag_size = data_size == 0 @@ -10916,7 +10927,8 @@ constexpr ::_pbi::TcParseTable<3, 5, 0, 106, 2> SourceCodeInfo_Location::_table_ } // repeated int32 span = 2 [packed = true]; { - std::size_t data_size = ::_pbi::WireFormatLite::Int32Size(this->_impl_.span_) + std::size_t data_size = ::_pbi::WireFormatLite::Int32Size( + this->_internal_span()) ; _impl_._span_cached_byte_size_.Set(::_pbi::ToCachedSize(data_size)); std::size_t tag_size = data_size == 0 @@ -10927,9 +10939,10 @@ constexpr ::_pbi::TcParseTable<3, 5, 0, 106, 2> SourceCodeInfo_Location::_table_ total_size += tag_size + data_size; } // repeated string leading_detached_comments = 6; - total_size += 1 * ::google::protobuf::internal::FromIntSize(_impl_.leading_detached_comments_.size()); - for (int i = 0, n = _impl_.leading_detached_comments_.size(); i < n; ++i) { - total_size += ::google::protobuf::internal::WireFormatLite::StringSize(_impl_.leading_detached_comments_.Get(i)); + total_size += 1 * ::google::protobuf::internal::FromIntSize(_internal_leading_detached_comments().size()); + for (int i = 0, n = _internal_leading_detached_comments().size(); i < n; ++i) { + total_size += ::google::protobuf::internal::WireFormatLite::StringSize( + _internal_leading_detached_comments().Get(i)); } cached_has_bits = _impl_._has_bits_[0]; if (cached_has_bits & 0x00000003u) { @@ -10966,7 +10979,7 @@ void SourceCodeInfo_Location::MergeImpl(::google::protobuf::Message& to_msg, con _this->_impl_.path_.MergeFrom(from._impl_.path_); _this->_impl_.span_.MergeFrom(from._impl_.span_); - _this->_impl_.leading_detached_comments_.MergeFrom(from._impl_.leading_detached_comments_); + _this->_internal_mutable_leading_detached_comments()->MergeFrom(from._internal_leading_detached_comments()); cached_has_bits = from._impl_._has_bits_[0]; if (cached_has_bits & 0x00000003u) { if (cached_has_bits & 0x00000001u) { @@ -10998,7 +11011,8 @@ void SourceCodeInfo_Location::InternalSwap(SourceCodeInfo_Location* other) { swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); _impl_.path_.InternalSwap(&other->_impl_.path_); _impl_.span_.InternalSwap(&other->_impl_.span_); - _impl_.leading_detached_comments_.InternalSwap(&other->_impl_.leading_detached_comments_); + _internal_mutable_leading_detached_comments()->InternalSwap( + other->_internal_mutable_leading_detached_comments()); ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.leading_comments_, lhs_arena, &other->_impl_.leading_comments_, rhs_arena); ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.trailing_comments_, lhs_arena, @@ -11272,7 +11286,7 @@ PROTOBUF_NOINLINE void GeneratedCodeInfo_Annotation::Clear() { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - _impl_.path_.Clear(); + _internal_mutable_path()->Clear(); cached_has_bits = _impl_._has_bits_[0]; if (cached_has_bits & 0x00000001u) { _impl_.source_file_.ClearNonDefaultToEmpty(); @@ -11363,7 +11377,7 @@ constexpr ::_pbi::TcParseTable<3, 5, 1, 64, 2> GeneratedCodeInfo_Annotation::_ta { int byte_size = _impl_._path_cached_byte_size_.Get(); if (byte_size > 0) { - target = stream->WriteInt32Packed(1, _impl_.path_, + target = stream->WriteInt32Packed(1, _internal_path(), byte_size, target); } } @@ -11417,7 +11431,8 @@ constexpr ::_pbi::TcParseTable<3, 5, 1, 64, 2> GeneratedCodeInfo_Annotation::_ta // repeated int32 path = 1 [packed = true]; { - std::size_t data_size = ::_pbi::WireFormatLite::Int32Size(this->_impl_.path_) + std::size_t data_size = ::_pbi::WireFormatLite::Int32Size( + this->_internal_path()) ; _impl_._path_cached_byte_size_.Set(::_pbi::ToCachedSize(data_size)); std::size_t tag_size = data_size == 0 diff --git a/src/google/protobuf/descriptor.pb.h b/src/google/protobuf/descriptor.pb.h index 0fd19ca3d9..86382f6ee1 100644 --- a/src/google/protobuf/descriptor.pb.h +++ b/src/google/protobuf/descriptor.pb.h @@ -8849,72 +8849,75 @@ inline int FileDescriptorProto::dependency_size() const { return _internal_dependency_size(); } inline void FileDescriptorProto::clear_dependency() { - _impl_.dependency_.Clear(); + _internal_mutable_dependency()->Clear(); } inline std::string* FileDescriptorProto::add_dependency() { - std::string* _s = _impl_.dependency_.Add(); + std::string* _s = _internal_mutable_dependency()->Add(); // @@protoc_insertion_point(field_add_mutable:google.protobuf.FileDescriptorProto.dependency) return _s; } inline const std::string& FileDescriptorProto::dependency(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.dependency) - return _impl_.dependency_.Get(index); + return _internal_dependency().Get(index); } inline std::string* FileDescriptorProto::mutable_dependency(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.dependency) - return _impl_.dependency_.Mutable(index); + return _internal_mutable_dependency()->Mutable(index); } inline void FileDescriptorProto::set_dependency(int index, const std::string& value) { - _impl_.dependency_.Mutable(index)->assign(value); + _internal_mutable_dependency()->Mutable(index)->assign(value); // @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.dependency) } inline void FileDescriptorProto::set_dependency(int index, std::string&& value) { - _impl_.dependency_.Mutable(index)->assign(std::move(value)); + _internal_mutable_dependency()->Mutable(index)->assign(std::move(value)); // @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.dependency) } inline void FileDescriptorProto::set_dependency(int index, const char* value) { ABSL_DCHECK(value != nullptr); - _impl_.dependency_.Mutable(index)->assign(value); + _internal_mutable_dependency()->Mutable(index)->assign(value); // @@protoc_insertion_point(field_set_char:google.protobuf.FileDescriptorProto.dependency) } inline void FileDescriptorProto::set_dependency(int index, const char* value, std::size_t size) { - _impl_.dependency_.Mutable(index)->assign(reinterpret_cast(value), size); + _internal_mutable_dependency()->Mutable(index)->assign( + reinterpret_cast(value), size); // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileDescriptorProto.dependency) } inline void FileDescriptorProto::set_dependency(int index, absl::string_view value) { - _impl_.dependency_.Mutable(index)->assign(value.data(), value.size()); + _internal_mutable_dependency()->Mutable(index)->assign(value.data(), + value.size()); // @@protoc_insertion_point(field_set_string_piece:google.protobuf.FileDescriptorProto.dependency) } inline void FileDescriptorProto::add_dependency(const std::string& value) { - _impl_.dependency_.Add()->assign(value); + _internal_mutable_dependency()->Add()->assign(value); // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.dependency) } inline void FileDescriptorProto::add_dependency(std::string&& value) { - _impl_.dependency_.Add(std::move(value)); + _internal_mutable_dependency()->Add(std::move(value)); // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.dependency) } inline void FileDescriptorProto::add_dependency(const char* value) { ABSL_DCHECK(value != nullptr); - _impl_.dependency_.Add()->assign(value); + _internal_mutable_dependency()->Add()->assign(value); // @@protoc_insertion_point(field_add_char:google.protobuf.FileDescriptorProto.dependency) } inline void FileDescriptorProto::add_dependency(const char* value, std::size_t size) { - _impl_.dependency_.Add()->assign(reinterpret_cast(value), size); + _internal_mutable_dependency()->Add()->assign( + reinterpret_cast(value), size); // @@protoc_insertion_point(field_add_pointer:google.protobuf.FileDescriptorProto.dependency) } inline void FileDescriptorProto::add_dependency(absl::string_view value) { - _impl_.dependency_.Add()->assign(value.data(), value.size()); + _internal_mutable_dependency()->Add()->assign(value.data(), value.size()); // @@protoc_insertion_point(field_add_string_piece:google.protobuf.FileDescriptorProto.dependency) } inline const ::google::protobuf::RepeatedPtrField& FileDescriptorProto::dependency() const { // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.dependency) - return _impl_.dependency_; + return _internal_dependency(); } inline ::google::protobuf::RepeatedPtrField* FileDescriptorProto::mutable_dependency() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.dependency) - return &_impl_.dependency_; + return _internal_mutable_dependency(); } inline const ::google::protobuf::RepeatedPtrField& FileDescriptorProto::_internal_dependency() const { @@ -8933,27 +8936,27 @@ inline int FileDescriptorProto::public_dependency_size() const { return _internal_public_dependency_size(); } inline void FileDescriptorProto::clear_public_dependency() { - _impl_.public_dependency_.Clear(); + _internal_mutable_public_dependency()->Clear(); } inline ::int32_t FileDescriptorProto::public_dependency(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.public_dependency) - return _impl_.public_dependency_.Get(index); + return _internal_public_dependency().Get(index); } inline void FileDescriptorProto::set_public_dependency(int index, ::int32_t value) { - _impl_.public_dependency_.Set(index, value); + _internal_mutable_public_dependency()->Set(index, value); // @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.public_dependency) } inline void FileDescriptorProto::add_public_dependency(::int32_t value) { - _impl_.public_dependency_.Add(value); + _internal_mutable_public_dependency()->Add(value); // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.public_dependency) } inline const ::google::protobuf::RepeatedField<::int32_t>& FileDescriptorProto::public_dependency() const { // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.public_dependency) - return _impl_.public_dependency_; + return _internal_public_dependency(); } inline ::google::protobuf::RepeatedField<::int32_t>* FileDescriptorProto::mutable_public_dependency() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.public_dependency) - return &_impl_.public_dependency_; + return _internal_mutable_public_dependency(); } inline const ::google::protobuf::RepeatedField<::int32_t>& FileDescriptorProto::_internal_public_dependency() const { @@ -8971,27 +8974,27 @@ inline int FileDescriptorProto::weak_dependency_size() const { return _internal_weak_dependency_size(); } inline void FileDescriptorProto::clear_weak_dependency() { - _impl_.weak_dependency_.Clear(); + _internal_mutable_weak_dependency()->Clear(); } inline ::int32_t FileDescriptorProto::weak_dependency(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.weak_dependency) - return _impl_.weak_dependency_.Get(index); + return _internal_weak_dependency().Get(index); } inline void FileDescriptorProto::set_weak_dependency(int index, ::int32_t value) { - _impl_.weak_dependency_.Set(index, value); + _internal_mutable_weak_dependency()->Set(index, value); // @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.weak_dependency) } inline void FileDescriptorProto::add_weak_dependency(::int32_t value) { - _impl_.weak_dependency_.Add(value); + _internal_mutable_weak_dependency()->Add(value); // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.weak_dependency) } inline const ::google::protobuf::RepeatedField<::int32_t>& FileDescriptorProto::weak_dependency() const { // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.weak_dependency) - return _impl_.weak_dependency_; + return _internal_weak_dependency(); } inline ::google::protobuf::RepeatedField<::int32_t>* FileDescriptorProto::mutable_weak_dependency() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.weak_dependency) - return &_impl_.weak_dependency_; + return _internal_mutable_weak_dependency(); } inline const ::google::protobuf::RepeatedField<::int32_t>& FileDescriptorProto::_internal_weak_dependency() const { @@ -10132,72 +10135,75 @@ inline int DescriptorProto::reserved_name_size() const { return _internal_reserved_name_size(); } inline void DescriptorProto::clear_reserved_name() { - _impl_.reserved_name_.Clear(); + _internal_mutable_reserved_name()->Clear(); } inline std::string* DescriptorProto::add_reserved_name() { - std::string* _s = _impl_.reserved_name_.Add(); + std::string* _s = _internal_mutable_reserved_name()->Add(); // @@protoc_insertion_point(field_add_mutable:google.protobuf.DescriptorProto.reserved_name) return _s; } inline const std::string& DescriptorProto::reserved_name(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.reserved_name) - return _impl_.reserved_name_.Get(index); + return _internal_reserved_name().Get(index); } inline std::string* DescriptorProto::mutable_reserved_name(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.reserved_name) - return _impl_.reserved_name_.Mutable(index); + return _internal_mutable_reserved_name()->Mutable(index); } inline void DescriptorProto::set_reserved_name(int index, const std::string& value) { - _impl_.reserved_name_.Mutable(index)->assign(value); + _internal_mutable_reserved_name()->Mutable(index)->assign(value); // @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.reserved_name) } inline void DescriptorProto::set_reserved_name(int index, std::string&& value) { - _impl_.reserved_name_.Mutable(index)->assign(std::move(value)); + _internal_mutable_reserved_name()->Mutable(index)->assign(std::move(value)); // @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.reserved_name) } inline void DescriptorProto::set_reserved_name(int index, const char* value) { ABSL_DCHECK(value != nullptr); - _impl_.reserved_name_.Mutable(index)->assign(value); + _internal_mutable_reserved_name()->Mutable(index)->assign(value); // @@protoc_insertion_point(field_set_char:google.protobuf.DescriptorProto.reserved_name) } inline void DescriptorProto::set_reserved_name(int index, const char* value, std::size_t size) { - _impl_.reserved_name_.Mutable(index)->assign(reinterpret_cast(value), size); + _internal_mutable_reserved_name()->Mutable(index)->assign( + reinterpret_cast(value), size); // @@protoc_insertion_point(field_set_pointer:google.protobuf.DescriptorProto.reserved_name) } inline void DescriptorProto::set_reserved_name(int index, absl::string_view value) { - _impl_.reserved_name_.Mutable(index)->assign(value.data(), value.size()); + _internal_mutable_reserved_name()->Mutable(index)->assign(value.data(), + value.size()); // @@protoc_insertion_point(field_set_string_piece:google.protobuf.DescriptorProto.reserved_name) } inline void DescriptorProto::add_reserved_name(const std::string& value) { - _impl_.reserved_name_.Add()->assign(value); + _internal_mutable_reserved_name()->Add()->assign(value); // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.reserved_name) } inline void DescriptorProto::add_reserved_name(std::string&& value) { - _impl_.reserved_name_.Add(std::move(value)); + _internal_mutable_reserved_name()->Add(std::move(value)); // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.reserved_name) } inline void DescriptorProto::add_reserved_name(const char* value) { ABSL_DCHECK(value != nullptr); - _impl_.reserved_name_.Add()->assign(value); + _internal_mutable_reserved_name()->Add()->assign(value); // @@protoc_insertion_point(field_add_char:google.protobuf.DescriptorProto.reserved_name) } inline void DescriptorProto::add_reserved_name(const char* value, std::size_t size) { - _impl_.reserved_name_.Add()->assign(reinterpret_cast(value), size); + _internal_mutable_reserved_name()->Add()->assign( + reinterpret_cast(value), size); // @@protoc_insertion_point(field_add_pointer:google.protobuf.DescriptorProto.reserved_name) } inline void DescriptorProto::add_reserved_name(absl::string_view value) { - _impl_.reserved_name_.Add()->assign(value.data(), value.size()); + _internal_mutable_reserved_name()->Add()->assign(value.data(), value.size()); // @@protoc_insertion_point(field_add_string_piece:google.protobuf.DescriptorProto.reserved_name) } inline const ::google::protobuf::RepeatedPtrField& DescriptorProto::reserved_name() const { // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.reserved_name) - return _impl_.reserved_name_; + return _internal_reserved_name(); } inline ::google::protobuf::RepeatedPtrField* DescriptorProto::mutable_reserved_name() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.reserved_name) - return &_impl_.reserved_name_; + return _internal_mutable_reserved_name(); } inline const ::google::protobuf::RepeatedPtrField& DescriptorProto::_internal_reserved_name() const { @@ -11548,72 +11554,75 @@ inline int EnumDescriptorProto::reserved_name_size() const { return _internal_reserved_name_size(); } inline void EnumDescriptorProto::clear_reserved_name() { - _impl_.reserved_name_.Clear(); + _internal_mutable_reserved_name()->Clear(); } inline std::string* EnumDescriptorProto::add_reserved_name() { - std::string* _s = _impl_.reserved_name_.Add(); + std::string* _s = _internal_mutable_reserved_name()->Add(); // @@protoc_insertion_point(field_add_mutable:google.protobuf.EnumDescriptorProto.reserved_name) return _s; } inline const std::string& EnumDescriptorProto::reserved_name(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.EnumDescriptorProto.reserved_name) - return _impl_.reserved_name_.Get(index); + return _internal_reserved_name().Get(index); } inline std::string* EnumDescriptorProto::mutable_reserved_name(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.EnumDescriptorProto.reserved_name) - return _impl_.reserved_name_.Mutable(index); + return _internal_mutable_reserved_name()->Mutable(index); } inline void EnumDescriptorProto::set_reserved_name(int index, const std::string& value) { - _impl_.reserved_name_.Mutable(index)->assign(value); + _internal_mutable_reserved_name()->Mutable(index)->assign(value); // @@protoc_insertion_point(field_set:google.protobuf.EnumDescriptorProto.reserved_name) } inline void EnumDescriptorProto::set_reserved_name(int index, std::string&& value) { - _impl_.reserved_name_.Mutable(index)->assign(std::move(value)); + _internal_mutable_reserved_name()->Mutable(index)->assign(std::move(value)); // @@protoc_insertion_point(field_set:google.protobuf.EnumDescriptorProto.reserved_name) } inline void EnumDescriptorProto::set_reserved_name(int index, const char* value) { ABSL_DCHECK(value != nullptr); - _impl_.reserved_name_.Mutable(index)->assign(value); + _internal_mutable_reserved_name()->Mutable(index)->assign(value); // @@protoc_insertion_point(field_set_char:google.protobuf.EnumDescriptorProto.reserved_name) } inline void EnumDescriptorProto::set_reserved_name(int index, const char* value, std::size_t size) { - _impl_.reserved_name_.Mutable(index)->assign(reinterpret_cast(value), size); + _internal_mutable_reserved_name()->Mutable(index)->assign( + reinterpret_cast(value), size); // @@protoc_insertion_point(field_set_pointer:google.protobuf.EnumDescriptorProto.reserved_name) } inline void EnumDescriptorProto::set_reserved_name(int index, absl::string_view value) { - _impl_.reserved_name_.Mutable(index)->assign(value.data(), value.size()); + _internal_mutable_reserved_name()->Mutable(index)->assign(value.data(), + value.size()); // @@protoc_insertion_point(field_set_string_piece:google.protobuf.EnumDescriptorProto.reserved_name) } inline void EnumDescriptorProto::add_reserved_name(const std::string& value) { - _impl_.reserved_name_.Add()->assign(value); + _internal_mutable_reserved_name()->Add()->assign(value); // @@protoc_insertion_point(field_add:google.protobuf.EnumDescriptorProto.reserved_name) } inline void EnumDescriptorProto::add_reserved_name(std::string&& value) { - _impl_.reserved_name_.Add(std::move(value)); + _internal_mutable_reserved_name()->Add(std::move(value)); // @@protoc_insertion_point(field_add:google.protobuf.EnumDescriptorProto.reserved_name) } inline void EnumDescriptorProto::add_reserved_name(const char* value) { ABSL_DCHECK(value != nullptr); - _impl_.reserved_name_.Add()->assign(value); + _internal_mutable_reserved_name()->Add()->assign(value); // @@protoc_insertion_point(field_add_char:google.protobuf.EnumDescriptorProto.reserved_name) } inline void EnumDescriptorProto::add_reserved_name(const char* value, std::size_t size) { - _impl_.reserved_name_.Add()->assign(reinterpret_cast(value), size); + _internal_mutable_reserved_name()->Add()->assign( + reinterpret_cast(value), size); // @@protoc_insertion_point(field_add_pointer:google.protobuf.EnumDescriptorProto.reserved_name) } inline void EnumDescriptorProto::add_reserved_name(absl::string_view value) { - _impl_.reserved_name_.Add()->assign(value.data(), value.size()); + _internal_mutable_reserved_name()->Add()->assign(value.data(), value.size()); // @@protoc_insertion_point(field_add_string_piece:google.protobuf.EnumDescriptorProto.reserved_name) } inline const ::google::protobuf::RepeatedPtrField& EnumDescriptorProto::reserved_name() const { // @@protoc_insertion_point(field_list:google.protobuf.EnumDescriptorProto.reserved_name) - return _impl_.reserved_name_; + return _internal_reserved_name(); } inline ::google::protobuf::RepeatedPtrField* EnumDescriptorProto::mutable_reserved_name() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.EnumDescriptorProto.reserved_name) - return &_impl_.reserved_name_; + return _internal_mutable_reserved_name(); } inline const ::google::protobuf::RepeatedPtrField& EnumDescriptorProto::_internal_reserved_name() const { @@ -13676,29 +13685,29 @@ inline int FieldOptions::targets_size() const { return _internal_targets_size(); } inline void FieldOptions::clear_targets() { - _impl_.targets_.Clear(); + _internal_mutable_targets()->Clear(); } inline ::google::protobuf::FieldOptions_OptionTargetType FieldOptions::targets(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.targets) - return static_cast<::google::protobuf::FieldOptions_OptionTargetType>(_impl_.targets_.Get(index)); + return static_cast<::google::protobuf::FieldOptions_OptionTargetType>(_internal_targets().Get(index)); } inline void FieldOptions::set_targets(int index, ::google::protobuf::FieldOptions_OptionTargetType value) { assert(::google::protobuf::FieldOptions_OptionTargetType_IsValid(value)); - _impl_.targets_.Set(index, value); + _internal_mutable_targets()->Set(index, value); // @@protoc_insertion_point(field_set:google.protobuf.FieldOptions.targets) } inline void FieldOptions::add_targets(::google::protobuf::FieldOptions_OptionTargetType value) { assert(::google::protobuf::FieldOptions_OptionTargetType_IsValid(value)); - _impl_.targets_.Add(value); + _internal_mutable_targets()->Add(value); // @@protoc_insertion_point(field_add:google.protobuf.FieldOptions.targets) } inline const ::google::protobuf::RepeatedField& FieldOptions::targets() const { // @@protoc_insertion_point(field_list:google.protobuf.FieldOptions.targets) - return _impl_.targets_; + return _internal_targets(); } inline ::google::protobuf::RepeatedField* FieldOptions::mutable_targets() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.FieldOptions.targets) - return &_impl_.targets_; + return _internal_mutable_targets(); } inline const ::google::protobuf::RepeatedField& FieldOptions::_internal_targets() const { return _impl_.targets_; @@ -14620,27 +14629,27 @@ inline int SourceCodeInfo_Location::path_size() const { return _internal_path_size(); } inline void SourceCodeInfo_Location::clear_path() { - _impl_.path_.Clear(); + _internal_mutable_path()->Clear(); } inline ::int32_t SourceCodeInfo_Location::path(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.SourceCodeInfo.Location.path) - return _impl_.path_.Get(index); + return _internal_path().Get(index); } inline void SourceCodeInfo_Location::set_path(int index, ::int32_t value) { - _impl_.path_.Set(index, value); + _internal_mutable_path()->Set(index, value); // @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.path) } inline void SourceCodeInfo_Location::add_path(::int32_t value) { - _impl_.path_.Add(value); + _internal_mutable_path()->Add(value); // @@protoc_insertion_point(field_add:google.protobuf.SourceCodeInfo.Location.path) } inline const ::google::protobuf::RepeatedField<::int32_t>& SourceCodeInfo_Location::path() const { // @@protoc_insertion_point(field_list:google.protobuf.SourceCodeInfo.Location.path) - return _impl_.path_; + return _internal_path(); } inline ::google::protobuf::RepeatedField<::int32_t>* SourceCodeInfo_Location::mutable_path() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.SourceCodeInfo.Location.path) - return &_impl_.path_; + return _internal_mutable_path(); } inline const ::google::protobuf::RepeatedField<::int32_t>& SourceCodeInfo_Location::_internal_path() const { @@ -14658,27 +14667,27 @@ inline int SourceCodeInfo_Location::span_size() const { return _internal_span_size(); } inline void SourceCodeInfo_Location::clear_span() { - _impl_.span_.Clear(); + _internal_mutable_span()->Clear(); } inline ::int32_t SourceCodeInfo_Location::span(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.SourceCodeInfo.Location.span) - return _impl_.span_.Get(index); + return _internal_span().Get(index); } inline void SourceCodeInfo_Location::set_span(int index, ::int32_t value) { - _impl_.span_.Set(index, value); + _internal_mutable_span()->Set(index, value); // @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.span) } inline void SourceCodeInfo_Location::add_span(::int32_t value) { - _impl_.span_.Add(value); + _internal_mutable_span()->Add(value); // @@protoc_insertion_point(field_add:google.protobuf.SourceCodeInfo.Location.span) } inline const ::google::protobuf::RepeatedField<::int32_t>& SourceCodeInfo_Location::span() const { // @@protoc_insertion_point(field_list:google.protobuf.SourceCodeInfo.Location.span) - return _impl_.span_; + return _internal_span(); } inline ::google::protobuf::RepeatedField<::int32_t>* SourceCodeInfo_Location::mutable_span() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.SourceCodeInfo.Location.span) - return &_impl_.span_; + return _internal_mutable_span(); } inline const ::google::protobuf::RepeatedField<::int32_t>& SourceCodeInfo_Location::_internal_span() const { @@ -14822,72 +14831,75 @@ inline int SourceCodeInfo_Location::leading_detached_comments_size() const { return _internal_leading_detached_comments_size(); } inline void SourceCodeInfo_Location::clear_leading_detached_comments() { - _impl_.leading_detached_comments_.Clear(); + _internal_mutable_leading_detached_comments()->Clear(); } inline std::string* SourceCodeInfo_Location::add_leading_detached_comments() { - std::string* _s = _impl_.leading_detached_comments_.Add(); + std::string* _s = _internal_mutable_leading_detached_comments()->Add(); // @@protoc_insertion_point(field_add_mutable:google.protobuf.SourceCodeInfo.Location.leading_detached_comments) return _s; } inline const std::string& SourceCodeInfo_Location::leading_detached_comments(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.SourceCodeInfo.Location.leading_detached_comments) - return _impl_.leading_detached_comments_.Get(index); + return _internal_leading_detached_comments().Get(index); } inline std::string* SourceCodeInfo_Location::mutable_leading_detached_comments(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.SourceCodeInfo.Location.leading_detached_comments) - return _impl_.leading_detached_comments_.Mutable(index); + return _internal_mutable_leading_detached_comments()->Mutable(index); } inline void SourceCodeInfo_Location::set_leading_detached_comments(int index, const std::string& value) { - _impl_.leading_detached_comments_.Mutable(index)->assign(value); + _internal_mutable_leading_detached_comments()->Mutable(index)->assign(value); // @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.leading_detached_comments) } inline void SourceCodeInfo_Location::set_leading_detached_comments(int index, std::string&& value) { - _impl_.leading_detached_comments_.Mutable(index)->assign(std::move(value)); + _internal_mutable_leading_detached_comments()->Mutable(index)->assign(std::move(value)); // @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.leading_detached_comments) } inline void SourceCodeInfo_Location::set_leading_detached_comments(int index, const char* value) { ABSL_DCHECK(value != nullptr); - _impl_.leading_detached_comments_.Mutable(index)->assign(value); + _internal_mutable_leading_detached_comments()->Mutable(index)->assign(value); // @@protoc_insertion_point(field_set_char:google.protobuf.SourceCodeInfo.Location.leading_detached_comments) } inline void SourceCodeInfo_Location::set_leading_detached_comments(int index, const char* value, std::size_t size) { - _impl_.leading_detached_comments_.Mutable(index)->assign(reinterpret_cast(value), size); + _internal_mutable_leading_detached_comments()->Mutable(index)->assign( + reinterpret_cast(value), size); // @@protoc_insertion_point(field_set_pointer:google.protobuf.SourceCodeInfo.Location.leading_detached_comments) } inline void SourceCodeInfo_Location::set_leading_detached_comments(int index, absl::string_view value) { - _impl_.leading_detached_comments_.Mutable(index)->assign(value.data(), value.size()); + _internal_mutable_leading_detached_comments()->Mutable(index)->assign(value.data(), + value.size()); // @@protoc_insertion_point(field_set_string_piece:google.protobuf.SourceCodeInfo.Location.leading_detached_comments) } inline void SourceCodeInfo_Location::add_leading_detached_comments(const std::string& value) { - _impl_.leading_detached_comments_.Add()->assign(value); + _internal_mutable_leading_detached_comments()->Add()->assign(value); // @@protoc_insertion_point(field_add:google.protobuf.SourceCodeInfo.Location.leading_detached_comments) } inline void SourceCodeInfo_Location::add_leading_detached_comments(std::string&& value) { - _impl_.leading_detached_comments_.Add(std::move(value)); + _internal_mutable_leading_detached_comments()->Add(std::move(value)); // @@protoc_insertion_point(field_add:google.protobuf.SourceCodeInfo.Location.leading_detached_comments) } inline void SourceCodeInfo_Location::add_leading_detached_comments(const char* value) { ABSL_DCHECK(value != nullptr); - _impl_.leading_detached_comments_.Add()->assign(value); + _internal_mutable_leading_detached_comments()->Add()->assign(value); // @@protoc_insertion_point(field_add_char:google.protobuf.SourceCodeInfo.Location.leading_detached_comments) } inline void SourceCodeInfo_Location::add_leading_detached_comments(const char* value, std::size_t size) { - _impl_.leading_detached_comments_.Add()->assign(reinterpret_cast(value), size); + _internal_mutable_leading_detached_comments()->Add()->assign( + reinterpret_cast(value), size); // @@protoc_insertion_point(field_add_pointer:google.protobuf.SourceCodeInfo.Location.leading_detached_comments) } inline void SourceCodeInfo_Location::add_leading_detached_comments(absl::string_view value) { - _impl_.leading_detached_comments_.Add()->assign(value.data(), value.size()); + _internal_mutable_leading_detached_comments()->Add()->assign(value.data(), value.size()); // @@protoc_insertion_point(field_add_string_piece:google.protobuf.SourceCodeInfo.Location.leading_detached_comments) } inline const ::google::protobuf::RepeatedPtrField& SourceCodeInfo_Location::leading_detached_comments() const { // @@protoc_insertion_point(field_list:google.protobuf.SourceCodeInfo.Location.leading_detached_comments) - return _impl_.leading_detached_comments_; + return _internal_leading_detached_comments(); } inline ::google::protobuf::RepeatedPtrField* SourceCodeInfo_Location::mutable_leading_detached_comments() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.SourceCodeInfo.Location.leading_detached_comments) - return &_impl_.leading_detached_comments_; + return _internal_mutable_leading_detached_comments(); } inline const ::google::protobuf::RepeatedPtrField& SourceCodeInfo_Location::_internal_leading_detached_comments() const { @@ -14956,27 +14968,27 @@ inline int GeneratedCodeInfo_Annotation::path_size() const { return _internal_path_size(); } inline void GeneratedCodeInfo_Annotation::clear_path() { - _impl_.path_.Clear(); + _internal_mutable_path()->Clear(); } inline ::int32_t GeneratedCodeInfo_Annotation::path(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.GeneratedCodeInfo.Annotation.path) - return _impl_.path_.Get(index); + return _internal_path().Get(index); } inline void GeneratedCodeInfo_Annotation::set_path(int index, ::int32_t value) { - _impl_.path_.Set(index, value); + _internal_mutable_path()->Set(index, value); // @@protoc_insertion_point(field_set:google.protobuf.GeneratedCodeInfo.Annotation.path) } inline void GeneratedCodeInfo_Annotation::add_path(::int32_t value) { - _impl_.path_.Add(value); + _internal_mutable_path()->Add(value); // @@protoc_insertion_point(field_add:google.protobuf.GeneratedCodeInfo.Annotation.path) } inline const ::google::protobuf::RepeatedField<::int32_t>& GeneratedCodeInfo_Annotation::path() const { // @@protoc_insertion_point(field_list:google.protobuf.GeneratedCodeInfo.Annotation.path) - return _impl_.path_; + return _internal_path(); } inline ::google::protobuf::RepeatedField<::int32_t>* GeneratedCodeInfo_Annotation::mutable_path() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.GeneratedCodeInfo.Annotation.path) - return &_impl_.path_; + return _internal_mutable_path(); } inline const ::google::protobuf::RepeatedField<::int32_t>& GeneratedCodeInfo_Annotation::_internal_path() const {