diff --git a/src/google/protobuf/compiler/cpp/message.cc b/src/google/protobuf/compiler/cpp/message.cc index 8af17c8abf..3ac44ad13c 100644 --- a/src/google/protobuf/compiler/cpp/message.cc +++ b/src/google/protobuf/compiler/cpp/message.cc @@ -1642,7 +1642,7 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* p) { "int GetCachedSize() const final { return " "$cached_size$.Get(); }" "\n\nprivate:\n" - "void SharedCtor(::$proto_ns$::Arena* arena, bool is_message_owned);\n" + "void SharedCtor(::$proto_ns$::Arena* arena);\n" "void SharedDtor();\n" "void SetCachedSize(int size) const$ full_final$;\n" "void InternalSwap($classname$* other);\n"); @@ -1661,8 +1661,7 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* p) { // protos to give access to this constructor, breaking the invariants // we rely on. "protected:\n" - "explicit $classname$(::$proto_ns$::Arena* arena,\n" - " bool is_message_owned = false);\n"); + "explicit $classname$(::$proto_ns$::Arena* arena);\n"); switch (NeedsArenaDestructor()) { case ArenaDtorNeeds::kOnDemand: @@ -2332,10 +2331,8 @@ void MessageGenerator::GenerateSharedConstructorCode(io::Printer* p) { Formatter format(p); format( - "inline void $classname$::SharedCtor(\n" - " ::_pb::Arena* arena, bool is_message_owned) {\n" - " (void)arena;\n" - " (void)is_message_owned;\n"); + "inline void $classname$::SharedCtor(::_pb::Arena* arena) {\n" + " (void)arena;\n"); format.Indent(); // Impl_ _impl_. @@ -2424,13 +2421,7 @@ void MessageGenerator::GenerateSharedConstructorCode(io::Printer* p) { // is needed. format("if (arena != nullptr) {\n"); if (NeedsArenaDestructor() == ArenaDtorNeeds::kOnDemand) { - format( - " if (!is_message_owned) {\n" - " $inlined_string_donated_array$[0] = ~0u;\n" - " } else {\n" - // We should not register ArenaDtor for MOA. - " $inlined_string_donated_array$[0] = 0xFFFFFFFEu;\n" - " }\n"); + format(" $inlined_string_donated_array$[0] = ~0u;\n"); } else { format(" $inlined_string_donated_array$[0] = 0xFFFFFFFEu;\n"); } @@ -2750,16 +2741,15 @@ void MessageGenerator::GenerateStructors(io::Printer* p) { Formatter format(p); format( - "$classname$::$classname$(::$proto_ns$::Arena* arena,\n" - " bool is_message_owned)\n" - " : $1$(arena, is_message_owned) {\n", + "$classname$::$classname$(::$proto_ns$::Arena* arena)\n" + " : $1$(arena) {\n", SuperClassName(descriptor_, options_)); if (!HasSimpleBaseClass(descriptor_, options_)) { - format(" SharedCtor(arena, is_message_owned);\n"); + format(" SharedCtor(arena);\n"); if (NeedsArenaDestructor() == ArenaDtorNeeds::kRequired) { format( - " if (arena != nullptr && !is_message_owned) {\n" + " if (arena != nullptr) {\n" " arena->OwnCustomDestructor(this, &$classname$::ArenaDtor);\n" " }\n"); } diff --git a/src/google/protobuf/compiler/plugin.pb.cc b/src/google/protobuf/compiler/plugin.pb.cc index f77a0e3d81..f7ce36e016 100644 --- a/src/google/protobuf/compiler/plugin.pb.cc +++ b/src/google/protobuf/compiler/plugin.pb.cc @@ -286,10 +286,9 @@ class Version::_Internal { } }; -Version::Version(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +Version::Version(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.compiler.Version) } Version::Version(const Version& from) @@ -318,10 +317,8 @@ Version::Version(const Version& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.compiler.Version) } -inline void Version::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { +inline void Version::SharedCtor(::_pb::Arena* arena) { (void)arena; - (void)is_message_owned; new (&_impl_) Impl_{ decltype(_impl_._has_bits_){} , /*decltype(_impl_._cached_size_)*/{} @@ -622,10 +619,9 @@ CodeGeneratorRequest::_Internal::compiler_version(const CodeGeneratorRequest* ms void CodeGeneratorRequest::clear_proto_file() { _impl_.proto_file_.Clear(); } -CodeGeneratorRequest::CodeGeneratorRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +CodeGeneratorRequest::CodeGeneratorRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.compiler.CodeGeneratorRequest) } CodeGeneratorRequest::CodeGeneratorRequest(const CodeGeneratorRequest& from) @@ -654,10 +650,8 @@ CodeGeneratorRequest::CodeGeneratorRequest(const CodeGeneratorRequest& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.compiler.CodeGeneratorRequest) } -inline void CodeGeneratorRequest::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { +inline void CodeGeneratorRequest::SharedCtor(::_pb::Arena* arena) { (void)arena; - (void)is_message_owned; new (&_impl_) Impl_{ decltype(_impl_._has_bits_){} , /*decltype(_impl_._cached_size_)*/{} @@ -991,10 +985,9 @@ void CodeGeneratorResponse_File::clear_generated_code_info() { if (_impl_.generated_code_info_ != nullptr) _impl_.generated_code_info_->Clear(); _impl_._has_bits_[0] &= ~0x00000008u; } -CodeGeneratorResponse_File::CodeGeneratorResponse_File(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +CodeGeneratorResponse_File::CodeGeneratorResponse_File(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.compiler.CodeGeneratorResponse.File) } CodeGeneratorResponse_File::CodeGeneratorResponse_File(const CodeGeneratorResponse_File& from) @@ -1039,10 +1032,8 @@ CodeGeneratorResponse_File::CodeGeneratorResponse_File(const CodeGeneratorRespon // @@protoc_insertion_point(copy_constructor:google.protobuf.compiler.CodeGeneratorResponse.File) } -inline void CodeGeneratorResponse_File::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { +inline void CodeGeneratorResponse_File::SharedCtor(::_pb::Arena* arena) { (void)arena; - (void)is_message_owned; new (&_impl_) Impl_{ decltype(_impl_._has_bits_){} , /*decltype(_impl_._cached_size_)*/{} @@ -1376,10 +1367,9 @@ class CodeGeneratorResponse::_Internal { } }; -CodeGeneratorResponse::CodeGeneratorResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +CodeGeneratorResponse::CodeGeneratorResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.compiler.CodeGeneratorResponse) } CodeGeneratorResponse::CodeGeneratorResponse(const CodeGeneratorResponse& from) @@ -1405,10 +1395,8 @@ CodeGeneratorResponse::CodeGeneratorResponse(const CodeGeneratorResponse& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.compiler.CodeGeneratorResponse) } -inline void CodeGeneratorResponse::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { +inline void CodeGeneratorResponse::SharedCtor(::_pb::Arena* arena) { (void)arena; - (void)is_message_owned; new (&_impl_) Impl_{ decltype(_impl_._has_bits_){} , /*decltype(_impl_._cached_size_)*/{} diff --git a/src/google/protobuf/compiler/plugin.pb.h b/src/google/protobuf/compiler/plugin.pb.h index eef8a5c705..5977c96527 100644 --- a/src/google/protobuf/compiler/plugin.pb.h +++ b/src/google/protobuf/compiler/plugin.pb.h @@ -222,7 +222,7 @@ class PROTOC_EXPORT Version final : int GetCachedSize() const final { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(Version* other); @@ -233,8 +233,7 @@ class PROTOC_EXPORT Version final : return "google.protobuf.compiler.Version"; } protected: - explicit Version(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit Version(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: static const ClassData _class_data_; @@ -419,7 +418,7 @@ class PROTOC_EXPORT CodeGeneratorRequest final : int GetCachedSize() const final { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(CodeGeneratorRequest* other); @@ -430,8 +429,7 @@ class PROTOC_EXPORT CodeGeneratorRequest final : return "google.protobuf.compiler.CodeGeneratorRequest"; } protected: - explicit CodeGeneratorRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit CodeGeneratorRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: static const ClassData _class_data_; @@ -643,7 +641,7 @@ class PROTOC_EXPORT CodeGeneratorResponse_File final : int GetCachedSize() const final { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(CodeGeneratorResponse_File* other); @@ -654,8 +652,7 @@ class PROTOC_EXPORT CodeGeneratorResponse_File final : return "google.protobuf.compiler.CodeGeneratorResponse.File"; } protected: - explicit CodeGeneratorResponse_File(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit CodeGeneratorResponse_File(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: static const ClassData _class_data_; @@ -855,7 +852,7 @@ class PROTOC_EXPORT CodeGeneratorResponse final : int GetCachedSize() const final { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(CodeGeneratorResponse* other); @@ -866,8 +863,7 @@ class PROTOC_EXPORT CodeGeneratorResponse final : return "google.protobuf.compiler.CodeGeneratorResponse"; } protected: - explicit CodeGeneratorResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit CodeGeneratorResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: static const ClassData _class_data_; diff --git a/src/google/protobuf/descriptor.pb.cc b/src/google/protobuf/descriptor.pb.cc index 6b750b18be..6e187a66de 100644 --- a/src/google/protobuf/descriptor.pb.cc +++ b/src/google/protobuf/descriptor.pb.cc @@ -1481,10 +1481,9 @@ class FileDescriptorSet::_Internal { public: }; -FileDescriptorSet::FileDescriptorSet(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +FileDescriptorSet::FileDescriptorSet(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.FileDescriptorSet) } FileDescriptorSet::FileDescriptorSet(const FileDescriptorSet& from) @@ -1498,10 +1497,8 @@ FileDescriptorSet::FileDescriptorSet(const FileDescriptorSet& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.FileDescriptorSet) } -inline void FileDescriptorSet::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { +inline void FileDescriptorSet::SharedCtor(::_pb::Arena* arena) { (void)arena; - (void)is_message_owned; new (&_impl_) Impl_{ decltype(_impl_.file_){arena} , /*decltype(_impl_._cached_size_)*/{} @@ -1704,10 +1701,9 @@ const ::PROTOBUF_NAMESPACE_ID::SourceCodeInfo& FileDescriptorProto::_Internal::source_code_info(const FileDescriptorProto* msg) { return *msg->_impl_.source_code_info_; } -FileDescriptorProto::FileDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +FileDescriptorProto::FileDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.FileDescriptorProto) } FileDescriptorProto::FileDescriptorProto(const FileDescriptorProto& from) @@ -1772,10 +1768,8 @@ FileDescriptorProto::FileDescriptorProto(const FileDescriptorProto& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.FileDescriptorProto) } -inline void FileDescriptorProto::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { +inline void FileDescriptorProto::SharedCtor(::_pb::Arena* arena) { (void)arena; - (void)is_message_owned; new (&_impl_) Impl_{ decltype(_impl_._has_bits_){} , /*decltype(_impl_._cached_size_)*/{} @@ -2463,10 +2457,9 @@ const ::PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions& DescriptorProto_ExtensionRange::_Internal::options(const DescriptorProto_ExtensionRange* msg) { return *msg->_impl_.options_; } -DescriptorProto_ExtensionRange::DescriptorProto_ExtensionRange(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +DescriptorProto_ExtensionRange::DescriptorProto_ExtensionRange(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.DescriptorProto.ExtensionRange) } DescriptorProto_ExtensionRange::DescriptorProto_ExtensionRange(const DescriptorProto_ExtensionRange& from) @@ -2489,10 +2482,8 @@ DescriptorProto_ExtensionRange::DescriptorProto_ExtensionRange(const DescriptorP // @@protoc_insertion_point(copy_constructor:google.protobuf.DescriptorProto.ExtensionRange) } -inline void DescriptorProto_ExtensionRange::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { +inline void DescriptorProto_ExtensionRange::SharedCtor(::_pb::Arena* arena) { (void)arena; - (void)is_message_owned; new (&_impl_) Impl_{ decltype(_impl_._has_bits_){} , /*decltype(_impl_._cached_size_)*/{} @@ -2748,10 +2739,9 @@ class DescriptorProto_ReservedRange::_Internal { } }; -DescriptorProto_ReservedRange::DescriptorProto_ReservedRange(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +DescriptorProto_ReservedRange::DescriptorProto_ReservedRange(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.DescriptorProto.ReservedRange) } DescriptorProto_ReservedRange::DescriptorProto_ReservedRange(const DescriptorProto_ReservedRange& from) @@ -2761,10 +2751,8 @@ DescriptorProto_ReservedRange::DescriptorProto_ReservedRange(const DescriptorPro // @@protoc_insertion_point(copy_constructor:google.protobuf.DescriptorProto.ReservedRange) } -inline void DescriptorProto_ReservedRange::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { +inline void DescriptorProto_ReservedRange::SharedCtor(::_pb::Arena* arena) { (void)arena; - (void)is_message_owned; new (&_impl_) Impl_{ decltype(_impl_._has_bits_){} , /*decltype(_impl_._cached_size_)*/{} @@ -2989,10 +2977,9 @@ const ::PROTOBUF_NAMESPACE_ID::MessageOptions& DescriptorProto::_Internal::options(const DescriptorProto* msg) { return *msg->_impl_.options_; } -DescriptorProto::DescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +DescriptorProto::DescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.DescriptorProto) } DescriptorProto::DescriptorProto(const DescriptorProto& from) @@ -3027,10 +3014,8 @@ DescriptorProto::DescriptorProto(const DescriptorProto& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.DescriptorProto) } -inline void DescriptorProto::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { +inline void DescriptorProto::SharedCtor(::_pb::Arena* arena) { (void)arena; - (void)is_message_owned; new (&_impl_) Impl_{ decltype(_impl_._has_bits_){} , /*decltype(_impl_._cached_size_)*/{} @@ -3557,10 +3542,9 @@ class ExtensionRangeOptions::_Internal { public: }; -ExtensionRangeOptions::ExtensionRangeOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +ExtensionRangeOptions::ExtensionRangeOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.ExtensionRangeOptions) } ExtensionRangeOptions::ExtensionRangeOptions(const ExtensionRangeOptions& from) @@ -3576,10 +3560,8 @@ ExtensionRangeOptions::ExtensionRangeOptions(const ExtensionRangeOptions& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.ExtensionRangeOptions) } -inline void ExtensionRangeOptions::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { +inline void ExtensionRangeOptions::SharedCtor(::_pb::Arena* arena) { (void)arena; - (void)is_message_owned; new (&_impl_) Impl_{ /*decltype(_impl_._extensions_)*/{::_pbi::ArenaInitialized(), arena} , decltype(_impl_.uninterpreted_option_){arena} @@ -3812,10 +3794,9 @@ const ::PROTOBUF_NAMESPACE_ID::FieldOptions& FieldDescriptorProto::_Internal::options(const FieldDescriptorProto* msg) { return *msg->_impl_.options_; } -FieldDescriptorProto::FieldDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +FieldDescriptorProto::FieldDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.FieldDescriptorProto) } FieldDescriptorProto::FieldDescriptorProto(const FieldDescriptorProto& from) @@ -3886,10 +3867,8 @@ FieldDescriptorProto::FieldDescriptorProto(const FieldDescriptorProto& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.FieldDescriptorProto) } -inline void FieldDescriptorProto::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { +inline void FieldDescriptorProto::SharedCtor(::_pb::Arena* arena) { (void)arena; - (void)is_message_owned; new (&_impl_) Impl_{ decltype(_impl_._has_bits_){} , /*decltype(_impl_._cached_size_)*/{} @@ -4481,10 +4460,9 @@ const ::PROTOBUF_NAMESPACE_ID::OneofOptions& OneofDescriptorProto::_Internal::options(const OneofDescriptorProto* msg) { return *msg->_impl_.options_; } -OneofDescriptorProto::OneofDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +OneofDescriptorProto::OneofDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.OneofDescriptorProto) } OneofDescriptorProto::OneofDescriptorProto(const OneofDescriptorProto& from) @@ -4511,10 +4489,8 @@ OneofDescriptorProto::OneofDescriptorProto(const OneofDescriptorProto& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.OneofDescriptorProto) } -inline void OneofDescriptorProto::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { +inline void OneofDescriptorProto::SharedCtor(::_pb::Arena* arena) { (void)arena; - (void)is_message_owned; new (&_impl_) Impl_{ decltype(_impl_._has_bits_){} , /*decltype(_impl_._cached_size_)*/{} @@ -4759,10 +4735,9 @@ class EnumDescriptorProto_EnumReservedRange::_Internal { } }; -EnumDescriptorProto_EnumReservedRange::EnumDescriptorProto_EnumReservedRange(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +EnumDescriptorProto_EnumReservedRange::EnumDescriptorProto_EnumReservedRange(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.EnumDescriptorProto.EnumReservedRange) } EnumDescriptorProto_EnumReservedRange::EnumDescriptorProto_EnumReservedRange(const EnumDescriptorProto_EnumReservedRange& from) @@ -4772,10 +4747,8 @@ EnumDescriptorProto_EnumReservedRange::EnumDescriptorProto_EnumReservedRange(con // @@protoc_insertion_point(copy_constructor:google.protobuf.EnumDescriptorProto.EnumReservedRange) } -inline void EnumDescriptorProto_EnumReservedRange::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { +inline void EnumDescriptorProto_EnumReservedRange::SharedCtor(::_pb::Arena* arena) { (void)arena; - (void)is_message_owned; new (&_impl_) Impl_{ decltype(_impl_._has_bits_){} , /*decltype(_impl_._cached_size_)*/{} @@ -5000,10 +4973,9 @@ const ::PROTOBUF_NAMESPACE_ID::EnumOptions& EnumDescriptorProto::_Internal::options(const EnumDescriptorProto* msg) { return *msg->_impl_.options_; } -EnumDescriptorProto::EnumDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +EnumDescriptorProto::EnumDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.EnumDescriptorProto) } EnumDescriptorProto::EnumDescriptorProto(const EnumDescriptorProto& from) @@ -5033,10 +5005,8 @@ EnumDescriptorProto::EnumDescriptorProto(const EnumDescriptorProto& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.EnumDescriptorProto) } -inline void EnumDescriptorProto::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { +inline void EnumDescriptorProto::SharedCtor(::_pb::Arena* arena) { (void)arena; - (void)is_message_owned; new (&_impl_) Impl_{ decltype(_impl_._has_bits_){} , /*decltype(_impl_._cached_size_)*/{} @@ -5400,10 +5370,9 @@ const ::PROTOBUF_NAMESPACE_ID::EnumValueOptions& EnumValueDescriptorProto::_Internal::options(const EnumValueDescriptorProto* msg) { return *msg->_impl_.options_; } -EnumValueDescriptorProto::EnumValueDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +EnumValueDescriptorProto::EnumValueDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.EnumValueDescriptorProto) } EnumValueDescriptorProto::EnumValueDescriptorProto(const EnumValueDescriptorProto& from) @@ -5432,10 +5401,8 @@ EnumValueDescriptorProto::EnumValueDescriptorProto(const EnumValueDescriptorProt // @@protoc_insertion_point(copy_constructor:google.protobuf.EnumValueDescriptorProto) } -inline void EnumValueDescriptorProto::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { +inline void EnumValueDescriptorProto::SharedCtor(::_pb::Arena* arena) { (void)arena; - (void)is_message_owned; new (&_impl_) Impl_{ decltype(_impl_._has_bits_){} , /*decltype(_impl_._cached_size_)*/{} @@ -5717,10 +5684,9 @@ const ::PROTOBUF_NAMESPACE_ID::ServiceOptions& ServiceDescriptorProto::_Internal::options(const ServiceDescriptorProto* msg) { return *msg->_impl_.options_; } -ServiceDescriptorProto::ServiceDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +ServiceDescriptorProto::ServiceDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.ServiceDescriptorProto) } ServiceDescriptorProto::ServiceDescriptorProto(const ServiceDescriptorProto& from) @@ -5748,10 +5714,8 @@ ServiceDescriptorProto::ServiceDescriptorProto(const ServiceDescriptorProto& fro // @@protoc_insertion_point(copy_constructor:google.protobuf.ServiceDescriptorProto) } -inline void ServiceDescriptorProto::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { +inline void ServiceDescriptorProto::SharedCtor(::_pb::Arena* arena) { (void)arena; - (void)is_message_owned; new (&_impl_) Impl_{ decltype(_impl_._has_bits_){} , /*decltype(_impl_._cached_size_)*/{} @@ -6049,10 +6013,9 @@ const ::PROTOBUF_NAMESPACE_ID::MethodOptions& MethodDescriptorProto::_Internal::options(const MethodDescriptorProto* msg) { return *msg->_impl_.options_; } -MethodDescriptorProto::MethodDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +MethodDescriptorProto::MethodDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.MethodDescriptorProto) } MethodDescriptorProto::MethodDescriptorProto(const MethodDescriptorProto& from) @@ -6102,10 +6065,8 @@ MethodDescriptorProto::MethodDescriptorProto(const MethodDescriptorProto& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.MethodDescriptorProto) } -inline void MethodDescriptorProto::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { +inline void MethodDescriptorProto::SharedCtor(::_pb::Arena* arena) { (void)arena; - (void)is_message_owned; new (&_impl_) Impl_{ decltype(_impl_._has_bits_){} , /*decltype(_impl_._cached_size_)*/{} @@ -6555,10 +6516,9 @@ class FileOptions::_Internal { } }; -FileOptions::FileOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +FileOptions::FileOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.FileOptions) } FileOptions::FileOptions(const FileOptions& from) @@ -6678,10 +6638,8 @@ FileOptions::FileOptions(const FileOptions& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.FileOptions) } -inline void FileOptions::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { +inline void FileOptions::SharedCtor(::_pb::Arena* arena) { (void)arena; - (void)is_message_owned; new (&_impl_) Impl_{ /*decltype(_impl_._extensions_)*/{::_pbi::ArenaInitialized(), arena} , decltype(_impl_._has_bits_){} @@ -7651,10 +7609,9 @@ class MessageOptions::_Internal { } }; -MessageOptions::MessageOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +MessageOptions::MessageOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.MessageOptions) } MessageOptions::MessageOptions(const MessageOptions& from) @@ -7678,10 +7635,8 @@ MessageOptions::MessageOptions(const MessageOptions& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.MessageOptions) } -inline void MessageOptions::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { +inline void MessageOptions::SharedCtor(::_pb::Arena* arena) { (void)arena; - (void)is_message_owned; new (&_impl_) Impl_{ /*decltype(_impl_._extensions_)*/{::_pbi::ArenaInitialized(), arena} , decltype(_impl_._has_bits_){} @@ -8019,10 +7974,9 @@ class FieldOptions::_Internal { } }; -FieldOptions::FieldOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +FieldOptions::FieldOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.FieldOptions) } FieldOptions::FieldOptions(const FieldOptions& from) @@ -8049,10 +8003,8 @@ FieldOptions::FieldOptions(const FieldOptions& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.FieldOptions) } -inline void FieldOptions::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { +inline void FieldOptions::SharedCtor(::_pb::Arena* arena) { (void)arena; - (void)is_message_owned; new (&_impl_) Impl_{ /*decltype(_impl_._extensions_)*/{::_pbi::ArenaInitialized(), arena} , decltype(_impl_._has_bits_){} @@ -8456,10 +8408,9 @@ class OneofOptions::_Internal { public: }; -OneofOptions::OneofOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +OneofOptions::OneofOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.OneofOptions) } OneofOptions::OneofOptions(const OneofOptions& from) @@ -8475,10 +8426,8 @@ OneofOptions::OneofOptions(const OneofOptions& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.OneofOptions) } -inline void OneofOptions::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { +inline void OneofOptions::SharedCtor(::_pb::Arena* arena) { (void)arena; - (void)is_message_owned; new (&_impl_) Impl_{ /*decltype(_impl_._extensions_)*/{::_pbi::ArenaInitialized(), arena} , decltype(_impl_.uninterpreted_option_){arena} @@ -8679,10 +8628,9 @@ class EnumOptions::_Internal { } }; -EnumOptions::EnumOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +EnumOptions::EnumOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.EnumOptions) } EnumOptions::EnumOptions(const EnumOptions& from) @@ -8704,10 +8652,8 @@ EnumOptions::EnumOptions(const EnumOptions& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.EnumOptions) } -inline void EnumOptions::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { +inline void EnumOptions::SharedCtor(::_pb::Arena* arena) { (void)arena; - (void)is_message_owned; new (&_impl_) Impl_{ /*decltype(_impl_._extensions_)*/{::_pbi::ArenaInitialized(), arena} , decltype(_impl_._has_bits_){} @@ -8977,10 +8923,9 @@ class EnumValueOptions::_Internal { } }; -EnumValueOptions::EnumValueOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +EnumValueOptions::EnumValueOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.EnumValueOptions) } EnumValueOptions::EnumValueOptions(const EnumValueOptions& from) @@ -8999,10 +8944,8 @@ EnumValueOptions::EnumValueOptions(const EnumValueOptions& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.EnumValueOptions) } -inline void EnumValueOptions::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { +inline void EnumValueOptions::SharedCtor(::_pb::Arena* arena) { (void)arena; - (void)is_message_owned; new (&_impl_) Impl_{ /*decltype(_impl_._extensions_)*/{::_pbi::ArenaInitialized(), arena} , decltype(_impl_._has_bits_){} @@ -9234,10 +9177,9 @@ class ServiceOptions::_Internal { } }; -ServiceOptions::ServiceOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +ServiceOptions::ServiceOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.ServiceOptions) } ServiceOptions::ServiceOptions(const ServiceOptions& from) @@ -9256,10 +9198,8 @@ ServiceOptions::ServiceOptions(const ServiceOptions& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.ServiceOptions) } -inline void ServiceOptions::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { +inline void ServiceOptions::SharedCtor(::_pb::Arena* arena) { (void)arena; - (void)is_message_owned; new (&_impl_) Impl_{ /*decltype(_impl_._extensions_)*/{::_pbi::ArenaInitialized(), arena} , decltype(_impl_._has_bits_){} @@ -9494,10 +9434,9 @@ class MethodOptions::_Internal { } }; -MethodOptions::MethodOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +MethodOptions::MethodOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.MethodOptions) } MethodOptions::MethodOptions(const MethodOptions& from) @@ -9519,10 +9458,8 @@ MethodOptions::MethodOptions(const MethodOptions& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.MethodOptions) } -inline void MethodOptions::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { +inline void MethodOptions::SharedCtor(::_pb::Arena* arena) { (void)arena; - (void)is_message_owned; new (&_impl_) Impl_{ /*decltype(_impl_._extensions_)*/{::_pbi::ArenaInitialized(), arena} , decltype(_impl_._has_bits_){} @@ -9807,10 +9744,9 @@ class UninterpretedOption_NamePart::_Internal { } }; -UninterpretedOption_NamePart::UninterpretedOption_NamePart(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +UninterpretedOption_NamePart::UninterpretedOption_NamePart(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.UninterpretedOption.NamePart) } UninterpretedOption_NamePart::UninterpretedOption_NamePart(const UninterpretedOption_NamePart& from) @@ -9835,10 +9771,8 @@ UninterpretedOption_NamePart::UninterpretedOption_NamePart(const UninterpretedOp // @@protoc_insertion_point(copy_constructor:google.protobuf.UninterpretedOption.NamePart) } -inline void UninterpretedOption_NamePart::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { +inline void UninterpretedOption_NamePart::SharedCtor(::_pb::Arena* arena) { (void)arena; - (void)is_message_owned; new (&_impl_) Impl_{ decltype(_impl_._has_bits_){} , /*decltype(_impl_._cached_size_)*/{} @@ -10100,10 +10034,9 @@ class UninterpretedOption::_Internal { } }; -UninterpretedOption::UninterpretedOption(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +UninterpretedOption::UninterpretedOption(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.UninterpretedOption) } UninterpretedOption::UninterpretedOption(const UninterpretedOption& from) @@ -10151,10 +10084,8 @@ UninterpretedOption::UninterpretedOption(const UninterpretedOption& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.UninterpretedOption) } -inline void UninterpretedOption::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { +inline void UninterpretedOption::SharedCtor(::_pb::Arena* arena) { (void)arena; - (void)is_message_owned; new (&_impl_) Impl_{ decltype(_impl_._has_bits_){} , /*decltype(_impl_._cached_size_)*/{} @@ -10570,10 +10501,9 @@ class SourceCodeInfo_Location::_Internal { } }; -SourceCodeInfo_Location::SourceCodeInfo_Location(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +SourceCodeInfo_Location::SourceCodeInfo_Location(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.SourceCodeInfo.Location) } SourceCodeInfo_Location::SourceCodeInfo_Location(const SourceCodeInfo_Location& from) @@ -10610,10 +10540,8 @@ SourceCodeInfo_Location::SourceCodeInfo_Location(const SourceCodeInfo_Location& // @@protoc_insertion_point(copy_constructor:google.protobuf.SourceCodeInfo.Location) } -inline void SourceCodeInfo_Location::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { +inline void SourceCodeInfo_Location::SharedCtor(::_pb::Arena* arena) { (void)arena; - (void)is_message_owned; new (&_impl_) Impl_{ decltype(_impl_._has_bits_){} , /*decltype(_impl_._cached_size_)*/{} @@ -10979,10 +10907,9 @@ class SourceCodeInfo::_Internal { public: }; -SourceCodeInfo::SourceCodeInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +SourceCodeInfo::SourceCodeInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.SourceCodeInfo) } SourceCodeInfo::SourceCodeInfo(const SourceCodeInfo& from) @@ -10996,10 +10923,8 @@ SourceCodeInfo::SourceCodeInfo(const SourceCodeInfo& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.SourceCodeInfo) } -inline void SourceCodeInfo::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { +inline void SourceCodeInfo::SharedCtor(::_pb::Arena* arena) { (void)arena; - (void)is_message_owned; new (&_impl_) Impl_{ decltype(_impl_.location_){arena} , /*decltype(_impl_._cached_size_)*/{} @@ -11184,10 +11109,9 @@ class GeneratedCodeInfo_Annotation::_Internal { } }; -GeneratedCodeInfo_Annotation::GeneratedCodeInfo_Annotation(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +GeneratedCodeInfo_Annotation::GeneratedCodeInfo_Annotation(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.GeneratedCodeInfo.Annotation) } GeneratedCodeInfo_Annotation::GeneratedCodeInfo_Annotation(const GeneratedCodeInfo_Annotation& from) @@ -11218,10 +11142,8 @@ GeneratedCodeInfo_Annotation::GeneratedCodeInfo_Annotation(const GeneratedCodeIn // @@protoc_insertion_point(copy_constructor:google.protobuf.GeneratedCodeInfo.Annotation) } -inline void GeneratedCodeInfo_Annotation::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { +inline void GeneratedCodeInfo_Annotation::SharedCtor(::_pb::Arena* arena) { (void)arena; - (void)is_message_owned; new (&_impl_) Impl_{ decltype(_impl_._has_bits_){} , /*decltype(_impl_._cached_size_)*/{} @@ -11551,10 +11473,9 @@ class GeneratedCodeInfo::_Internal { public: }; -GeneratedCodeInfo::GeneratedCodeInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +GeneratedCodeInfo::GeneratedCodeInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.GeneratedCodeInfo) } GeneratedCodeInfo::GeneratedCodeInfo(const GeneratedCodeInfo& from) @@ -11568,10 +11489,8 @@ GeneratedCodeInfo::GeneratedCodeInfo(const GeneratedCodeInfo& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.GeneratedCodeInfo) } -inline void GeneratedCodeInfo::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { +inline void GeneratedCodeInfo::SharedCtor(::_pb::Arena* arena) { (void)arena; - (void)is_message_owned; new (&_impl_) Impl_{ decltype(_impl_.annotation_){arena} , /*decltype(_impl_._cached_size_)*/{} diff --git a/src/google/protobuf/descriptor.pb.h b/src/google/protobuf/descriptor.pb.h index 56a2233f52..0995d792e6 100644 --- a/src/google/protobuf/descriptor.pb.h +++ b/src/google/protobuf/descriptor.pb.h @@ -517,7 +517,7 @@ class PROTOBUF_EXPORT FileDescriptorSet final : int GetCachedSize() const final { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(FileDescriptorSet* other); @@ -528,8 +528,7 @@ class PROTOBUF_EXPORT FileDescriptorSet final : return "google.protobuf.FileDescriptorSet"; } protected: - explicit FileDescriptorSet(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit FileDescriptorSet(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: static const ClassData _class_data_; @@ -680,7 +679,7 @@ class PROTOBUF_EXPORT FileDescriptorProto final : int GetCachedSize() const final { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(FileDescriptorProto* other); @@ -691,8 +690,7 @@ class PROTOBUF_EXPORT FileDescriptorProto final : return "google.protobuf.FileDescriptorProto"; } protected: - explicit FileDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit FileDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: static const ClassData _class_data_; @@ -1080,7 +1078,7 @@ class PROTOBUF_EXPORT DescriptorProto_ExtensionRange final : int GetCachedSize() const final { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(DescriptorProto_ExtensionRange* other); @@ -1091,8 +1089,7 @@ class PROTOBUF_EXPORT DescriptorProto_ExtensionRange final : return "google.protobuf.DescriptorProto.ExtensionRange"; } protected: - explicit DescriptorProto_ExtensionRange(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit DescriptorProto_ExtensionRange(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: static const ClassData _class_data_; @@ -1265,7 +1262,7 @@ class PROTOBUF_EXPORT DescriptorProto_ReservedRange final : int GetCachedSize() const final { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(DescriptorProto_ReservedRange* other); @@ -1276,8 +1273,7 @@ class PROTOBUF_EXPORT DescriptorProto_ReservedRange final : return "google.protobuf.DescriptorProto.ReservedRange"; } protected: - explicit DescriptorProto_ReservedRange(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit DescriptorProto_ReservedRange(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: static const ClassData _class_data_; @@ -1433,7 +1429,7 @@ class PROTOBUF_EXPORT DescriptorProto final : int GetCachedSize() const final { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(DescriptorProto* other); @@ -1444,8 +1440,7 @@ class PROTOBUF_EXPORT DescriptorProto final : return "google.protobuf.DescriptorProto"; } protected: - explicit DescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit DescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: static const ClassData _class_data_; @@ -1780,7 +1775,7 @@ class PROTOBUF_EXPORT ExtensionRangeOptions final : int GetCachedSize() const final { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(ExtensionRangeOptions* other); @@ -1791,8 +1786,7 @@ class PROTOBUF_EXPORT ExtensionRangeOptions final : return "google.protobuf.ExtensionRangeOptions"; } protected: - explicit ExtensionRangeOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit ExtensionRangeOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: static const ClassData _class_data_; @@ -2135,7 +2129,7 @@ class PROTOBUF_EXPORT FieldDescriptorProto final : int GetCachedSize() const final { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(FieldDescriptorProto* other); @@ -2146,8 +2140,7 @@ class PROTOBUF_EXPORT FieldDescriptorProto final : return "google.protobuf.FieldDescriptorProto"; } protected: - explicit FieldDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit FieldDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: static const ClassData _class_data_; @@ -2498,7 +2491,7 @@ class PROTOBUF_EXPORT OneofDescriptorProto final : int GetCachedSize() const final { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(OneofDescriptorProto* other); @@ -2509,8 +2502,7 @@ class PROTOBUF_EXPORT OneofDescriptorProto final : return "google.protobuf.OneofDescriptorProto"; } protected: - explicit OneofDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit OneofDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: static const ClassData _class_data_; @@ -2676,7 +2668,7 @@ class PROTOBUF_EXPORT EnumDescriptorProto_EnumReservedRange final : int GetCachedSize() const final { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(EnumDescriptorProto_EnumReservedRange* other); @@ -2687,8 +2679,7 @@ class PROTOBUF_EXPORT EnumDescriptorProto_EnumReservedRange final : return "google.protobuf.EnumDescriptorProto.EnumReservedRange"; } protected: - explicit EnumDescriptorProto_EnumReservedRange(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit EnumDescriptorProto_EnumReservedRange(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: static const ClassData _class_data_; @@ -2844,7 +2835,7 @@ class PROTOBUF_EXPORT EnumDescriptorProto final : int GetCachedSize() const final { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(EnumDescriptorProto* other); @@ -2855,8 +2846,7 @@ class PROTOBUF_EXPORT EnumDescriptorProto final : return "google.protobuf.EnumDescriptorProto"; } protected: - explicit EnumDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit EnumDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: static const ClassData _class_data_; @@ -3090,7 +3080,7 @@ class PROTOBUF_EXPORT EnumValueDescriptorProto final : int GetCachedSize() const final { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(EnumValueDescriptorProto* other); @@ -3101,8 +3091,7 @@ class PROTOBUF_EXPORT EnumValueDescriptorProto final : return "google.protobuf.EnumValueDescriptorProto"; } protected: - explicit EnumValueDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit EnumValueDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: static const ClassData _class_data_; @@ -3280,7 +3269,7 @@ class PROTOBUF_EXPORT ServiceDescriptorProto final : int GetCachedSize() const final { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(ServiceDescriptorProto* other); @@ -3291,8 +3280,7 @@ class PROTOBUF_EXPORT ServiceDescriptorProto final : return "google.protobuf.ServiceDescriptorProto"; } protected: - explicit ServiceDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit ServiceDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: static const ClassData _class_data_; @@ -3478,7 +3466,7 @@ class PROTOBUF_EXPORT MethodDescriptorProto final : int GetCachedSize() const final { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(MethodDescriptorProto* other); @@ -3489,8 +3477,7 @@ class PROTOBUF_EXPORT MethodDescriptorProto final : return "google.protobuf.MethodDescriptorProto"; } protected: - explicit MethodDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit MethodDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: static const ClassData _class_data_; @@ -3714,7 +3701,7 @@ class PROTOBUF_EXPORT FileOptions final : int GetCachedSize() const final { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(FileOptions* other); @@ -3725,8 +3712,7 @@ class PROTOBUF_EXPORT FileOptions final : return "google.protobuf.FileOptions"; } protected: - explicit FileOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit FileOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: static const ClassData _class_data_; @@ -4381,7 +4367,7 @@ class PROTOBUF_EXPORT MessageOptions final : int GetCachedSize() const final { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(MessageOptions* other); @@ -4392,8 +4378,7 @@ class PROTOBUF_EXPORT MessageOptions final : return "google.protobuf.MessageOptions"; } protected: - explicit MessageOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit MessageOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: static const ClassData _class_data_; @@ -4785,7 +4770,7 @@ class PROTOBUF_EXPORT FieldOptions final : int GetCachedSize() const final { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(FieldOptions* other); @@ -4796,8 +4781,7 @@ class PROTOBUF_EXPORT FieldOptions final : return "google.protobuf.FieldOptions"; } protected: - explicit FieldOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit FieldOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: static const ClassData _class_data_; @@ -5267,7 +5251,7 @@ class PROTOBUF_EXPORT OneofOptions final : int GetCachedSize() const final { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(OneofOptions* other); @@ -5278,8 +5262,7 @@ class PROTOBUF_EXPORT OneofOptions final : return "google.protobuf.OneofOptions"; } protected: - explicit OneofOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit OneofOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: static const ClassData _class_data_; @@ -5622,7 +5605,7 @@ class PROTOBUF_EXPORT EnumOptions final : int GetCachedSize() const final { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(EnumOptions* other); @@ -5633,8 +5616,7 @@ class PROTOBUF_EXPORT EnumOptions final : return "google.protobuf.EnumOptions"; } protected: - explicit EnumOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit EnumOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: static const ClassData _class_data_; @@ -6002,7 +5984,7 @@ class PROTOBUF_EXPORT EnumValueOptions final : int GetCachedSize() const final { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(EnumValueOptions* other); @@ -6013,8 +5995,7 @@ class PROTOBUF_EXPORT EnumValueOptions final : return "google.protobuf.EnumValueOptions"; } protected: - explicit EnumValueOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit EnumValueOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: static const ClassData _class_data_; @@ -6370,7 +6351,7 @@ class PROTOBUF_EXPORT ServiceOptions final : int GetCachedSize() const final { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(ServiceOptions* other); @@ -6381,8 +6362,7 @@ class PROTOBUF_EXPORT ServiceOptions final : return "google.protobuf.ServiceOptions"; } protected: - explicit ServiceOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit ServiceOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: static const ClassData _class_data_; @@ -6738,7 +6718,7 @@ class PROTOBUF_EXPORT MethodOptions final : int GetCachedSize() const final { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(MethodOptions* other); @@ -6749,8 +6729,7 @@ class PROTOBUF_EXPORT MethodOptions final : return "google.protobuf.MethodOptions"; } protected: - explicit MethodOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit MethodOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: static const ClassData _class_data_; @@ -7139,7 +7118,7 @@ class PROTOBUF_EXPORT UninterpretedOption_NamePart final : int GetCachedSize() const final { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(UninterpretedOption_NamePart* other); @@ -7150,8 +7129,7 @@ class PROTOBUF_EXPORT UninterpretedOption_NamePart final : return "google.protobuf.UninterpretedOption.NamePart"; } protected: - explicit UninterpretedOption_NamePart(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit UninterpretedOption_NamePart(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: static const ClassData _class_data_; @@ -7315,7 +7293,7 @@ class PROTOBUF_EXPORT UninterpretedOption final : int GetCachedSize() const final { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(UninterpretedOption* other); @@ -7326,8 +7304,7 @@ class PROTOBUF_EXPORT UninterpretedOption final : return "google.protobuf.UninterpretedOption"; } protected: - explicit UninterpretedOption(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit UninterpretedOption(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: static const ClassData _class_data_; @@ -7568,7 +7545,7 @@ class PROTOBUF_EXPORT SourceCodeInfo_Location final : int GetCachedSize() const final { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(SourceCodeInfo_Location* other); @@ -7579,8 +7556,7 @@ class PROTOBUF_EXPORT SourceCodeInfo_Location final : return "google.protobuf.SourceCodeInfo.Location"; } protected: - explicit SourceCodeInfo_Location(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit SourceCodeInfo_Location(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: static const ClassData _class_data_; @@ -7822,7 +7798,7 @@ class PROTOBUF_EXPORT SourceCodeInfo final : int GetCachedSize() const final { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(SourceCodeInfo* other); @@ -7833,8 +7809,7 @@ class PROTOBUF_EXPORT SourceCodeInfo final : return "google.protobuf.SourceCodeInfo"; } protected: - explicit SourceCodeInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit SourceCodeInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: static const ClassData _class_data_; @@ -7987,7 +7962,7 @@ class PROTOBUF_EXPORT GeneratedCodeInfo_Annotation final : int GetCachedSize() const final { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(GeneratedCodeInfo_Annotation* other); @@ -7998,8 +7973,7 @@ class PROTOBUF_EXPORT GeneratedCodeInfo_Annotation final : return "google.protobuf.GeneratedCodeInfo.Annotation"; } protected: - explicit GeneratedCodeInfo_Annotation(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit GeneratedCodeInfo_Annotation(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: static const ClassData _class_data_; @@ -8230,7 +8204,7 @@ class PROTOBUF_EXPORT GeneratedCodeInfo final : int GetCachedSize() const final { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(GeneratedCodeInfo* other); @@ -8241,8 +8215,7 @@ class PROTOBUF_EXPORT GeneratedCodeInfo final : return "google.protobuf.GeneratedCodeInfo"; } protected: - explicit GeneratedCodeInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit GeneratedCodeInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: static const ClassData _class_data_; diff --git a/src/google/protobuf/generated_message_bases.h b/src/google/protobuf/generated_message_bases.h index d542ca414e..23798cc4c7 100644 --- a/src/google/protobuf/generated_message_bases.h +++ b/src/google/protobuf/generated_message_bases.h @@ -63,8 +63,7 @@ class PROTOBUF_EXPORT ZeroFieldsBase : public Message { protected: constexpr ZeroFieldsBase() {} - explicit ZeroFieldsBase(Arena* arena, bool is_message_owned) - : Message(arena, is_message_owned) {} + explicit ZeroFieldsBase(Arena* arena) : Message(arena) {} ZeroFieldsBase(const ZeroFieldsBase&) = delete; ZeroFieldsBase& operator=(const ZeroFieldsBase&) = delete; ~ZeroFieldsBase() override; diff --git a/src/google/protobuf/message.h b/src/google/protobuf/message.h index f08b3466c1..2813c27009 100644 --- a/src/google/protobuf/message.h +++ b/src/google/protobuf/message.h @@ -415,8 +415,7 @@ class PROTOBUF_EXPORT Message : public MessageLite { // Fail if "from" is a descendant of "to" as such copy is not allowed. static void FailIfCopyFromDescendant(Message& to, const Message& from); - inline explicit Message(Arena* arena, bool is_message_owned = false) - : MessageLite(arena, is_message_owned) {} + inline explicit Message(Arena* arena) : MessageLite(arena) {} size_t ComputeUnknownFieldsSize(size_t total_size, internal::CachedSize* cached_size) const; size_t MaybeComputeUnknownFieldsSize(size_t total_size, diff --git a/src/google/protobuf/message_lite.cc b/src/google/protobuf/message_lite.cc index 2cbb77ad72..624ab85105 100644 --- a/src/google/protobuf/message_lite.cc +++ b/src/google/protobuf/message_lite.cc @@ -63,10 +63,6 @@ namespace google { namespace protobuf { -MessageLite::~MessageLite(){ -// Defined out of line to save code space -} - std::string MessageLite::InitializationErrorString() const { return "(cannot determine missing fields for lite message)"; } @@ -515,15 +511,6 @@ void GenericTypeHandler::Merge(const std::string& from, *to = from; } -// Non-inline implementations of InternalMetadata destructor -// This is moved out of the header because the GOOGLE_DCHECK produces a lot of code. -void InternalMetadata::CheckedDestruct() { - if (HasMessageOwnedArenaTag()) { - GOOGLE_DCHECK(!HasUnknownFieldsTag()); - delete reinterpret_cast(ptr_ - kMessageOwnedArenaTagMask); - } -} - // Non-inline variants of std::string specializations for // various InternalMetadata routines. template <> diff --git a/src/google/protobuf/message_lite.h b/src/google/protobuf/message_lite.h index 0ce91cde8d..35db842b11 100644 --- a/src/google/protobuf/message_lite.h +++ b/src/google/protobuf/message_lite.h @@ -172,7 +172,7 @@ class PROTOBUF_EXPORT MessageLite { constexpr MessageLite() {} MessageLite(const MessageLite&) = delete; MessageLite& operator=(const MessageLite&) = delete; - virtual ~MessageLite(); + virtual ~MessageLite() = default; // Basic Operations ------------------------------------------------ @@ -429,8 +429,7 @@ class PROTOBUF_EXPORT MessageLite { return Arena::CreateMaybeMessage(arena); } - inline explicit MessageLite(Arena* arena, bool is_message_owned = false) - : _internal_metadata_(arena, is_message_owned) {} + inline explicit MessageLite(Arena* arena) : _internal_metadata_(arena) {} // Returns the arena, if any, that directly owns this message and its internal // memory (Arena::Own is different in that the arena doesn't directly own the diff --git a/src/google/protobuf/metadata_lite.h b/src/google/protobuf/metadata_lite.h index 0700327dcd..cb75e57e07 100644 --- a/src/google/protobuf/metadata_lite.h +++ b/src/google/protobuf/metadata_lite.h @@ -67,29 +67,8 @@ namespace internal { class PROTOBUF_EXPORT InternalMetadata { public: constexpr InternalMetadata() : ptr_(0) {} - explicit InternalMetadata(Arena* arena, bool is_message_owned = false) { - SetArena(arena, is_message_owned); - } - - void SetArena(Arena* arena, bool is_message_owned) { - ptr_ = is_message_owned - ? reinterpret_cast(arena) | kMessageOwnedArenaTagMask - : reinterpret_cast(arena); - GOOGLE_DCHECK(!is_message_owned || arena != nullptr); - } - - // To keep the ABI identical between debug and non-debug builds, - // the destructor is always defined here even though it may delegate - // to a non-inline private method. - // (see https://github.com/protocolbuffers/protobuf/issues/9947) - ~InternalMetadata() { -#if defined(NDEBUG) || defined(_MSC_VER) - if (HasMessageOwnedArenaTag()) { - delete reinterpret_cast(ptr_ - kMessageOwnedArenaTagMask); - } -#else - CheckedDestruct(); -#endif + explicit InternalMetadata(Arena* arena) { + ptr_ = reinterpret_cast(arena); } template @@ -116,14 +95,9 @@ class PROTOBUF_EXPORT InternalMetadata { } } - PROTOBUF_NDEBUG_INLINE Arena* owning_arena() const { - return HasMessageOwnedArenaTag() ? nullptr : arena(); - } + PROTOBUF_NDEBUG_INLINE Arena* owning_arena() const { return arena(); } - PROTOBUF_NDEBUG_INLINE Arena* user_arena() const { - Arena* a = arena(); - return a && !a->IsMessageOwned() ? a : nullptr; - } + PROTOBUF_NDEBUG_INLINE Arena* user_arena() const { return arena(); } PROTOBUF_NDEBUG_INLINE Arena* arena() const { if (PROTOBUF_PREDICT_FALSE(have_unknown_fields())) { @@ -196,18 +170,13 @@ class PROTOBUF_EXPORT InternalMetadata { // Tagged pointer implementation. static constexpr intptr_t kUnknownFieldsTagMask = 1; - static constexpr intptr_t kMessageOwnedArenaTagMask = 2; - static constexpr intptr_t kPtrTagMask = - kUnknownFieldsTagMask | kMessageOwnedArenaTagMask; + static constexpr intptr_t kPtrTagMask = kUnknownFieldsTagMask; static constexpr intptr_t kPtrValueMask = ~kPtrTagMask; // Accessors for pointer tag and pointer value. PROTOBUF_ALWAYS_INLINE bool HasUnknownFieldsTag() const { return ptr_ & kUnknownFieldsTagMask; } - PROTOBUF_ALWAYS_INLINE bool HasMessageOwnedArenaTag() const { - return ptr_ & kMessageOwnedArenaTagMask; - } template U* PtrValue() const { @@ -227,11 +196,7 @@ class PROTOBUF_EXPORT InternalMetadata { template PROTOBUF_NOINLINE Arena* DeleteOutOfLineHelper() { if (auto* a = arena()) { - // Subtle: we want to preserve the message-owned arena flag, while at the - // same time replacing the pointer to Container with a pointer to the - // arena. - intptr_t message_owned_arena_tag = ptr_ & kMessageOwnedArenaTagMask; - ptr_ = reinterpret_cast(a) | message_owned_arena_tag; + ptr_ = reinterpret_cast(a); return a; } else { delete PtrValue>(); @@ -244,11 +209,10 @@ class PROTOBUF_EXPORT InternalMetadata { PROTOBUF_NOINLINE T* mutable_unknown_fields_slow() { Arena* my_arena = arena(); Container* container = Arena::Create>(my_arena); - intptr_t message_owned_arena_tag = ptr_ & kMessageOwnedArenaTagMask; // Two-step assignment works around a bug in clang's static analyzer: // https://bugs.llvm.org/show_bug.cgi?id=34198. ptr_ = reinterpret_cast(container); - ptr_ |= kUnknownFieldsTagMask | message_owned_arena_tag; + ptr_ |= kUnknownFieldsTagMask; container->arena = my_arena; return &(container->unknown_fields); }