From 7326b571d27269afced05e8fe2fa604dcece6182 Mon Sep 17 00:00:00 2001 From: Yuriy Chernyshov Date: Fri, 30 Jul 2021 00:05:00 +0300 Subject: [PATCH] Fix undefined symbol error around SharedCtor() (#8827) * Fix undefined symbol error around SharedCtor() Apparently, #8532 was incorrect if applied to 3.17.x branch. 3.17.x changed code generation to mark `SharedCtor()` and `SharedDtor()` as inline in .pb.cc. It looks like we have a compile-time undefined behavior in C++ now. As cppreference.com [says](https://en.cppreference.com/w/cpp/language/inline): _The definition of an inline function <...> must be reachable in the translation unit where it is accessed (not necessarily before the point of access)._ As protobuf allows custom plugins to generate custom code, there is no limitation on where SharedCtor couble be possible referenced from. In our case we have SharedCtor invoked from corresponding `.pb.h` code, thus triggering: ``` ld: error: undefined symbol: package::Message::SharedCtor()` >>> referenced by file.pb.h:$$$$ ``` If this patch is not applicable, I can take a look into changing the code generation, but doing this will be harder then removing _inline_. * Regenerate checked-in generated .pb.cc files --- src/google/protobuf/any.pb.cc | 2 +- src/google/protobuf/any.pb.h | 4 +- src/google/protobuf/api.pb.cc | 6 +-- .../protobuf/compiler/cpp/cpp_message.cc | 2 +- src/google/protobuf/compiler/plugin.pb.cc | 8 +-- src/google/protobuf/descriptor.pb.cc | 54 +++++++++---------- src/google/protobuf/duration.pb.cc | 2 +- src/google/protobuf/empty.pb.cc | 2 +- src/google/protobuf/field_mask.pb.cc | 2 +- src/google/protobuf/source_context.pb.cc | 2 +- src/google/protobuf/struct.pb.cc | 6 +-- src/google/protobuf/timestamp.pb.cc | 2 +- src/google/protobuf/type.pb.cc | 10 ++-- src/google/protobuf/wrappers.pb.cc | 18 +++---- 14 files changed, 60 insertions(+), 60 deletions(-) diff --git a/src/google/protobuf/any.pb.cc b/src/google/protobuf/any.pb.cc index c6dff7b1f3fd..e371a67350c2 100644 --- a/src/google/protobuf/any.pb.cc +++ b/src/google/protobuf/any.pb.cc @@ -123,7 +123,7 @@ Any::Any(const Any& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.Any) } -inline void Any::SharedCtor() { +void Any::SharedCtor() { type_url_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } diff --git a/src/google/protobuf/any.pb.h b/src/google/protobuf/any.pb.h index b4ab93c1db05..158da761abe1 100644 --- a/src/google/protobuf/any.pb.h +++ b/src/google/protobuf/any.pb.h @@ -129,12 +129,12 @@ class PROTOBUF_EXPORT Any final : const ::PROTOBUF_NAMESPACE_ID::FieldDescriptor** value_field); template ::value>::type> bool PackFrom(const T& message) { - return _any_metadata_.PackFrom(message); + return _any_metadata_.PackFrom(GetArena(), message); } template ::value>::type> bool PackFrom(const T& message, ::PROTOBUF_NAMESPACE_ID::ConstStringParam type_url_prefix) { - return _any_metadata_.PackFrom(message, type_url_prefix);} + return _any_metadata_.PackFrom(GetArena(), message, type_url_prefix);} template ::value>::type> bool UnpackTo(T* message) const { return _any_metadata_.UnpackTo(message); diff --git a/src/google/protobuf/api.pb.cc b/src/google/protobuf/api.pb.cc index 310ea2b199b3..b2e14d1836d5 100644 --- a/src/google/protobuf/api.pb.cc +++ b/src/google/protobuf/api.pb.cc @@ -215,7 +215,7 @@ Api::Api(const Api& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.Api) } -inline void Api::SharedCtor() { +void Api::SharedCtor() { name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); version_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); ::memset(reinterpret_cast(this) + static_cast( @@ -625,7 +625,7 @@ Method::Method(const Method& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.Method) } -inline void Method::SharedCtor() { +void Method::SharedCtor() { name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); request_type_url_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); response_type_url_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); @@ -1013,7 +1013,7 @@ Mixin::Mixin(const Mixin& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.Mixin) } -inline void Mixin::SharedCtor() { +void Mixin::SharedCtor() { name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); root_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } diff --git a/src/google/protobuf/compiler/cpp/cpp_message.cc b/src/google/protobuf/compiler/cpp/cpp_message.cc index 79ed8aaa27cb..ff8b30834e89 100644 --- a/src/google/protobuf/compiler/cpp/cpp_message.cc +++ b/src/google/protobuf/compiler/cpp/cpp_message.cc @@ -2381,7 +2381,7 @@ std::pair MessageGenerator::GenerateOffsets( void MessageGenerator::GenerateSharedConstructorCode(io::Printer* printer) { Formatter format(printer, variables_); - format("inline void $classname$::SharedCtor() {\n"); + format("void $classname$::SharedCtor() {\n"); std::vector processed(optimized_order_.size(), false); GenerateConstructorBody(printer, processed, false); diff --git a/src/google/protobuf/compiler/plugin.pb.cc b/src/google/protobuf/compiler/plugin.pb.cc index fec62ed7ad42..f66f854fe9cb 100644 --- a/src/google/protobuf/compiler/plugin.pb.cc +++ b/src/google/protobuf/compiler/plugin.pb.cc @@ -254,7 +254,7 @@ Version::Version(const Version& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.compiler.Version) } -inline void Version::SharedCtor() { +void Version::SharedCtor() { suffix_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); ::memset(reinterpret_cast(this) + static_cast( reinterpret_cast(&major_) - reinterpret_cast(this)), @@ -583,7 +583,7 @@ CodeGeneratorRequest::CodeGeneratorRequest(const CodeGeneratorRequest& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.compiler.CodeGeneratorRequest) } -inline void CodeGeneratorRequest::SharedCtor() { +void CodeGeneratorRequest::SharedCtor() { parameter_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); compiler_version_ = nullptr; } @@ -939,7 +939,7 @@ CodeGeneratorResponse_File::CodeGeneratorResponse_File(const CodeGeneratorRespon // @@protoc_insertion_point(copy_constructor:google.protobuf.compiler.CodeGeneratorResponse.File) } -inline void CodeGeneratorResponse_File::SharedCtor() { +void CodeGeneratorResponse_File::SharedCtor() { name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); insertion_point_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); content_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); @@ -1282,7 +1282,7 @@ CodeGeneratorResponse::CodeGeneratorResponse(const CodeGeneratorResponse& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.compiler.CodeGeneratorResponse) } -inline void CodeGeneratorResponse::SharedCtor() { +void CodeGeneratorResponse::SharedCtor() { error_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); supported_features_ = uint64_t{0u}; } diff --git a/src/google/protobuf/descriptor.pb.cc b/src/google/protobuf/descriptor.pb.cc index 86df8966c539..2e91b7c1abc6 100644 --- a/src/google/protobuf/descriptor.pb.cc +++ b/src/google/protobuf/descriptor.pb.cc @@ -1255,7 +1255,7 @@ FileDescriptorSet::FileDescriptorSet(const FileDescriptorSet& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.FileDescriptorSet) } -inline void FileDescriptorSet::SharedCtor() { +void FileDescriptorSet::SharedCtor() { } FileDescriptorSet::~FileDescriptorSet() { @@ -1510,7 +1510,7 @@ FileDescriptorProto::FileDescriptorProto(const FileDescriptorProto& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.FileDescriptorProto) } -inline void FileDescriptorProto::SharedCtor() { +void FileDescriptorProto::SharedCtor() { name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); package_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); syntax_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); @@ -2129,7 +2129,7 @@ DescriptorProto_ExtensionRange::DescriptorProto_ExtensionRange(const DescriptorP // @@protoc_insertion_point(copy_constructor:google.protobuf.DescriptorProto.ExtensionRange) } -inline void DescriptorProto_ExtensionRange::SharedCtor() { +void DescriptorProto_ExtensionRange::SharedCtor() { ::memset(reinterpret_cast(this) + static_cast( reinterpret_cast(&options_) - reinterpret_cast(this)), 0, static_cast(reinterpret_cast(&end_) - @@ -2407,7 +2407,7 @@ DescriptorProto_ReservedRange::DescriptorProto_ReservedRange(const DescriptorPro // @@protoc_insertion_point(copy_constructor:google.protobuf.DescriptorProto.ReservedRange) } -inline void DescriptorProto_ReservedRange::SharedCtor() { +void DescriptorProto_ReservedRange::SharedCtor() { ::memset(reinterpret_cast(this) + static_cast( reinterpret_cast(&start_) - reinterpret_cast(this)), 0, static_cast(reinterpret_cast(&end_) - @@ -2680,7 +2680,7 @@ DescriptorProto::DescriptorProto(const DescriptorProto& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.DescriptorProto) } -inline void DescriptorProto::SharedCtor() { +void DescriptorProto::SharedCtor() { name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); options_ = nullptr; } @@ -3185,7 +3185,7 @@ ExtensionRangeOptions::ExtensionRangeOptions(const ExtensionRangeOptions& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.ExtensionRangeOptions) } -inline void ExtensionRangeOptions::SharedCtor() { +void ExtensionRangeOptions::SharedCtor() { } ExtensionRangeOptions::~ExtensionRangeOptions() { @@ -3466,7 +3466,7 @@ FieldDescriptorProto::FieldDescriptorProto(const FieldDescriptorProto& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.FieldDescriptorProto) } -inline void FieldDescriptorProto::SharedCtor() { +void FieldDescriptorProto::SharedCtor() { name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); extendee_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); type_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); @@ -4055,7 +4055,7 @@ OneofDescriptorProto::OneofDescriptorProto(const OneofDescriptorProto& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.OneofDescriptorProto) } -inline void OneofDescriptorProto::SharedCtor() { +void OneofDescriptorProto::SharedCtor() { name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); options_ = nullptr; } @@ -4314,7 +4314,7 @@ EnumDescriptorProto_EnumReservedRange::EnumDescriptorProto_EnumReservedRange(con // @@protoc_insertion_point(copy_constructor:google.protobuf.EnumDescriptorProto.EnumReservedRange) } -inline void EnumDescriptorProto_EnumReservedRange::SharedCtor() { +void EnumDescriptorProto_EnumReservedRange::SharedCtor() { ::memset(reinterpret_cast(this) + static_cast( reinterpret_cast(&start_) - reinterpret_cast(this)), 0, static_cast(reinterpret_cast(&end_) - @@ -4577,7 +4577,7 @@ EnumDescriptorProto::EnumDescriptorProto(const EnumDescriptorProto& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.EnumDescriptorProto) } -inline void EnumDescriptorProto::SharedCtor() { +void EnumDescriptorProto::SharedCtor() { name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); options_ = nullptr; } @@ -4950,7 +4950,7 @@ EnumValueDescriptorProto::EnumValueDescriptorProto(const EnumValueDescriptorProt // @@protoc_insertion_point(copy_constructor:google.protobuf.EnumValueDescriptorProto) } -inline void EnumValueDescriptorProto::SharedCtor() { +void EnumValueDescriptorProto::SharedCtor() { name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); ::memset(reinterpret_cast(this) + static_cast( reinterpret_cast(&options_) - reinterpret_cast(this)), @@ -5257,7 +5257,7 @@ ServiceDescriptorProto::ServiceDescriptorProto(const ServiceDescriptorProto& fro // @@protoc_insertion_point(copy_constructor:google.protobuf.ServiceDescriptorProto) } -inline void ServiceDescriptorProto::SharedCtor() { +void ServiceDescriptorProto::SharedCtor() { name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); options_ = nullptr; } @@ -5584,7 +5584,7 @@ MethodDescriptorProto::MethodDescriptorProto(const MethodDescriptorProto& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.MethodDescriptorProto) } -inline void MethodDescriptorProto::SharedCtor() { +void MethodDescriptorProto::SharedCtor() { name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); input_type_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); output_type_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); @@ -6089,7 +6089,7 @@ FileOptions::FileOptions(const FileOptions& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.FileOptions) } -inline void FileOptions::SharedCtor() { +void FileOptions::SharedCtor() { java_package_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); java_outer_classname_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); go_package_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); @@ -7006,7 +7006,7 @@ MessageOptions::MessageOptions(const MessageOptions& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.MessageOptions) } -inline void MessageOptions::SharedCtor() { +void MessageOptions::SharedCtor() { ::memset(reinterpret_cast(this) + static_cast( reinterpret_cast(&message_set_wire_format_) - reinterpret_cast(this)), 0, static_cast(reinterpret_cast(&map_entry_) - @@ -7354,7 +7354,7 @@ FieldOptions::FieldOptions(const FieldOptions& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.FieldOptions) } -inline void FieldOptions::SharedCtor() { +void FieldOptions::SharedCtor() { ::memset(reinterpret_cast(this) + static_cast( reinterpret_cast(&ctype_) - reinterpret_cast(this)), 0, static_cast(reinterpret_cast(&jstype_) - @@ -7738,7 +7738,7 @@ OneofOptions::OneofOptions(const OneofOptions& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.OneofOptions) } -inline void OneofOptions::SharedCtor() { +void OneofOptions::SharedCtor() { } OneofOptions::~OneofOptions() { @@ -7961,7 +7961,7 @@ EnumOptions::EnumOptions(const EnumOptions& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.EnumOptions) } -inline void EnumOptions::SharedCtor() { +void EnumOptions::SharedCtor() { ::memset(reinterpret_cast(this) + static_cast( reinterpret_cast(&allow_alias_) - reinterpret_cast(this)), 0, static_cast(reinterpret_cast(&deprecated_) - @@ -8248,7 +8248,7 @@ EnumValueOptions::EnumValueOptions(const EnumValueOptions& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.EnumValueOptions) } -inline void EnumValueOptions::SharedCtor() { +void EnumValueOptions::SharedCtor() { deprecated_ = false; } @@ -8497,7 +8497,7 @@ ServiceOptions::ServiceOptions(const ServiceOptions& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.ServiceOptions) } -inline void ServiceOptions::SharedCtor() { +void ServiceOptions::SharedCtor() { deprecated_ = false; } @@ -8751,7 +8751,7 @@ MethodOptions::MethodOptions(const MethodOptions& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.MethodOptions) } -inline void MethodOptions::SharedCtor() { +void MethodOptions::SharedCtor() { ::memset(reinterpret_cast(this) + static_cast( reinterpret_cast(&deprecated_) - reinterpret_cast(this)), 0, static_cast(reinterpret_cast(&idempotency_level_) - @@ -9054,7 +9054,7 @@ UninterpretedOption_NamePart::UninterpretedOption_NamePart(const UninterpretedOp // @@protoc_insertion_point(copy_constructor:google.protobuf.UninterpretedOption.NamePart) } -inline void UninterpretedOption_NamePart::SharedCtor() { +void UninterpretedOption_NamePart::SharedCtor() { name_part_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); is_extension_ = false; } @@ -9347,7 +9347,7 @@ UninterpretedOption::UninterpretedOption(const UninterpretedOption& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.UninterpretedOption) } -inline void UninterpretedOption::SharedCtor() { +void UninterpretedOption::SharedCtor() { identifier_value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); string_value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); aggregate_value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); @@ -9776,7 +9776,7 @@ SourceCodeInfo_Location::SourceCodeInfo_Location(const SourceCodeInfo_Location& // @@protoc_insertion_point(copy_constructor:google.protobuf.SourceCodeInfo.Location) } -inline void SourceCodeInfo_Location::SharedCtor() { +void SourceCodeInfo_Location::SharedCtor() { leading_comments_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); trailing_comments_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } @@ -10143,7 +10143,7 @@ SourceCodeInfo::SourceCodeInfo(const SourceCodeInfo& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.SourceCodeInfo) } -inline void SourceCodeInfo::SharedCtor() { +void SourceCodeInfo::SharedCtor() { } SourceCodeInfo::~SourceCodeInfo() { @@ -10352,7 +10352,7 @@ GeneratedCodeInfo_Annotation::GeneratedCodeInfo_Annotation(const GeneratedCodeIn // @@protoc_insertion_point(copy_constructor:google.protobuf.GeneratedCodeInfo.Annotation) } -inline void GeneratedCodeInfo_Annotation::SharedCtor() { +void GeneratedCodeInfo_Annotation::SharedCtor() { source_file_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); ::memset(reinterpret_cast(this) + static_cast( reinterpret_cast(&begin_) - reinterpret_cast(this)), @@ -10666,7 +10666,7 @@ GeneratedCodeInfo::GeneratedCodeInfo(const GeneratedCodeInfo& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.GeneratedCodeInfo) } -inline void GeneratedCodeInfo::SharedCtor() { +void GeneratedCodeInfo::SharedCtor() { } GeneratedCodeInfo::~GeneratedCodeInfo() { diff --git a/src/google/protobuf/duration.pb.cc b/src/google/protobuf/duration.pb.cc index 13fc338475fa..2f02356645bc 100644 --- a/src/google/protobuf/duration.pb.cc +++ b/src/google/protobuf/duration.pb.cc @@ -99,7 +99,7 @@ Duration::Duration(const Duration& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.Duration) } -inline void Duration::SharedCtor() { +void Duration::SharedCtor() { ::memset(reinterpret_cast(this) + static_cast( reinterpret_cast(&seconds_) - reinterpret_cast(this)), 0, static_cast(reinterpret_cast(&nanos_) - diff --git a/src/google/protobuf/empty.pb.cc b/src/google/protobuf/empty.pb.cc index c86ecc1b4ecc..96ee74a8e27b 100644 --- a/src/google/protobuf/empty.pb.cc +++ b/src/google/protobuf/empty.pb.cc @@ -91,7 +91,7 @@ Empty::Empty(const Empty& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.Empty) } -inline void Empty::SharedCtor() { +void Empty::SharedCtor() { } Empty::~Empty() { diff --git a/src/google/protobuf/field_mask.pb.cc b/src/google/protobuf/field_mask.pb.cc index a76cff2693f7..d073936d83a0 100644 --- a/src/google/protobuf/field_mask.pb.cc +++ b/src/google/protobuf/field_mask.pb.cc @@ -96,7 +96,7 @@ FieldMask::FieldMask(const FieldMask& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.FieldMask) } -inline void FieldMask::SharedCtor() { +void FieldMask::SharedCtor() { } FieldMask::~FieldMask() { diff --git a/src/google/protobuf/source_context.pb.cc b/src/google/protobuf/source_context.pb.cc index 3425dd48bd7c..1181ba87a5c1 100644 --- a/src/google/protobuf/source_context.pb.cc +++ b/src/google/protobuf/source_context.pb.cc @@ -99,7 +99,7 @@ SourceContext::SourceContext(const SourceContext& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.SourceContext) } -inline void SourceContext::SharedCtor() { +void SourceContext::SharedCtor() { file_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } diff --git a/src/google/protobuf/struct.pb.cc b/src/google/protobuf/struct.pb.cc index 61a93a617eb3..a561d2b48ce7 100644 --- a/src/google/protobuf/struct.pb.cc +++ b/src/google/protobuf/struct.pb.cc @@ -201,7 +201,7 @@ Struct::Struct(const Struct& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.Struct) } -inline void Struct::SharedCtor() { +void Struct::SharedCtor() { } Struct::~Struct() { @@ -499,7 +499,7 @@ Value::Value(const Value& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.Value) } -inline void Value::SharedCtor() { +void Value::SharedCtor() { clear_has_kind(); } @@ -866,7 +866,7 @@ ListValue::ListValue(const ListValue& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.ListValue) } -inline void ListValue::SharedCtor() { +void ListValue::SharedCtor() { } ListValue::~ListValue() { diff --git a/src/google/protobuf/timestamp.pb.cc b/src/google/protobuf/timestamp.pb.cc index f87380c29260..c74a97372f5a 100644 --- a/src/google/protobuf/timestamp.pb.cc +++ b/src/google/protobuf/timestamp.pb.cc @@ -99,7 +99,7 @@ Timestamp::Timestamp(const Timestamp& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.Timestamp) } -inline void Timestamp::SharedCtor() { +void Timestamp::SharedCtor() { ::memset(reinterpret_cast(this) + static_cast( reinterpret_cast(&seconds_) - reinterpret_cast(this)), 0, static_cast(reinterpret_cast(&nanos_) - diff --git a/src/google/protobuf/type.pb.cc b/src/google/protobuf/type.pb.cc index 06d8d7db485b..1de2532e3bab 100644 --- a/src/google/protobuf/type.pb.cc +++ b/src/google/protobuf/type.pb.cc @@ -380,7 +380,7 @@ Type::Type(const Type& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.Type) } -inline void Type::SharedCtor() { +void Type::SharedCtor() { name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); ::memset(reinterpret_cast(this) + static_cast( reinterpret_cast(&source_context_) - reinterpret_cast(this)), @@ -760,7 +760,7 @@ Field::Field(const Field& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.Field) } -inline void Field::SharedCtor() { +void Field::SharedCtor() { name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); type_url_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); json_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); @@ -1250,7 +1250,7 @@ Enum::Enum(const Enum& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.Enum) } -inline void Enum::SharedCtor() { +void Enum::SharedCtor() { name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); ::memset(reinterpret_cast(this) + static_cast( reinterpret_cast(&source_context_) - reinterpret_cast(this)), @@ -1578,7 +1578,7 @@ EnumValue::EnumValue(const EnumValue& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.EnumValue) } -inline void EnumValue::SharedCtor() { +void EnumValue::SharedCtor() { name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); number_ = 0; } @@ -1850,7 +1850,7 @@ Option::Option(const Option& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.Option) } -inline void Option::SharedCtor() { +void Option::SharedCtor() { name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); value_ = nullptr; } diff --git a/src/google/protobuf/wrappers.pb.cc b/src/google/protobuf/wrappers.pb.cc index 998758121d64..128ddfc4096c 100644 --- a/src/google/protobuf/wrappers.pb.cc +++ b/src/google/protobuf/wrappers.pb.cc @@ -261,7 +261,7 @@ DoubleValue::DoubleValue(const DoubleValue& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.DoubleValue) } -inline void DoubleValue::SharedCtor() { +void DoubleValue::SharedCtor() { value_ = 0; } @@ -444,7 +444,7 @@ FloatValue::FloatValue(const FloatValue& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.FloatValue) } -inline void FloatValue::SharedCtor() { +void FloatValue::SharedCtor() { value_ = 0; } @@ -627,7 +627,7 @@ Int64Value::Int64Value(const Int64Value& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.Int64Value) } -inline void Int64Value::SharedCtor() { +void Int64Value::SharedCtor() { value_ = int64_t{0}; } @@ -812,7 +812,7 @@ UInt64Value::UInt64Value(const UInt64Value& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.UInt64Value) } -inline void UInt64Value::SharedCtor() { +void UInt64Value::SharedCtor() { value_ = uint64_t{0u}; } @@ -997,7 +997,7 @@ Int32Value::Int32Value(const Int32Value& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.Int32Value) } -inline void Int32Value::SharedCtor() { +void Int32Value::SharedCtor() { value_ = 0; } @@ -1182,7 +1182,7 @@ UInt32Value::UInt32Value(const UInt32Value& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.UInt32Value) } -inline void UInt32Value::SharedCtor() { +void UInt32Value::SharedCtor() { value_ = 0u; } @@ -1367,7 +1367,7 @@ BoolValue::BoolValue(const BoolValue& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.BoolValue) } -inline void BoolValue::SharedCtor() { +void BoolValue::SharedCtor() { value_ = false; } @@ -1554,7 +1554,7 @@ StringValue::StringValue(const StringValue& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.StringValue) } -inline void StringValue::SharedCtor() { +void StringValue::SharedCtor() { value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } @@ -1754,7 +1754,7 @@ BytesValue::BytesValue(const BytesValue& from) // @@protoc_insertion_point(copy_constructor:google.protobuf.BytesValue) } -inline void BytesValue::SharedCtor() { +void BytesValue::SharedCtor() { value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); }