Move generated methods specialized by simple bases to Helpers_.

PiperOrigin-RevId: 967928105
This commit is contained in:
Clayton Knittel 2026-08-20 10:59:07 -07:00 committed by Copybara-Service
parent 03e410d5f7
commit 60a6b5f352
26 changed files with 1568 additions and 1285 deletions

View file

@ -522,7 +522,11 @@ class PROTOBUF_EXPORT PROTOBUF_ALIGNAS(8)
struct Rank1 : Rank0 {};
static void InternalSwap(T* PROTOBUF_NONNULL a, T* PROTOBUF_NONNULL b) {
a->InternalSwap(b);
if constexpr (std::is_base_of_v<MessageLite, T>) {
T::Helpers_::InternalSwap(*a, b);
} else {
a->InternalSwap(b);
}
}
static Arena* PROTOBUF_NULLABLE GetArena(T* PROTOBUF_NONNULL p) {

View file

@ -269,7 +269,7 @@ void CordFieldGenerator::GenerateMergingCode(io::Printer* p) const {
void CordFieldGenerator::GenerateSwappingCode(io::Printer* p) const {
auto v = p->WithVars(variables_);
p->Emit(R"cc(
$field_$.swap(other->$field_$);
this_.$field_$.swap(other->$field_$);
)cc");
}

View file

@ -94,7 +94,7 @@ class SingularEnum : public FieldGeneratorBase {
if (is_oneof()) return;
p->Emit(R"cc(
swap($field_$, other->$field_$);
swap(this_.$field_$, other->$field_$);
)cc");
}
@ -301,7 +301,7 @@ class RepeatedEnum : public FieldGeneratorBase {
void GenerateSwappingCode(io::Printer* p) const override {
ABSL_CHECK(!should_split());
p->Emit(R"cc(
$field_$.InternalSwap(&other->$field_$);
this_.$field_$.InternalSwap(&other->$field_$);
)cc");
}

View file

@ -114,7 +114,7 @@ class Map : public FieldGeneratorBase {
void GenerateSwappingCode(io::Printer* p) const override {
p->Emit(R"cc(
$field_$.InternalSwap(&other->$field_$);
this_.$field_$.InternalSwap(&other->$field_$);
)cc");
}

View file

@ -364,7 +364,9 @@ void SingularMessage::GenerateMergingCode(io::Printer* p) const {
}
void SingularMessage::GenerateSwappingCode(io::Printer* p) const {
p->Emit("swap($field_$, other->$field_$);\n");
p->Emit(R"cc(
swap(this_.$field_$, other->$field_$);
)cc");
}
void SingularMessage::GenerateDestructorCode(io::Printer* p) const {
@ -985,7 +987,7 @@ void RepeatedMessage::GenerateMergingCode(io::Printer* p) const {
void RepeatedMessage::GenerateSwappingCode(io::Printer* p) const {
ABSL_CHECK(!should_split());
p->Emit(R"cc(
$field_$.InternalSwap(&other->$field_$);
this_.$field_$.InternalSwap(&other->$field_$);
)cc");
}

View file

@ -130,7 +130,7 @@ class SingularPrimitive final : public FieldGeneratorBase {
p->Emit(R"cc(
//~ A `using std::swap;` is already present in this function.
swap($field_$, other->$field_$);
swap(this_.$field_$, other->$field_$);
)cc");
}
@ -334,7 +334,7 @@ class RepeatedPrimitive final : public FieldGeneratorBase {
void GenerateSwappingCode(io::Printer* p) const override {
ABSL_CHECK(!should_split());
p->Emit(R"cc(
$field_$.InternalSwap(&other->$field_$);
this_.$field_$.InternalSwap(&other->$field_$);
)cc");
}

View file

@ -533,13 +533,14 @@ void SingularString::GenerateSwappingCode(io::Printer* p) const {
if (!is_inlined()) {
p->Emit(R"cc(
::_pbi::ArenaStringPtr::InternalSwap(&$field_$, &other->$field_$, arena);
::_pbi::ArenaStringPtr::InternalSwap(&this_.$field_$, &other->$field_$,
arena);
)cc");
return;
}
p->Emit(R"cc(
::_pbi::InlinedStringField::InternalSwap(&$field_$, &other->$field_$,
::_pbi::InlinedStringField::InternalSwap(&this_.$field_$, &other->$field_$,
arena);
)cc");
}
@ -719,7 +720,7 @@ class RepeatedString : public FieldGeneratorBase {
void GenerateSwappingCode(io::Printer* p) const override {
ABSL_CHECK(!should_split());
p->Emit(R"cc(
$field_$.InternalSwap(&other->$field_$);
this_.$field_$.InternalSwap(&other->$field_$);
)cc");
}

View file

@ -407,20 +407,20 @@ void SingularStringView::GenerateSwappingCode(io::Printer* p) const {
if (use_micro_string()) {
p->Emit(R"cc(
$field_$.InternalSwap(&other->$field_$);
this_.$field_$.InternalSwap(&other->$field_$);
)cc");
return;
}
if (!is_inlined()) {
p->Emit(R"cc(
$field_$.InternalSwap(&$field_$, &other->$field_$, arena);
this_.$field_$.InternalSwap(&this_.$field_$, &other->$field_$, arena);
)cc");
return;
}
p->Emit(R"cc(
::_pbi::InlinedStringField::InternalSwap(&$field_$, &other->$field_$,
::_pbi::InlinedStringField::InternalSwap(&this_.$field_$, &other->$field_$,
arena);
)cc");
}
@ -610,7 +610,7 @@ class RepeatedStringView : public FieldGeneratorBase {
void GenerateSwappingCode(io::Printer* p) const override {
ABSL_CHECK(!should_split());
p->Emit(R"cc(
$field_$.InternalSwap(&other->$field_$);
this_.$field_$.InternalSwap(&other->$field_$);
)cc");
}

View file

@ -1427,6 +1427,11 @@ void MessageGenerator::GenerateMapEntryClassDefinition(io::Printer* p) {
$decl_annotate$;
class _Internal;
struct Helpers_ : public Super_::Helpers_ {
//~ Declare a single constructor out of line to enable constructor
//~ homing. See go/constructor-homing.
PROTOBUF_NODEBUG Helpers_();
};
const $pbi$::ClassData* $nonnull$ GetClassData() const PROTOBUF_FINAL;
};
@ -1973,21 +1978,29 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* p) {
static constexpr int _kInternalFieldNumber = $field_count$;
)cc");
}},
{"decl_get_cached_size",
[&] {
if (HasSimpleBaseClass(descriptor_, options_)) return;
p->Emit(R"cc(
$nodiscard $PROTOBUF_ALWAYS_INLINE_NODEBUG int GetCachedSize()
const {
return $cached_size$.Get();
}
)cc");
}},
{"maybe_derive_from_simple_base",
HasSimpleBaseClass(descriptor_, options_) ? ": public Super_::Helpers_"
: ""},
{"decl_non_simple_base",
[&] {
if (HasSimpleBaseClass(descriptor_, options_)) return;
p->Emit(
R"cc(
$nodiscard $PROTOBUF_ALWAYS_INLINE_NODEBUG int GetCachedSize()
const {
return $cached_size$.Get();
}
private:
void SharedCtor($pb$::Arena* $nullable$ arena);
static void SharedDtor(MessageLite& self);
void InternalSwap($Msg$* $nonnull$ other);
)cc");
p->Emit(R"cc(
static void SharedCtor(MessageLite& self,
$pb$::Arena* $nullable$ arena);
static void SharedDtor(MessageLite& self);
static void InternalSwap(MessageLite& self, $Msg$* $nonnull$ other);
)cc");
}},
{"arena_dtor",
[&] {
@ -2130,7 +2143,7 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* p) {
//~ the type is statically known
PROTOBUF_ALWAYS_INLINE_NODEBUG void operator delete(
$Msg$* $nonnull$ msg, ::std::destroying_delete_t) {
SharedDtor(*msg);
Helpers_::SharedDtor(*msg);
$pbi$::SizedDelete(msg, sizeof($Msg$));
}
#endif
@ -2153,7 +2166,7 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* p) {
inline $Msg$& operator=($Msg$&& from) noexcept {
if (this == &from) return *this;
if ($pbi$::CanMoveWithInternalSwap(GetArena(), from.GetArena())) {
InternalSwap(&from);
Helpers_::InternalSwap(*this, &from);
} else {
CopyFrom(from);
}
@ -2184,7 +2197,7 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* p) {
inline void Swap($Msg$* $nonnull$ other) {
if (other == this) return;
if ($pbi$::CanUseInternalSwap(GetArena(), other->GetArena())) {
InternalSwap(other);
Helpers_::InternalSwap(*this, other);
} else {
$pbi$::GenericSwap(this, other);
}
@ -2192,7 +2205,7 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* p) {
void UnsafeArenaSwap($Msg$* $nonnull$ other) {
if (other == this) return;
$DCHK$(GetArena() == other->GetArena());
InternalSwap(other);
Helpers_::InternalSwap(*this, other);
}
// implements Message ----------------------------------------------
@ -2203,7 +2216,7 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* p) {
}
$generated_methods$;
$internal_field_number$;
$decl_non_simple_base$;
$decl_get_cached_size$;
private:
static ::absl::string_view FullMessageName() { return "$full_name$"; }
@ -2240,20 +2253,22 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* p) {
//~ Generate private members.
private:
class _Internal;
#if defined(PROTOBUF_CUSTOM_VTABLE)
struct Helpers_ {
struct Helpers_$ maybe_derive_from_simple_base$ {
//~ Declare a single constructor out of line to enable constructor
//~ homing. We don't define this constructor, since it is not
//~ called. See go/constructor-homing.
PROTOBUF_NODEBUG Helpers_();
$decl_non_simple_base$;
#if defined(PROTOBUF_CUSTOM_VTABLE)
static void Clear($pb$::MessageLite& msg);
$nodiscard $static::size_t ByteSizeLong(const $pb$::MessageLite& msg);
$nodiscard $static $uint8$* $nonnull$ _InternalSerialize(
const $pb$::MessageLite& msg, $uint8$* $nonnull$ target,
$pb$::io::EpsCopyOutputStream* $nonnull$ stream);
};
#endif // PROTOBUF_CUSTOM_VTABLE
};
$decl_set_has$;
$decl_oneof_has$;
$alias_parse_table_type$;
@ -2617,7 +2632,7 @@ void MessageGenerator::GenerateZeroInitFields(io::Printer* p) const {
{"Impl", "Impl_"},
{"impl", "_impl_"}},
R"cc(
::memset(reinterpret_cast<char*>(&$impl$) +
::memset(reinterpret_cast<char*>(&this_.$impl$) +
offsetof($Impl$, $first$_),
0,
offsetof($Impl$, $last$_) -
@ -2627,7 +2642,7 @@ void MessageGenerator::GenerateZeroInitFields(io::Printer* p) const {
} else {
p->Emit({{"field_", FieldMemberName(first, false)}},
R"cc(
$field_$ = {};
this_.$field_$ = {};
)cc");
}
first = nullptr;
@ -2782,8 +2797,10 @@ void MessageGenerator::GenerateSharedConstructorCode(io::Printer* p) {
//~
$init_impl$ {}
inline void $Msg$::SharedCtor(::_pb::Arena* $nullable$ arena) {
new (&_impl_) Impl_(internal_visibility(), arena);
inline void $Msg$::Helpers_::SharedCtor(
::_pb::MessageLite& self, ::_pb::Arena* $nullable$ arena) {
$Msg$& this_ = static_cast<$Msg$&>(self);
new (&this_._impl_) Impl_(this_.internal_visibility(), arena);
$zero_init$;
}
)cc");
@ -2842,7 +2859,7 @@ void MessageGenerator::GenerateSharedDestructorCode(io::Printer* p) {
{"impl_dtor", [&] { p->Emit("this_._impl_.~Impl_();\n"); }},
},
R"cc(
inline void $Msg$::SharedDtor(MessageLite& self) {
inline void $Msg$::Helpers_::SharedDtor(MessageLite& self) {
$Msg$& this_ = static_cast<$Msg$&>(self);
$has_bit_consistency$;
this_._internal_metadata_.Delete<$unknown_fields_type$>();
@ -3222,7 +3239,7 @@ void MessageGenerator::GenerateStructors(io::Printer* p) {
{"ctor_body",
[&] {
if (HasSimpleBaseClass(descriptor_, options_)) return;
p->Emit(R"cc(SharedCtor(arena);)cc");
p->Emit(R"cc(Helpers_::SharedCtor(*this, arena);)cc");
switch (NeedsArenaDestructor()) {
case ArenaDtorNeeds::kRequired: {
p->Emit(R"cc(
@ -3297,7 +3314,7 @@ void MessageGenerator::GenerateStructors(io::Printer* p) {
R"cc(
$Msg$::~$Msg$() {
// @@protoc_insertion_point(destructor:$full_name$)
SharedDtor(*this);
Helpers_::SharedDtor(*this);
}
)cc");
}
@ -3618,34 +3635,43 @@ void MessageGenerator::GenerateOneofClear(io::Printer* p) {
void MessageGenerator::GenerateSwap(io::Printer* p) {
if (HasSimpleBaseClass(descriptor_, options_)) return;
Formatter format(p);
format(
"void $Msg$::InternalSwap($Msg$* PROTOBUF_RESTRICT "
"$nonnull$ other) {\n");
format.Indent();
format("using ::std::swap;\n");
format("$WeakDescriptorSelfPin$");
p->Emit(
R"cc(
void $Msg$::Helpers_::InternalSwap(
::_pb::MessageLite& PROTOBUF_RESTRICT self,
$Msg$* PROTOBUF_RESTRICT $nonnull$ other) {
)cc");
p->Indent();
p->Emit(R"cc(
using ::std::swap;
$WeakDescriptorSelfPin$;
$Msg$& this_ = static_cast<$Msg$&>(self);
)cc");
if (HasGeneratedMethods(descriptor_->file(), options_)) {
if (descriptor_->extension_range_count() > 0) {
format(
"$extensions$.InternalSwap(&other->$extensions$);"
"\n");
p->Emit(R"cc(
this_.$extensions$.InternalSwap(&other->$extensions$);
)cc");
}
if (HasNonSplitOptionalString(descriptor_, options_)) {
p->Emit(R"cc(
auto* arena = GetArena();
auto* arena = this_.GetArena();
ABSL_DCHECK_EQ(arena, other->GetArena());
)cc");
}
format("_internal_metadata_.InternalSwap(&other->_internal_metadata_);\n");
p->Emit(R"cc(
this_._internal_metadata_.InternalSwap(&other->_internal_metadata_);
)cc");
if (field_layout_.HasHasbits()) {
for (size_t i = 0; i < static_cast<size_t>(field_layout_.HasBitsSize());
++i) {
format("swap($has_bits$[$1$], other->$has_bits$[$1$]);\n", i);
p->Emit({{"i", i}}, R"cc(
swap(this_.$has_bits$[$i$], other->$has_bits$[$i$]);
)cc");
}
}
@ -3680,13 +3706,13 @@ void MessageGenerator::GenerateSwap(io::Printer* p) {
{"last", last_field_name},
});
format(
"$pbi$::memswap<\n"
" PROTOBUF_FIELD_OFFSET($Msg$, $last$)\n"
" + sizeof($Msg$::$last$)\n"
" - PROTOBUF_FIELD_OFFSET($Msg$, $first$)>(\n"
" reinterpret_cast<char*>(&$first$),\n"
" reinterpret_cast<char*>(&other->$first$));\n");
p->Emit(R"cc(
$pbi$::memswap<PROTOBUF_FIELD_OFFSET($Msg$, $last$) +
sizeof($Msg$::$last$) -
PROTOBUF_FIELD_OFFSET($Msg$, $first$)>(
reinterpret_cast<char*>(&this_.$first$),
reinterpret_cast<char*>(&other->$first$));
)cc");
i += run_length - 1;
// ++i at the top of the loop.
@ -3695,23 +3721,33 @@ void MessageGenerator::GenerateSwap(io::Printer* p) {
}
}
if (ShouldSplit(descriptor_, options_)) {
format("swap($split$, other->$split$);\n");
p->Emit(R"cc(
swap(this_.$split$, other->$split$);
)cc");
}
for (auto oneof : OneOfRange(descriptor_)) {
format("swap(_impl_.$1$_, other->_impl_.$1$_);\n", oneof->name());
p->Emit({{"name", oneof->name()}}, R"cc(
swap(this_._impl_.$name$_, other->_impl_.$name$_);
)cc");
}
for (int i = 0; i < descriptor_->real_oneof_decl_count(); ++i) {
format("swap($oneof_case$[$1$], other->$oneof_case$[$1$]);\n", i);
p->Emit({{"i", i}}, R"cc(
swap(this_.$oneof_case$[$i$], other->$oneof_case$[$i$]);
)cc");
}
} else {
format("GetReflection()->Swap(this, other);");
p->Emit(R"cc(
this_.GetReflection()->Swap(&this_, other);
)cc");
}
format.Outdent();
format("}\n");
p->Outdent();
p->Emit(R"cc(
}
)cc");
}
MessageGenerator::NewOpRequirements MessageGenerator::GetNewOp() const {
@ -3785,8 +3821,7 @@ void MessageGenerator::GenerateNewOp(io::Printer* p) const {
if (new_op.needs_to_run_constructor) {
p->Emit(R"cc(
constexpr auto $Msg$::_Internal::NewImpl() {
return $pbi$::MessageCreator(&$Msg$::_Internal::PlacementNew,
sizeof($Msg$), alignof($Msg$));
return $pbi$::MessageCreator(&PlacementNew, sizeof($Msg$), alignof($Msg$));
}
)cc");
} else {
@ -3857,7 +3892,7 @@ void MessageGenerator::GenerateInternalGenerateClassData(io::Printer* p) {
&$Msg$::MergeImpl,
Super_::GetNewImpl<$Msg$>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
&$Msg$::SharedDtor,
&$Msg$::Helpers_::SharedDtor,
$custom_vtable_methods$,
#endif // PROTOBUF_CUSTOM_VTABLE
PROTOBUF_FIELD_OFFSET($Msg$, $cached_size$),
@ -3878,7 +3913,7 @@ void MessageGenerator::GenerateInternalGenerateClassData(io::Printer* p) {
&$Msg$::MergeImpl,
Super_::GetNewImpl<$Msg$>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
&$Msg$::SharedDtor,
&$Msg$::Helpers_::SharedDtor,
$custom_vtable_methods$,
#endif // PROTOBUF_CUSTOM_VTABLE
PROTOBUF_FIELD_OFFSET($Msg$, $cached_size$),

View file

@ -115,7 +115,7 @@ constexpr auto CSharpFeatures::_Internal::GenerateClassData() {
&CSharpFeatures::MergeImpl,
Super_::GetNewImpl<CSharpFeatures>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
&CSharpFeatures::SharedDtor,
&CSharpFeatures::Helpers_::SharedDtor,
&Helpers_::Clear, &Helpers_::ByteSizeLong,
&Helpers_::_InternalSerialize,
#endif // PROTOBUF_CUSTOM_VTABLE
@ -207,7 +207,7 @@ CSharpFeatures::CSharpFeatures(::google::protobuf::Arena* PROTOBUF_NULLABLE aren
#else // PROTOBUF_CUSTOM_VTABLE
: Super_(arena) {
#endif // PROTOBUF_CUSTOM_VTABLE
SharedCtor(arena);
Helpers_::SharedCtor(*this, arena);
// @@protoc_insertion_point(arena_constructor:pb.CSharpFeatures)
}
CSharpFeatures::CSharpFeatures(
@ -226,15 +226,17 @@ PROTOBUF_NDEBUG_INLINE CSharpFeatures::Impl_::Impl_(
[[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
{}
inline void CSharpFeatures::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
new (&_impl_) Impl_(internal_visibility(), arena);
_impl_.nullable_reference_types_ = {};
inline void CSharpFeatures::Helpers_::SharedCtor(
::_pb::MessageLite& self, ::_pb::Arena* PROTOBUF_NULLABLE arena) {
CSharpFeatures& this_ = static_cast<CSharpFeatures&>(self);
new (&this_._impl_) Impl_(this_.internal_visibility(), arena);
this_._impl_.nullable_reference_types_ = {};
}
CSharpFeatures::~CSharpFeatures() {
// @@protoc_insertion_point(destructor:pb.CSharpFeatures)
SharedDtor(*this);
Helpers_::SharedDtor(*this);
}
inline void CSharpFeatures::SharedDtor(MessageLite& self) {
inline void CSharpFeatures::Helpers_::SharedDtor(MessageLite& self) {
CSharpFeatures& this_ = static_cast<CSharpFeatures&>(self);
if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
this_.CheckHasBitConsistency();
@ -350,11 +352,14 @@ void CSharpFeatures::CopyFrom(const CSharpFeatures& from) {
}
void CSharpFeatures::InternalSwap(CSharpFeatures* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
void CSharpFeatures::Helpers_::InternalSwap(
::_pb::MessageLite& PROTOBUF_RESTRICT self,
CSharpFeatures* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
using ::std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
swap(_impl_.nullable_reference_types_, other->_impl_.nullable_reference_types_);
CSharpFeatures& this_ = static_cast<CSharpFeatures&>(self);
this_._internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(this_._impl_._has_bits_[0], other->_impl_._has_bits_[0]);
swap(this_._impl_.nullable_reference_types_, other->_impl_.nullable_reference_types_);
}
::google::protobuf::Metadata CSharpFeatures::GetMetadata() const {

View file

@ -80,7 +80,7 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED CSharpFeatures final
#if defined(PROTOBUF_CUSTOM_VTABLE)
PROTOBUF_ALWAYS_INLINE_NODEBUG void operator delete(
CSharpFeatures* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) {
SharedDtor(*msg);
Helpers_::SharedDtor(*msg);
::google::protobuf::internal::SizedDelete(msg, sizeof(CSharpFeatures));
}
#endif
@ -101,7 +101,7 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED CSharpFeatures final
inline CSharpFeatures& operator=(CSharpFeatures&& from) noexcept {
if (this == &from) return *this;
if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) {
InternalSwap(&from);
Helpers_::InternalSwap(*this, &from);
} else {
CopyFrom(from);
}
@ -138,7 +138,7 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED CSharpFeatures final
inline void Swap(CSharpFeatures* PROTOBUF_NONNULL other) {
if (other == this) return;
if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) {
InternalSwap(other);
Helpers_::InternalSwap(*this, other);
} else {
::google::protobuf::internal::GenericSwap(this, other);
}
@ -146,7 +146,7 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED CSharpFeatures final
void UnsafeArenaSwap(CSharpFeatures* PROTOBUF_NONNULL other) {
if (other == this) return;
ABSL_DCHECK(GetArena() == other->GetArena());
InternalSwap(other);
Helpers_::InternalSwap(*this, other);
}
// implements Message ----------------------------------------------
@ -197,11 +197,6 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED CSharpFeatures final
return _impl_._cached_size_.Get();
}
private:
void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
static void SharedDtor(MessageLite& self);
void InternalSwap(CSharpFeatures* PROTOBUF_NONNULL other);
private:
static ::absl::string_view FullMessageName() { return "pb.CSharpFeatures"; }
@ -237,17 +232,22 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED CSharpFeatures final
// @@protoc_insertion_point(class_scope:pb.CSharpFeatures)
private:
class _Internal;
#if defined(PROTOBUF_CUSTOM_VTABLE)
struct Helpers_ {
PROTOBUF_NODEBUG Helpers_();
static void SharedCtor(MessageLite& self,
::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
static void SharedDtor(MessageLite& self);
static void InternalSwap(MessageLite& self, CSharpFeatures* PROTOBUF_NONNULL other);
#if defined(PROTOBUF_CUSTOM_VTABLE)
static void Clear(::google::protobuf::MessageLite& msg);
[[nodiscard]] static::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg);
[[nodiscard]] static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize(
const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target,
::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream);
};
#endif // PROTOBUF_CUSTOM_VTABLE
};
using ParseTableT_ =
::google::protobuf::internal::TcParseTable<0, 1,
0, 0,

View file

@ -101,7 +101,7 @@ constexpr auto JavaFeatures_NestInFileClassFeature::_Internal::GenerateClassData
&JavaFeatures_NestInFileClassFeature::MergeImpl,
Super_::GetNewImpl<JavaFeatures_NestInFileClassFeature>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
&JavaFeatures_NestInFileClassFeature::SharedDtor,
&JavaFeatures_NestInFileClassFeature::Helpers_::SharedDtor,
&JavaFeatures_NestInFileClassFeature::Clear, &JavaFeatures_NestInFileClassFeature::ByteSizeLong, &JavaFeatures_NestInFileClassFeature::_InternalSerialize,
#endif // PROTOBUF_CUSTOM_VTABLE
PROTOBUF_FIELD_OFFSET(JavaFeatures_NestInFileClassFeature, _impl_._cached_size_),
@ -244,7 +244,7 @@ constexpr auto JavaFeatures::_Internal::GenerateClassData() {
&JavaFeatures::MergeImpl,
Super_::GetNewImpl<JavaFeatures>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
&JavaFeatures::SharedDtor,
&JavaFeatures::Helpers_::SharedDtor,
&Helpers_::Clear, &Helpers_::ByteSizeLong,
&Helpers_::_InternalSerialize,
#endif // PROTOBUF_CUSTOM_VTABLE
@ -428,7 +428,7 @@ JavaFeatures::JavaFeatures(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#else // PROTOBUF_CUSTOM_VTABLE
: Super_(arena) {
#endif // PROTOBUF_CUSTOM_VTABLE
SharedCtor(arena);
Helpers_::SharedCtor(*this, arena);
// @@protoc_insertion_point(arena_constructor:pb.JavaFeatures)
}
JavaFeatures::JavaFeatures(
@ -447,9 +447,11 @@ PROTOBUF_NDEBUG_INLINE JavaFeatures::Impl_::Impl_(
[[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
{}
inline void JavaFeatures::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
new (&_impl_) Impl_(internal_visibility(), arena);
::memset(reinterpret_cast<char*>(&_impl_) +
inline void JavaFeatures::Helpers_::SharedCtor(
::_pb::MessageLite& self, ::_pb::Arena* PROTOBUF_NULLABLE arena) {
JavaFeatures& this_ = static_cast<JavaFeatures&>(self);
new (&this_._impl_) Impl_(this_.internal_visibility(), arena);
::memset(reinterpret_cast<char*>(&this_._impl_) +
offsetof(Impl_, utf8_validation_),
0,
offsetof(Impl_, nest_in_file_class_) -
@ -458,9 +460,9 @@ inline void JavaFeatures::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
}
JavaFeatures::~JavaFeatures() {
// @@protoc_insertion_point(destructor:pb.JavaFeatures)
SharedDtor(*this);
Helpers_::SharedDtor(*this);
}
inline void JavaFeatures::SharedDtor(MessageLite& self) {
inline void JavaFeatures::Helpers_::SharedDtor(MessageLite& self) {
JavaFeatures& this_ = static_cast<JavaFeatures&>(self);
if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
this_.CheckHasBitConsistency();
@ -638,16 +640,18 @@ void JavaFeatures::CopyFrom(const JavaFeatures& from) {
}
void JavaFeatures::InternalSwap(JavaFeatures* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
void JavaFeatures::Helpers_::InternalSwap(
::_pb::MessageLite& PROTOBUF_RESTRICT self,
JavaFeatures* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
using ::std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
::google::protobuf::internal::memswap<
PROTOBUF_FIELD_OFFSET(JavaFeatures, _impl_.nest_in_file_class_)
+ sizeof(JavaFeatures::_impl_.nest_in_file_class_)
- PROTOBUF_FIELD_OFFSET(JavaFeatures, _impl_.utf8_validation_)>(
reinterpret_cast<char*>(&_impl_.utf8_validation_),
reinterpret_cast<char*>(&other->_impl_.utf8_validation_));
JavaFeatures& this_ = static_cast<JavaFeatures&>(self);
this_._internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(this_._impl_._has_bits_[0], other->_impl_._has_bits_[0]);
::google::protobuf::internal::memswap<PROTOBUF_FIELD_OFFSET(JavaFeatures, _impl_.nest_in_file_class_) +
sizeof(JavaFeatures::_impl_.nest_in_file_class_) -
PROTOBUF_FIELD_OFFSET(JavaFeatures, _impl_.utf8_validation_)>(
reinterpret_cast<char*>(&this_._impl_.utf8_validation_),
reinterpret_cast<char*>(&other->_impl_.utf8_validation_));
}
::google::protobuf::Metadata JavaFeatures::GetMetadata() const {

View file

@ -171,7 +171,7 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED JavaFeatures_NestInFi
#if defined(PROTOBUF_CUSTOM_VTABLE)
PROTOBUF_ALWAYS_INLINE_NODEBUG void operator delete(
JavaFeatures_NestInFileClassFeature* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) {
SharedDtor(*msg);
Helpers_::SharedDtor(*msg);
::google::protobuf::internal::SizedDelete(msg, sizeof(JavaFeatures_NestInFileClassFeature));
}
#endif
@ -192,7 +192,7 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED JavaFeatures_NestInFi
inline JavaFeatures_NestInFileClassFeature& operator=(JavaFeatures_NestInFileClassFeature&& from) noexcept {
if (this == &from) return *this;
if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) {
InternalSwap(&from);
Helpers_::InternalSwap(*this, &from);
} else {
CopyFrom(from);
}
@ -229,7 +229,7 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED JavaFeatures_NestInFi
inline void Swap(JavaFeatures_NestInFileClassFeature* PROTOBUF_NONNULL other) {
if (other == this) return;
if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) {
InternalSwap(other);
Helpers_::InternalSwap(*this, other);
} else {
::google::protobuf::internal::GenericSwap(this, other);
}
@ -237,7 +237,7 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED JavaFeatures_NestInFi
void UnsafeArenaSwap(JavaFeatures_NestInFileClassFeature* PROTOBUF_NONNULL other) {
if (other == this) return;
ABSL_DCHECK(GetArena() == other->GetArena());
InternalSwap(other);
Helpers_::InternalSwap(*this, other);
}
// implements Message ----------------------------------------------
@ -304,17 +304,18 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED JavaFeatures_NestInFi
// @@protoc_insertion_point(class_scope:pb.JavaFeatures.NestInFileClassFeature)
private:
class _Internal;
#if defined(PROTOBUF_CUSTOM_VTABLE)
struct Helpers_ {
struct Helpers_ : public Super_::Helpers_ {
PROTOBUF_NODEBUG Helpers_();
#if defined(PROTOBUF_CUSTOM_VTABLE)
static void Clear(::google::protobuf::MessageLite& msg);
[[nodiscard]] static::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg);
[[nodiscard]] static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize(
const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target,
::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream);
};
#endif // PROTOBUF_CUSTOM_VTABLE
};
using ParseTableT_ =
::google::protobuf::internal::TcParseTable<0, 0,
0, 0,
@ -343,7 +344,7 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED JavaFeatures final :
#if defined(PROTOBUF_CUSTOM_VTABLE)
PROTOBUF_ALWAYS_INLINE_NODEBUG void operator delete(
JavaFeatures* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) {
SharedDtor(*msg);
Helpers_::SharedDtor(*msg);
::google::protobuf::internal::SizedDelete(msg, sizeof(JavaFeatures));
}
#endif
@ -364,7 +365,7 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED JavaFeatures final :
inline JavaFeatures& operator=(JavaFeatures&& from) noexcept {
if (this == &from) return *this;
if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) {
InternalSwap(&from);
Helpers_::InternalSwap(*this, &from);
} else {
CopyFrom(from);
}
@ -401,7 +402,7 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED JavaFeatures final :
inline void Swap(JavaFeatures* PROTOBUF_NONNULL other) {
if (other == this) return;
if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) {
InternalSwap(other);
Helpers_::InternalSwap(*this, other);
} else {
::google::protobuf::internal::GenericSwap(this, other);
}
@ -409,7 +410,7 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED JavaFeatures final :
void UnsafeArenaSwap(JavaFeatures* PROTOBUF_NONNULL other) {
if (other == this) return;
ABSL_DCHECK(GetArena() == other->GetArena());
InternalSwap(other);
Helpers_::InternalSwap(*this, other);
}
// implements Message ----------------------------------------------
@ -460,11 +461,6 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED JavaFeatures final :
return _impl_._cached_size_.Get();
}
private:
void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
static void SharedDtor(MessageLite& self);
void InternalSwap(JavaFeatures* PROTOBUF_NONNULL other);
private:
static ::absl::string_view FullMessageName() { return "pb.JavaFeatures"; }
@ -570,17 +566,22 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED JavaFeatures final :
// @@protoc_insertion_point(class_scope:pb.JavaFeatures)
private:
class _Internal;
#if defined(PROTOBUF_CUSTOM_VTABLE)
struct Helpers_ {
PROTOBUF_NODEBUG Helpers_();
static void SharedCtor(MessageLite& self,
::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
static void SharedDtor(MessageLite& self);
static void InternalSwap(MessageLite& self, JavaFeatures* PROTOBUF_NONNULL other);
#if defined(PROTOBUF_CUSTOM_VTABLE)
static void Clear(::google::protobuf::MessageLite& msg);
[[nodiscard]] static::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg);
[[nodiscard]] static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize(
const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target,
::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream);
};
#endif // PROTOBUF_CUSTOM_VTABLE
};
using ParseTableT_ =
::google::protobuf::internal::TcParseTable<3, 5,
2, 0,

View file

@ -146,7 +146,7 @@ constexpr auto Version::_Internal::GenerateClassData() {
&Version::MergeImpl,
Super_::GetNewImpl<Version>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
&Version::SharedDtor,
&Version::Helpers_::SharedDtor,
&Helpers_::Clear, &Helpers_::ByteSizeLong,
&Helpers_::_InternalSerialize,
#endif // PROTOBUF_CUSTOM_VTABLE
@ -285,7 +285,7 @@ constexpr auto CodeGeneratorResponse_File::_Internal::GenerateClassData() {
&CodeGeneratorResponse_File::MergeImpl,
Super_::GetNewImpl<CodeGeneratorResponse_File>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
&CodeGeneratorResponse_File::SharedDtor,
&CodeGeneratorResponse_File::Helpers_::SharedDtor,
&Helpers_::Clear, &Helpers_::ByteSizeLong,
&Helpers_::_InternalSerialize,
#endif // PROTOBUF_CUSTOM_VTABLE
@ -434,7 +434,7 @@ constexpr auto CodeGeneratorResponse::_Internal::GenerateClassData() {
&CodeGeneratorResponse::MergeImpl,
Super_::GetNewImpl<CodeGeneratorResponse>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
&CodeGeneratorResponse::SharedDtor,
&CodeGeneratorResponse::Helpers_::SharedDtor,
&Helpers_::Clear, &Helpers_::ByteSizeLong,
&Helpers_::_InternalSerialize,
#endif // PROTOBUF_CUSTOM_VTABLE
@ -590,7 +590,7 @@ constexpr auto CodeGeneratorRequest::_Internal::GenerateClassData() {
&CodeGeneratorRequest::MergeImpl,
Super_::GetNewImpl<CodeGeneratorRequest>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
&CodeGeneratorRequest::SharedDtor,
&CodeGeneratorRequest::Helpers_::SharedDtor,
&Helpers_::Clear, &Helpers_::ByteSizeLong,
&Helpers_::_InternalSerialize,
#endif // PROTOBUF_CUSTOM_VTABLE
@ -758,7 +758,7 @@ Version::Version(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#else // PROTOBUF_CUSTOM_VTABLE
: Super_(arena) {
#endif // PROTOBUF_CUSTOM_VTABLE
SharedCtor(arena);
Helpers_::SharedCtor(*this, arena);
// @@protoc_insertion_point(arena_constructor:google.protobuf.compiler.Version)
}
PROTOBUF_NDEBUG_INLINE Version::Impl_::Impl_(
@ -797,9 +797,11 @@ PROTOBUF_NDEBUG_INLINE Version::Impl_::Impl_(
[[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
: suffix_(arena) {}
inline void Version::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
new (&_impl_) Impl_(internal_visibility(), arena);
::memset(reinterpret_cast<char*>(&_impl_) +
inline void Version::Helpers_::SharedCtor(
::_pb::MessageLite& self, ::_pb::Arena* PROTOBUF_NULLABLE arena) {
Version& this_ = static_cast<Version&>(self);
new (&this_._impl_) Impl_(this_.internal_visibility(), arena);
::memset(reinterpret_cast<char*>(&this_._impl_) +
offsetof(Impl_, major_),
0,
offsetof(Impl_, patch_) -
@ -808,9 +810,9 @@ inline void Version::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
}
Version::~Version() {
// @@protoc_insertion_point(destructor:google.protobuf.compiler.Version)
SharedDtor(*this);
Helpers_::SharedDtor(*this);
}
inline void Version::SharedDtor(MessageLite& self) {
inline void Version::Helpers_::SharedDtor(MessageLite& self) {
Version& this_ = static_cast<Version&>(self);
if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
this_.CheckHasBitConsistency();
@ -990,19 +992,22 @@ void Version::CopyFrom(const Version& from) {
}
void Version::InternalSwap(Version* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
void Version::Helpers_::InternalSwap(
::_pb::MessageLite& PROTOBUF_RESTRICT self,
Version* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
using ::std::swap;
auto* arena = GetArena();
Version& this_ = static_cast<Version&>(self);
auto* arena = this_.GetArena();
ABSL_DCHECK_EQ(arena, other->GetArena());
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
::_pbi::ArenaStringPtr::InternalSwap(&_impl_.suffix_, &other->_impl_.suffix_, arena);
::google::protobuf::internal::memswap<
PROTOBUF_FIELD_OFFSET(Version, _impl_.patch_)
+ sizeof(Version::_impl_.patch_)
- PROTOBUF_FIELD_OFFSET(Version, _impl_.major_)>(
reinterpret_cast<char*>(&_impl_.major_),
reinterpret_cast<char*>(&other->_impl_.major_));
this_._internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(this_._impl_._has_bits_[0], other->_impl_._has_bits_[0]);
::_pbi::ArenaStringPtr::InternalSwap(&this_._impl_.suffix_, &other->_impl_.suffix_,
arena);
::google::protobuf::internal::memswap<PROTOBUF_FIELD_OFFSET(Version, _impl_.patch_) +
sizeof(Version::_impl_.patch_) -
PROTOBUF_FIELD_OFFSET(Version, _impl_.major_)>(
reinterpret_cast<char*>(&this_._impl_.major_),
reinterpret_cast<char*>(&other->_impl_.major_));
}
::google::protobuf::Metadata Version::GetMetadata() const {
@ -1026,7 +1031,7 @@ CodeGeneratorRequest::CodeGeneratorRequest(::google::protobuf::Arena* PROTOBUF_N
#else // PROTOBUF_CUSTOM_VTABLE
: Super_(arena) {
#endif // PROTOBUF_CUSTOM_VTABLE
SharedCtor(arena);
Helpers_::SharedCtor(*this, arena);
// @@protoc_insertion_point(arena_constructor:google.protobuf.compiler.CodeGeneratorRequest)
}
PROTOBUF_NDEBUG_INLINE CodeGeneratorRequest::Impl_::Impl_(
@ -1098,15 +1103,17 @@ PROTOBUF_NDEBUG_INLINE CodeGeneratorRequest::Impl_::Impl_(
}
{}
inline void CodeGeneratorRequest::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
new (&_impl_) Impl_(internal_visibility(), arena);
_impl_.compiler_version_ = {};
inline void CodeGeneratorRequest::Helpers_::SharedCtor(
::_pb::MessageLite& self, ::_pb::Arena* PROTOBUF_NULLABLE arena) {
CodeGeneratorRequest& this_ = static_cast<CodeGeneratorRequest&>(self);
new (&this_._impl_) Impl_(this_.internal_visibility(), arena);
this_._impl_.compiler_version_ = {};
}
CodeGeneratorRequest::~CodeGeneratorRequest() {
// @@protoc_insertion_point(destructor:google.protobuf.compiler.CodeGeneratorRequest)
SharedDtor(*this);
Helpers_::SharedDtor(*this);
}
inline void CodeGeneratorRequest::SharedDtor(MessageLite& self) {
inline void CodeGeneratorRequest::Helpers_::SharedDtor(MessageLite& self) {
CodeGeneratorRequest& this_ = static_cast<CodeGeneratorRequest&>(self);
if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
this_.CheckHasBitConsistency();
@ -1350,17 +1357,21 @@ PROTOBUF_NOINLINE bool CodeGeneratorRequest::IsInitializedImpl(
return true;
}
void CodeGeneratorRequest::InternalSwap(CodeGeneratorRequest* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
void CodeGeneratorRequest::Helpers_::InternalSwap(
::_pb::MessageLite& PROTOBUF_RESTRICT self,
CodeGeneratorRequest* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
using ::std::swap;
auto* arena = GetArena();
CodeGeneratorRequest& this_ = static_cast<CodeGeneratorRequest&>(self);
auto* arena = this_.GetArena();
ABSL_DCHECK_EQ(arena, other->GetArena());
_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_);
_impl_.proto_file_.InternalSwap(&other->_impl_.proto_file_);
::_pbi::ArenaStringPtr::InternalSwap(&_impl_.parameter_, &other->_impl_.parameter_, arena);
swap(_impl_.compiler_version_, other->_impl_.compiler_version_);
_impl_.source_file_descriptors_.InternalSwap(&other->_impl_.source_file_descriptors_);
this_._internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(this_._impl_._has_bits_[0], other->_impl_._has_bits_[0]);
this_._impl_.file_to_generate_.InternalSwap(&other->_impl_.file_to_generate_);
this_._impl_.proto_file_.InternalSwap(&other->_impl_.proto_file_);
::_pbi::ArenaStringPtr::InternalSwap(&this_._impl_.parameter_, &other->_impl_.parameter_,
arena);
swap(this_._impl_.compiler_version_, other->_impl_.compiler_version_);
this_._impl_.source_file_descriptors_.InternalSwap(&other->_impl_.source_file_descriptors_);
}
::google::protobuf::Metadata CodeGeneratorRequest::GetMetadata() const {
@ -1379,7 +1390,7 @@ CodeGeneratorResponse_File::CodeGeneratorResponse_File(::google::protobuf::Arena
#else // PROTOBUF_CUSTOM_VTABLE
: Super_(arena) {
#endif // PROTOBUF_CUSTOM_VTABLE
SharedCtor(arena);
Helpers_::SharedCtor(*this, arena);
// @@protoc_insertion_point(arena_constructor:google.protobuf.compiler.CodeGeneratorResponse.File)
}
PROTOBUF_NDEBUG_INLINE CodeGeneratorResponse_File::Impl_::Impl_(
@ -1419,15 +1430,17 @@ PROTOBUF_NDEBUG_INLINE CodeGeneratorResponse_File::Impl_::Impl_(
insertion_point_(arena),
content_(arena) {}
inline void CodeGeneratorResponse_File::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
new (&_impl_) Impl_(internal_visibility(), arena);
_impl_.generated_code_info_ = {};
inline void CodeGeneratorResponse_File::Helpers_::SharedCtor(
::_pb::MessageLite& self, ::_pb::Arena* PROTOBUF_NULLABLE arena) {
CodeGeneratorResponse_File& this_ = static_cast<CodeGeneratorResponse_File&>(self);
new (&this_._impl_) Impl_(this_.internal_visibility(), arena);
this_._impl_.generated_code_info_ = {};
}
CodeGeneratorResponse_File::~CodeGeneratorResponse_File() {
// @@protoc_insertion_point(destructor:google.protobuf.compiler.CodeGeneratorResponse.File)
SharedDtor(*this);
Helpers_::SharedDtor(*this);
}
inline void CodeGeneratorResponse_File::SharedDtor(MessageLite& self) {
inline void CodeGeneratorResponse_File::Helpers_::SharedDtor(MessageLite& self) {
CodeGeneratorResponse_File& this_ = static_cast<CodeGeneratorResponse_File&>(self);
if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
this_.CheckHasBitConsistency();
@ -1619,16 +1632,22 @@ void CodeGeneratorResponse_File::CopyFrom(const CodeGeneratorResponse_File& from
}
void CodeGeneratorResponse_File::InternalSwap(CodeGeneratorResponse_File* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
void CodeGeneratorResponse_File::Helpers_::InternalSwap(
::_pb::MessageLite& PROTOBUF_RESTRICT self,
CodeGeneratorResponse_File* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
using ::std::swap;
auto* arena = GetArena();
CodeGeneratorResponse_File& this_ = static_cast<CodeGeneratorResponse_File&>(self);
auto* arena = this_.GetArena();
ABSL_DCHECK_EQ(arena, other->GetArena());
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
::_pbi::ArenaStringPtr::InternalSwap(&_impl_.name_, &other->_impl_.name_, arena);
::_pbi::ArenaStringPtr::InternalSwap(&_impl_.insertion_point_, &other->_impl_.insertion_point_, arena);
::_pbi::ArenaStringPtr::InternalSwap(&_impl_.content_, &other->_impl_.content_, arena);
swap(_impl_.generated_code_info_, other->_impl_.generated_code_info_);
this_._internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(this_._impl_._has_bits_[0], other->_impl_._has_bits_[0]);
::_pbi::ArenaStringPtr::InternalSwap(&this_._impl_.name_, &other->_impl_.name_,
arena);
::_pbi::ArenaStringPtr::InternalSwap(&this_._impl_.insertion_point_, &other->_impl_.insertion_point_,
arena);
::_pbi::ArenaStringPtr::InternalSwap(&this_._impl_.content_, &other->_impl_.content_,
arena);
swap(this_._impl_.generated_code_info_, other->_impl_.generated_code_info_);
}
::google::protobuf::Metadata CodeGeneratorResponse_File::GetMetadata() const {
@ -1642,7 +1661,7 @@ CodeGeneratorResponse::CodeGeneratorResponse(::google::protobuf::Arena* PROTOBUF
#else // PROTOBUF_CUSTOM_VTABLE
: Super_(arena) {
#endif // PROTOBUF_CUSTOM_VTABLE
SharedCtor(arena);
Helpers_::SharedCtor(*this, arena);
// @@protoc_insertion_point(arena_constructor:google.protobuf.compiler.CodeGeneratorResponse)
}
PROTOBUF_NDEBUG_INLINE CodeGeneratorResponse::Impl_::Impl_(
@ -1693,9 +1712,11 @@ PROTOBUF_NDEBUG_INLINE CodeGeneratorResponse::Impl_::Impl_(
,
error_(arena) {}
inline void CodeGeneratorResponse::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
new (&_impl_) Impl_(internal_visibility(), arena);
::memset(reinterpret_cast<char*>(&_impl_) +
inline void CodeGeneratorResponse::Helpers_::SharedCtor(
::_pb::MessageLite& self, ::_pb::Arena* PROTOBUF_NULLABLE arena) {
CodeGeneratorResponse& this_ = static_cast<CodeGeneratorResponse&>(self);
new (&this_._impl_) Impl_(this_.internal_visibility(), arena);
::memset(reinterpret_cast<char*>(&this_._impl_) +
offsetof(Impl_, supported_features_),
0,
offsetof(Impl_, maximum_edition_) -
@ -1704,9 +1725,9 @@ inline void CodeGeneratorResponse::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE ar
}
CodeGeneratorResponse::~CodeGeneratorResponse() {
// @@protoc_insertion_point(destructor:google.protobuf.compiler.CodeGeneratorResponse)
SharedDtor(*this);
Helpers_::SharedDtor(*this);
}
inline void CodeGeneratorResponse::SharedDtor(MessageLite& self) {
inline void CodeGeneratorResponse::Helpers_::SharedDtor(MessageLite& self) {
CodeGeneratorResponse& this_ = static_cast<CodeGeneratorResponse&>(self);
if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
this_.CheckHasBitConsistency();
@ -1916,20 +1937,23 @@ void CodeGeneratorResponse::CopyFrom(const CodeGeneratorResponse& from) {
}
void CodeGeneratorResponse::InternalSwap(CodeGeneratorResponse* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
void CodeGeneratorResponse::Helpers_::InternalSwap(
::_pb::MessageLite& PROTOBUF_RESTRICT self,
CodeGeneratorResponse* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
using ::std::swap;
auto* arena = GetArena();
CodeGeneratorResponse& this_ = static_cast<CodeGeneratorResponse&>(self);
auto* arena = this_.GetArena();
ABSL_DCHECK_EQ(arena, other->GetArena());
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
_impl_.file_.InternalSwap(&other->_impl_.file_);
::_pbi::ArenaStringPtr::InternalSwap(&_impl_.error_, &other->_impl_.error_, arena);
::google::protobuf::internal::memswap<
PROTOBUF_FIELD_OFFSET(CodeGeneratorResponse, _impl_.maximum_edition_)
+ sizeof(CodeGeneratorResponse::_impl_.maximum_edition_)
- PROTOBUF_FIELD_OFFSET(CodeGeneratorResponse, _impl_.supported_features_)>(
reinterpret_cast<char*>(&_impl_.supported_features_),
reinterpret_cast<char*>(&other->_impl_.supported_features_));
this_._internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(this_._impl_._has_bits_[0], other->_impl_._has_bits_[0]);
this_._impl_.file_.InternalSwap(&other->_impl_.file_);
::_pbi::ArenaStringPtr::InternalSwap(&this_._impl_.error_, &other->_impl_.error_,
arena);
::google::protobuf::internal::memswap<PROTOBUF_FIELD_OFFSET(CodeGeneratorResponse, _impl_.maximum_edition_) +
sizeof(CodeGeneratorResponse::_impl_.maximum_edition_) -
PROTOBUF_FIELD_OFFSET(CodeGeneratorResponse, _impl_.supported_features_)>(
reinterpret_cast<char*>(&this_._impl_.supported_features_),
reinterpret_cast<char*>(&other->_impl_.supported_features_));
}
::google::protobuf::Metadata CodeGeneratorResponse::GetMetadata() const {

View file

@ -135,7 +135,7 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED Version final : publi
#if defined(PROTOBUF_CUSTOM_VTABLE)
PROTOBUF_ALWAYS_INLINE_NODEBUG void operator delete(
Version* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) {
SharedDtor(*msg);
Helpers_::SharedDtor(*msg);
::google::protobuf::internal::SizedDelete(msg, sizeof(Version));
}
#endif
@ -156,7 +156,7 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED Version final : publi
inline Version& operator=(Version&& from) noexcept {
if (this == &from) return *this;
if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) {
InternalSwap(&from);
Helpers_::InternalSwap(*this, &from);
} else {
CopyFrom(from);
}
@ -193,7 +193,7 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED Version final : publi
inline void Swap(Version* PROTOBUF_NONNULL other) {
if (other == this) return;
if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) {
InternalSwap(other);
Helpers_::InternalSwap(*this, other);
} else {
::google::protobuf::internal::GenericSwap(this, other);
}
@ -201,7 +201,7 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED Version final : publi
void UnsafeArenaSwap(Version* PROTOBUF_NONNULL other) {
if (other == this) return;
ABSL_DCHECK(GetArena() == other->GetArena());
InternalSwap(other);
Helpers_::InternalSwap(*this, other);
}
// implements Message ----------------------------------------------
@ -252,11 +252,6 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED Version final : publi
return _impl_._cached_size_.Get();
}
private:
void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
static void SharedDtor(MessageLite& self);
void InternalSwap(Version* PROTOBUF_NONNULL other);
private:
static ::absl::string_view FullMessageName() { return "google.protobuf.compiler.Version"; }
@ -333,17 +328,22 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED Version final : publi
// @@protoc_insertion_point(class_scope:google.protobuf.compiler.Version)
private:
class _Internal;
#if defined(PROTOBUF_CUSTOM_VTABLE)
struct Helpers_ {
PROTOBUF_NODEBUG Helpers_();
static void SharedCtor(MessageLite& self,
::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
static void SharedDtor(MessageLite& self);
static void InternalSwap(MessageLite& self, Version* PROTOBUF_NONNULL other);
#if defined(PROTOBUF_CUSTOM_VTABLE)
static void Clear(::google::protobuf::MessageLite& msg);
[[nodiscard]] static::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg);
[[nodiscard]] static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize(
const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target,
::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream);
};
#endif // PROTOBUF_CUSTOM_VTABLE
};
using ParseTableT_ =
::google::protobuf::internal::TcParseTable<2, 4,
0, 0,
@ -391,7 +391,7 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED CodeGeneratorResponse
#if defined(PROTOBUF_CUSTOM_VTABLE)
PROTOBUF_ALWAYS_INLINE_NODEBUG void operator delete(
CodeGeneratorResponse_File* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) {
SharedDtor(*msg);
Helpers_::SharedDtor(*msg);
::google::protobuf::internal::SizedDelete(msg, sizeof(CodeGeneratorResponse_File));
}
#endif
@ -412,7 +412,7 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED CodeGeneratorResponse
inline CodeGeneratorResponse_File& operator=(CodeGeneratorResponse_File&& from) noexcept {
if (this == &from) return *this;
if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) {
InternalSwap(&from);
Helpers_::InternalSwap(*this, &from);
} else {
CopyFrom(from);
}
@ -449,7 +449,7 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED CodeGeneratorResponse
inline void Swap(CodeGeneratorResponse_File* PROTOBUF_NONNULL other) {
if (other == this) return;
if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) {
InternalSwap(other);
Helpers_::InternalSwap(*this, other);
} else {
::google::protobuf::internal::GenericSwap(this, other);
}
@ -457,7 +457,7 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED CodeGeneratorResponse
void UnsafeArenaSwap(CodeGeneratorResponse_File* PROTOBUF_NONNULL other) {
if (other == this) return;
ABSL_DCHECK(GetArena() == other->GetArena());
InternalSwap(other);
Helpers_::InternalSwap(*this, other);
}
// implements Message ----------------------------------------------
@ -508,11 +508,6 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED CodeGeneratorResponse
return _impl_._cached_size_.Get();
}
private:
void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
static void SharedDtor(MessageLite& self);
void InternalSwap(CodeGeneratorResponse_File* PROTOBUF_NONNULL other);
private:
static ::absl::string_view FullMessageName() { return "google.protobuf.compiler.CodeGeneratorResponse.File"; }
@ -603,17 +598,22 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED CodeGeneratorResponse
// @@protoc_insertion_point(class_scope:google.protobuf.compiler.CodeGeneratorResponse.File)
private:
class _Internal;
#if defined(PROTOBUF_CUSTOM_VTABLE)
struct Helpers_ {
PROTOBUF_NODEBUG Helpers_();
static void SharedCtor(MessageLite& self,
::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
static void SharedDtor(MessageLite& self);
static void InternalSwap(MessageLite& self, CodeGeneratorResponse_File* PROTOBUF_NONNULL other);
#if defined(PROTOBUF_CUSTOM_VTABLE)
static void Clear(::google::protobuf::MessageLite& msg);
[[nodiscard]] static::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg);
[[nodiscard]] static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize(
const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target,
::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream);
};
#endif // PROTOBUF_CUSTOM_VTABLE
};
using ParseTableT_ =
::google::protobuf::internal::TcParseTable<2, 4,
1, 0,
@ -661,7 +661,7 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED CodeGeneratorResponse
#if defined(PROTOBUF_CUSTOM_VTABLE)
PROTOBUF_ALWAYS_INLINE_NODEBUG void operator delete(
CodeGeneratorResponse* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) {
SharedDtor(*msg);
Helpers_::SharedDtor(*msg);
::google::protobuf::internal::SizedDelete(msg, sizeof(CodeGeneratorResponse));
}
#endif
@ -682,7 +682,7 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED CodeGeneratorResponse
inline CodeGeneratorResponse& operator=(CodeGeneratorResponse&& from) noexcept {
if (this == &from) return *this;
if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) {
InternalSwap(&from);
Helpers_::InternalSwap(*this, &from);
} else {
CopyFrom(from);
}
@ -719,7 +719,7 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED CodeGeneratorResponse
inline void Swap(CodeGeneratorResponse* PROTOBUF_NONNULL other) {
if (other == this) return;
if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) {
InternalSwap(other);
Helpers_::InternalSwap(*this, other);
} else {
::google::protobuf::internal::GenericSwap(this, other);
}
@ -727,7 +727,7 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED CodeGeneratorResponse
void UnsafeArenaSwap(CodeGeneratorResponse* PROTOBUF_NONNULL other) {
if (other == this) return;
ABSL_DCHECK(GetArena() == other->GetArena());
InternalSwap(other);
Helpers_::InternalSwap(*this, other);
}
// implements Message ----------------------------------------------
@ -778,11 +778,6 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED CodeGeneratorResponse
return _impl_._cached_size_.Get();
}
private:
void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
static void SharedDtor(MessageLite& self);
void InternalSwap(CodeGeneratorResponse* PROTOBUF_NONNULL other);
private:
static ::absl::string_view FullMessageName() { return "google.protobuf.compiler.CodeGeneratorResponse"; }
@ -902,17 +897,22 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED CodeGeneratorResponse
// @@protoc_insertion_point(class_scope:google.protobuf.compiler.CodeGeneratorResponse)
private:
class _Internal;
#if defined(PROTOBUF_CUSTOM_VTABLE)
struct Helpers_ {
PROTOBUF_NODEBUG Helpers_();
static void SharedCtor(MessageLite& self,
::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
static void SharedDtor(MessageLite& self);
static void InternalSwap(MessageLite& self, CodeGeneratorResponse* PROTOBUF_NONNULL other);
#if defined(PROTOBUF_CUSTOM_VTABLE)
static void Clear(::google::protobuf::MessageLite& msg);
[[nodiscard]] static::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg);
[[nodiscard]] static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize(
const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target,
::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream);
};
#endif // PROTOBUF_CUSTOM_VTABLE
};
using ParseTableT_ =
::google::protobuf::internal::TcParseTable<3, 5,
1, 0,
@ -961,7 +961,7 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED CodeGeneratorRequest
#if defined(PROTOBUF_CUSTOM_VTABLE)
PROTOBUF_ALWAYS_INLINE_NODEBUG void operator delete(
CodeGeneratorRequest* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) {
SharedDtor(*msg);
Helpers_::SharedDtor(*msg);
::google::protobuf::internal::SizedDelete(msg, sizeof(CodeGeneratorRequest));
}
#endif
@ -982,7 +982,7 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED CodeGeneratorRequest
inline CodeGeneratorRequest& operator=(CodeGeneratorRequest&& from) noexcept {
if (this == &from) return *this;
if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) {
InternalSwap(&from);
Helpers_::InternalSwap(*this, &from);
} else {
CopyFrom(from);
}
@ -1019,7 +1019,7 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED CodeGeneratorRequest
inline void Swap(CodeGeneratorRequest* PROTOBUF_NONNULL other) {
if (other == this) return;
if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) {
InternalSwap(other);
Helpers_::InternalSwap(*this, other);
} else {
::google::protobuf::internal::GenericSwap(this, other);
}
@ -1027,7 +1027,7 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED CodeGeneratorRequest
void UnsafeArenaSwap(CodeGeneratorRequest* PROTOBUF_NONNULL other) {
if (other == this) return;
ABSL_DCHECK(GetArena() == other->GetArena());
InternalSwap(other);
Helpers_::InternalSwap(*this, other);
}
// implements Message ----------------------------------------------
@ -1083,11 +1083,6 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED CodeGeneratorRequest
return _impl_._cached_size_.Get();
}
private:
void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
static void SharedDtor(MessageLite& self);
void InternalSwap(CodeGeneratorRequest* PROTOBUF_NONNULL other);
private:
static ::absl::string_view FullMessageName() { return "google.protobuf.compiler.CodeGeneratorRequest"; }
@ -1213,17 +1208,22 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED CodeGeneratorRequest
// @@protoc_insertion_point(class_scope:google.protobuf.compiler.CodeGeneratorRequest)
private:
class _Internal;
#if defined(PROTOBUF_CUSTOM_VTABLE)
struct Helpers_ {
PROTOBUF_NODEBUG Helpers_();
static void SharedCtor(MessageLite& self,
::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
static void SharedDtor(MessageLite& self);
static void InternalSwap(MessageLite& self, CodeGeneratorRequest* PROTOBUF_NONNULL other);
#if defined(PROTOBUF_CUSTOM_VTABLE)
static void Clear(::google::protobuf::MessageLite& msg);
[[nodiscard]] static::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg);
[[nodiscard]] static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize(
const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target,
::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream);
};
#endif // PROTOBUF_CUSTOM_VTABLE
};
using ParseTableT_ =
::google::protobuf::internal::TcParseTable<3, 5,
3, 0,

View file

@ -139,7 +139,7 @@ constexpr auto CppFeatures::_Internal::GenerateClassData() {
&CppFeatures::MergeImpl,
Super_::GetNewImpl<CppFeatures>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
&CppFeatures::SharedDtor,
&CppFeatures::Helpers_::SharedDtor,
&Helpers_::Clear, &Helpers_::ByteSizeLong,
&Helpers_::_InternalSerialize,
#endif // PROTOBUF_CUSTOM_VTABLE
@ -263,7 +263,7 @@ CppFeatures::CppFeatures(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#else // PROTOBUF_CUSTOM_VTABLE
: Super_(arena) {
#endif // PROTOBUF_CUSTOM_VTABLE
SharedCtor(arena);
Helpers_::SharedCtor(*this, arena);
// @@protoc_insertion_point(arena_constructor:pb.CppFeatures)
}
CppFeatures::CppFeatures(
@ -282,9 +282,11 @@ PROTOBUF_NDEBUG_INLINE CppFeatures::Impl_::Impl_(
[[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
{}
inline void CppFeatures::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
new (&_impl_) Impl_(internal_visibility(), arena);
::memset(reinterpret_cast<char*>(&_impl_) +
inline void CppFeatures::Helpers_::SharedCtor(
::_pb::MessageLite& self, ::_pb::Arena* PROTOBUF_NULLABLE arena) {
CppFeatures& this_ = static_cast<CppFeatures&>(self);
new (&this_._impl_) Impl_(this_.internal_visibility(), arena);
::memset(reinterpret_cast<char*>(&this_._impl_) +
offsetof(Impl_, string_type_),
0,
offsetof(Impl_, repeated_type_) -
@ -293,9 +295,9 @@ inline void CppFeatures::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
}
CppFeatures::~CppFeatures() {
// @@protoc_insertion_point(destructor:pb.CppFeatures)
SharedDtor(*this);
Helpers_::SharedDtor(*this);
}
inline void CppFeatures::SharedDtor(MessageLite& self) {
inline void CppFeatures::Helpers_::SharedDtor(MessageLite& self) {
CppFeatures& this_ = static_cast<CppFeatures&>(self);
if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
this_.CheckHasBitConsistency();
@ -463,16 +465,18 @@ void CppFeatures::CopyFrom(const CppFeatures& from) {
}
void CppFeatures::InternalSwap(CppFeatures* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
void CppFeatures::Helpers_::InternalSwap(
::_pb::MessageLite& PROTOBUF_RESTRICT self,
CppFeatures* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
using ::std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
::google::protobuf::internal::memswap<
PROTOBUF_FIELD_OFFSET(CppFeatures, _impl_.repeated_type_)
+ sizeof(CppFeatures::_impl_.repeated_type_)
- PROTOBUF_FIELD_OFFSET(CppFeatures, _impl_.string_type_)>(
reinterpret_cast<char*>(&_impl_.string_type_),
reinterpret_cast<char*>(&other->_impl_.string_type_));
CppFeatures& this_ = static_cast<CppFeatures&>(self);
this_._internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(this_._impl_._has_bits_[0], other->_impl_._has_bits_[0]);
::google::protobuf::internal::memswap<PROTOBUF_FIELD_OFFSET(CppFeatures, _impl_.repeated_type_) +
sizeof(CppFeatures::_impl_.repeated_type_) -
PROTOBUF_FIELD_OFFSET(CppFeatures, _impl_.string_type_)>(
reinterpret_cast<char*>(&this_._impl_.string_type_),
reinterpret_cast<char*>(&other->_impl_.string_type_));
}
::google::protobuf::Metadata CppFeatures::GetMetadata() const {

View file

@ -168,7 +168,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED CppFeatures final :
#if defined(PROTOBUF_CUSTOM_VTABLE)
PROTOBUF_ALWAYS_INLINE_NODEBUG void operator delete(
CppFeatures* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) {
SharedDtor(*msg);
Helpers_::SharedDtor(*msg);
::google::protobuf::internal::SizedDelete(msg, sizeof(CppFeatures));
}
#endif
@ -189,7 +189,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED CppFeatures final :
inline CppFeatures& operator=(CppFeatures&& from) noexcept {
if (this == &from) return *this;
if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) {
InternalSwap(&from);
Helpers_::InternalSwap(*this, &from);
} else {
CopyFrom(from);
}
@ -226,7 +226,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED CppFeatures final :
inline void Swap(CppFeatures* PROTOBUF_NONNULL other) {
if (other == this) return;
if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) {
InternalSwap(other);
Helpers_::InternalSwap(*this, other);
} else {
::google::protobuf::internal::GenericSwap(this, other);
}
@ -234,7 +234,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED CppFeatures final :
void UnsafeArenaSwap(CppFeatures* PROTOBUF_NONNULL other) {
if (other == this) return;
ABSL_DCHECK(GetArena() == other->GetArena());
InternalSwap(other);
Helpers_::InternalSwap(*this, other);
}
// implements Message ----------------------------------------------
@ -285,11 +285,6 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED CppFeatures final :
return _impl_._cached_size_.Get();
}
private:
void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
static void SharedDtor(MessageLite& self);
void InternalSwap(CppFeatures* PROTOBUF_NONNULL other);
private:
static ::absl::string_view FullMessageName() { return "pb.CppFeatures"; }
@ -404,17 +399,22 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED CppFeatures final :
// @@protoc_insertion_point(class_scope:pb.CppFeatures)
private:
class _Internal;
#if defined(PROTOBUF_CUSTOM_VTABLE)
struct Helpers_ {
PROTOBUF_NODEBUG Helpers_();
static void SharedCtor(MessageLite& self,
::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
static void SharedDtor(MessageLite& self);
static void InternalSwap(MessageLite& self, CppFeatures* PROTOBUF_NONNULL other);
#if defined(PROTOBUF_CUSTOM_VTABLE)
static void Clear(::google::protobuf::MessageLite& msg);
[[nodiscard]] static::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg);
[[nodiscard]] static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize(
const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target,
::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream);
};
#endif // PROTOBUF_CUSTOM_VTABLE
};
using ParseTableT_ =
::google::protobuf::internal::TcParseTable<2, 4,
2, 0,

View file

@ -121,7 +121,7 @@ constexpr auto CppFileOptions::_Internal::GenerateClassData() {
&CppFileOptions::MergeImpl,
Super_::GetNewImpl<CppFileOptions>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
&CppFileOptions::SharedDtor,
&CppFileOptions::Helpers_::SharedDtor,
&Helpers_::Clear, &Helpers_::ByteSizeLong,
&Helpers_::_InternalSerialize,
#endif // PROTOBUF_CUSTOM_VTABLE
@ -213,7 +213,7 @@ CppFileOptions::CppFileOptions(::google::protobuf::Arena* PROTOBUF_NULLABLE aren
#else // PROTOBUF_CUSTOM_VTABLE
: Super_(arena) {
#endif // PROTOBUF_CUSTOM_VTABLE
SharedCtor(arena);
Helpers_::SharedCtor(*this, arena);
// @@protoc_insertion_point(arena_constructor:pb.file.CppFileOptions)
}
PROTOBUF_NDEBUG_INLINE CppFileOptions::Impl_::Impl_(
@ -245,14 +245,16 @@ PROTOBUF_NDEBUG_INLINE CppFileOptions::Impl_::Impl_(
[[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
: namespace__(arena) {}
inline void CppFileOptions::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
new (&_impl_) Impl_(internal_visibility(), arena);
inline void CppFileOptions::Helpers_::SharedCtor(
::_pb::MessageLite& self, ::_pb::Arena* PROTOBUF_NULLABLE arena) {
CppFileOptions& this_ = static_cast<CppFileOptions&>(self);
new (&this_._impl_) Impl_(this_.internal_visibility(), arena);
}
CppFileOptions::~CppFileOptions() {
// @@protoc_insertion_point(destructor:pb.file.CppFileOptions)
SharedDtor(*this);
Helpers_::SharedDtor(*this);
}
inline void CppFileOptions::SharedDtor(MessageLite& self) {
inline void CppFileOptions::Helpers_::SharedDtor(MessageLite& self) {
CppFileOptions& this_ = static_cast<CppFileOptions&>(self);
if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
this_.CheckHasBitConsistency();
@ -379,13 +381,16 @@ void CppFileOptions::CopyFrom(const CppFileOptions& from) {
}
void CppFileOptions::InternalSwap(CppFileOptions* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
void CppFileOptions::Helpers_::InternalSwap(
::_pb::MessageLite& PROTOBUF_RESTRICT self,
CppFileOptions* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
using ::std::swap;
auto* arena = GetArena();
CppFileOptions& this_ = static_cast<CppFileOptions&>(self);
auto* arena = this_.GetArena();
ABSL_DCHECK_EQ(arena, other->GetArena());
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
_impl_.namespace__.InternalSwap(&_impl_.namespace__, &other->_impl_.namespace__, arena);
this_._internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(this_._impl_._has_bits_[0], other->_impl_._has_bits_[0]);
this_._impl_.namespace__.InternalSwap(&this_._impl_.namespace__, &other->_impl_.namespace__, arena);
}
::google::protobuf::Metadata CppFileOptions::GetMetadata() const {

View file

@ -76,7 +76,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED CppFileOptions fina
#if defined(PROTOBUF_CUSTOM_VTABLE)
PROTOBUF_ALWAYS_INLINE_NODEBUG void operator delete(
CppFileOptions* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) {
SharedDtor(*msg);
Helpers_::SharedDtor(*msg);
::google::protobuf::internal::SizedDelete(msg, sizeof(CppFileOptions));
}
#endif
@ -97,7 +97,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED CppFileOptions fina
inline CppFileOptions& operator=(CppFileOptions&& from) noexcept {
if (this == &from) return *this;
if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) {
InternalSwap(&from);
Helpers_::InternalSwap(*this, &from);
} else {
CopyFrom(from);
}
@ -134,7 +134,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED CppFileOptions fina
inline void Swap(CppFileOptions* PROTOBUF_NONNULL other) {
if (other == this) return;
if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) {
InternalSwap(other);
Helpers_::InternalSwap(*this, other);
} else {
::google::protobuf::internal::GenericSwap(this, other);
}
@ -142,7 +142,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED CppFileOptions fina
void UnsafeArenaSwap(CppFileOptions* PROTOBUF_NONNULL other) {
if (other == this) return;
ABSL_DCHECK(GetArena() == other->GetArena());
InternalSwap(other);
Helpers_::InternalSwap(*this, other);
}
// implements Message ----------------------------------------------
@ -193,11 +193,6 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED CppFileOptions fina
return _impl_._cached_size_.Get();
}
private:
void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
static void SharedDtor(MessageLite& self);
void InternalSwap(CppFileOptions* PROTOBUF_NONNULL other);
private:
static ::absl::string_view FullMessageName() { return "pb.file.CppFileOptions"; }
@ -234,17 +229,22 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED CppFileOptions fina
// @@protoc_insertion_point(class_scope:pb.file.CppFileOptions)
private:
class _Internal;
#if defined(PROTOBUF_CUSTOM_VTABLE)
struct Helpers_ {
PROTOBUF_NODEBUG Helpers_();
static void SharedCtor(MessageLite& self,
::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
static void SharedDtor(MessageLite& self);
static void InternalSwap(MessageLite& self, CppFileOptions* PROTOBUF_NONNULL other);
#if defined(PROTOBUF_CUSTOM_VTABLE)
static void Clear(::google::protobuf::MessageLite& msg);
[[nodiscard]] static::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg);
[[nodiscard]] static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize(
const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target,
::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream);
};
#endif // PROTOBUF_CUSTOM_VTABLE
};
using ParseTableT_ =
::google::protobuf::internal::TcParseTable<0, 1,
0, 40,

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -38,7 +38,9 @@ ZeroFieldsBase::~ZeroFieldsBase() {
_internal_metadata_.Delete<UnknownFieldSet>();
}
void ZeroFieldsBase::SharedDtor(MessageLite& msg) {
ZeroFieldsBase::Helpers_::Helpers_() = default;
void ZeroFieldsBase::Helpers_::SharedDtor(MessageLite& msg) {
static_cast<ZeroFieldsBase&>(msg)
._internal_metadata_.Delete<UnknownFieldSet>();
}
@ -77,8 +79,10 @@ void ZeroFieldsBase::CopyImpl(Message& to_param, const Message& from_param) {
to->_internal_metadata_.MergeFrom<UnknownFieldSet>(from->_internal_metadata_);
}
void ZeroFieldsBase::InternalSwap(ZeroFieldsBase* other) {
_internal_metadata_.Swap<UnknownFieldSet>(&other->_internal_metadata_);
void ZeroFieldsBase::Helpers_::InternalSwap(MessageLite& self,
ZeroFieldsBase* other) {
auto& msg = static_cast<ZeroFieldsBase&>(self);
msg._internal_metadata_.Swap<UnknownFieldSet>(&other->_internal_metadata_);
}
} // namespace internal

View file

@ -43,10 +43,16 @@ class PROTOBUF_EXPORT ZeroFieldsBase : public Message {
using Message::Message;
~ZeroFieldsBase() PROTOBUF_OVERRIDE;
static void SharedDtor(MessageLite& msg);
struct Helpers_ {
// Defined out of line to enable constructor homing.
Helpers_();
static void SharedDtor(MessageLite& msg);
static void InternalSwap(MessageLite& self, ZeroFieldsBase* other);
};
static void MergeImpl(MessageLite& to, const MessageLite& from);
static void CopyImpl(Message& to, const Message& from);
void InternalSwap(ZeroFieldsBase* other);
static void Clear(MessageLite& msg);
static size_t ByteSizeLong(const MessageLite& base);
static ::uint8_t* _InternalSerialize(const MessageLite& msg,

View file

@ -121,7 +121,7 @@ constexpr auto JsonEnumValueOptions::_Internal::GenerateClassData() {
&JsonEnumValueOptions::MergeImpl,
Super_::GetNewImpl<JsonEnumValueOptions>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
&JsonEnumValueOptions::SharedDtor,
&JsonEnumValueOptions::Helpers_::SharedDtor,
&Helpers_::Clear, &Helpers_::ByteSizeLong,
&Helpers_::_InternalSerialize,
#endif // PROTOBUF_CUSTOM_VTABLE
@ -214,7 +214,7 @@ JsonEnumValueOptions::JsonEnumValueOptions(::google::protobuf::Arena* PROTOBUF_N
#else // PROTOBUF_CUSTOM_VTABLE
: Super_(arena) {
#endif // PROTOBUF_CUSTOM_VTABLE
SharedCtor(arena);
Helpers_::SharedCtor(*this, arena);
// @@protoc_insertion_point(arena_constructor:pb.enumvalue.JsonEnumValueOptions)
}
PROTOBUF_NDEBUG_INLINE JsonEnumValueOptions::Impl_::Impl_(
@ -246,14 +246,16 @@ PROTOBUF_NDEBUG_INLINE JsonEnumValueOptions::Impl_::Impl_(
[[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
: string_(arena) {}
inline void JsonEnumValueOptions::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
new (&_impl_) Impl_(internal_visibility(), arena);
inline void JsonEnumValueOptions::Helpers_::SharedCtor(
::_pb::MessageLite& self, ::_pb::Arena* PROTOBUF_NULLABLE arena) {
JsonEnumValueOptions& this_ = static_cast<JsonEnumValueOptions&>(self);
new (&this_._impl_) Impl_(this_.internal_visibility(), arena);
}
JsonEnumValueOptions::~JsonEnumValueOptions() {
// @@protoc_insertion_point(destructor:pb.enumvalue.JsonEnumValueOptions)
SharedDtor(*this);
Helpers_::SharedDtor(*this);
}
inline void JsonEnumValueOptions::SharedDtor(MessageLite& self) {
inline void JsonEnumValueOptions::Helpers_::SharedDtor(MessageLite& self) {
JsonEnumValueOptions& this_ = static_cast<JsonEnumValueOptions&>(self);
if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
this_.CheckHasBitConsistency();
@ -380,13 +382,16 @@ void JsonEnumValueOptions::CopyFrom(const JsonEnumValueOptions& from) {
}
void JsonEnumValueOptions::InternalSwap(JsonEnumValueOptions* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
void JsonEnumValueOptions::Helpers_::InternalSwap(
::_pb::MessageLite& PROTOBUF_RESTRICT self,
JsonEnumValueOptions* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
using ::std::swap;
auto* arena = GetArena();
JsonEnumValueOptions& this_ = static_cast<JsonEnumValueOptions&>(self);
auto* arena = this_.GetArena();
ABSL_DCHECK_EQ(arena, other->GetArena());
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
_impl_.string_.InternalSwap(&_impl_.string_, &other->_impl_.string_, arena);
this_._internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(this_._impl_._has_bits_[0], other->_impl_._has_bits_[0]);
this_._impl_.string_.InternalSwap(&this_._impl_.string_, &other->_impl_.string_, arena);
}
::google::protobuf::Metadata JsonEnumValueOptions::GetMetadata() const {

View file

@ -76,7 +76,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED JsonEnumValueOption
#if defined(PROTOBUF_CUSTOM_VTABLE)
PROTOBUF_ALWAYS_INLINE_NODEBUG void operator delete(
JsonEnumValueOptions* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) {
SharedDtor(*msg);
Helpers_::SharedDtor(*msg);
::google::protobuf::internal::SizedDelete(msg, sizeof(JsonEnumValueOptions));
}
#endif
@ -97,7 +97,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED JsonEnumValueOption
inline JsonEnumValueOptions& operator=(JsonEnumValueOptions&& from) noexcept {
if (this == &from) return *this;
if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) {
InternalSwap(&from);
Helpers_::InternalSwap(*this, &from);
} else {
CopyFrom(from);
}
@ -134,7 +134,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED JsonEnumValueOption
inline void Swap(JsonEnumValueOptions* PROTOBUF_NONNULL other) {
if (other == this) return;
if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) {
InternalSwap(other);
Helpers_::InternalSwap(*this, other);
} else {
::google::protobuf::internal::GenericSwap(this, other);
}
@ -142,7 +142,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED JsonEnumValueOption
void UnsafeArenaSwap(JsonEnumValueOptions* PROTOBUF_NONNULL other) {
if (other == this) return;
ABSL_DCHECK(GetArena() == other->GetArena());
InternalSwap(other);
Helpers_::InternalSwap(*this, other);
}
// implements Message ----------------------------------------------
@ -193,11 +193,6 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED JsonEnumValueOption
return _impl_._cached_size_.Get();
}
private:
void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
static void SharedDtor(MessageLite& self);
void InternalSwap(JsonEnumValueOptions* PROTOBUF_NONNULL other);
private:
static ::absl::string_view FullMessageName() { return "pb.enumvalue.JsonEnumValueOptions"; }
@ -234,17 +229,22 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED JsonEnumValueOption
// @@protoc_insertion_point(class_scope:pb.enumvalue.JsonEnumValueOptions)
private:
class _Internal;
#if defined(PROTOBUF_CUSTOM_VTABLE)
struct Helpers_ {
PROTOBUF_NODEBUG Helpers_();
static void SharedCtor(MessageLite& self,
::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
static void SharedDtor(MessageLite& self);
static void InternalSwap(MessageLite& self, JsonEnumValueOptions* PROTOBUF_NONNULL other);
#if defined(PROTOBUF_CUSTOM_VTABLE)
static void Clear(::google::protobuf::MessageLite& msg);
[[nodiscard]] static::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg);
[[nodiscard]] static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize(
const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target,
::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream);
};
#endif // PROTOBUF_CUSTOM_VTABLE
};
using ParseTableT_ =
::google::protobuf::internal::TcParseTable<0, 1,
0, 48,

View file

@ -94,7 +94,7 @@ class PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED MapEntry : public Message {
"");
if (GetArena() != nullptr) return;
SharedDtor(*this);
Helpers_::SharedDtor(*this);
}
using InternalArenaConstructable_ = void;
@ -103,12 +103,14 @@ class PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED MapEntry : public Message {
protected:
friend class google::protobuf::Arena;
static void SharedDtor(MessageLite& msg) {
auto& this_ = static_cast<MapEntry&>(msg);
this_._internal_metadata_.template Delete<UnknownFieldSet>();
KeyTypeHandler::DeleteNoArena(this_._impl_.key_);
ValueTypeHandler::DeleteNoArena(this_._impl_.value_);
}
struct Helpers_ {
static void SharedDtor(MessageLite& msg) {
auto& this_ = static_cast<MapEntry&>(msg);
this_._internal_metadata_.template Delete<UnknownFieldSet>();
KeyTypeHandler::DeleteNoArena(this_._impl_.key_);
ValueTypeHandler::DeleteNoArena(this_._impl_.value_);
}
};
// Field naming follows the convention of generated messages to make code
// sharing easier.