diff options
Diffstat (limited to 'src/google/protobuf/compiler/plugin.pb.cc')
-rw-r--r-- | src/google/protobuf/compiler/plugin.pb.cc | 215 |
1 files changed, 84 insertions, 131 deletions
diff --git a/src/google/protobuf/compiler/plugin.pb.cc b/src/google/protobuf/compiler/plugin.pb.cc index d13ad2b3..ef52def3 100644 --- a/src/google/protobuf/compiler/plugin.pb.cc +++ b/src/google/protobuf/compiler/plugin.pb.cc @@ -7,7 +7,6 @@ #include <google/protobuf/stubs/common.h> #include <google/protobuf/stubs/port.h> -#include <google/protobuf/stubs/once.h> #include <google/protobuf/io/coded_stream.h> #include <google/protobuf/wire_format_lite_inl.h> #include <google/protobuf/descriptor.h> @@ -19,6 +18,14 @@ #include "third_party/protobuf/version.h" #endif // @@protoc_insertion_point(includes) + +namespace protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto { +extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_CodeGeneratorResponse_File; +extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Version; +} // namespace protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto +namespace protobuf_google_2fprotobuf_2fdescriptor_2eproto { +extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fdescriptor_2eproto ::google::protobuf::internal::SCCInfo<6> scc_info_FileDescriptorProto; +} // namespace protobuf_google_2fprotobuf_2fdescriptor_2eproto namespace google { namespace protobuf { namespace compiler { @@ -46,14 +53,9 @@ class CodeGeneratorResponseDefaultTypeInternal { } // namespace protobuf } // namespace google namespace protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto { -void InitDefaultsVersionImpl() { +static void InitDefaultsVersion() { GOOGLE_PROTOBUF_VERIFY_VERSION; -#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS - ::google::protobuf::internal::InitProtobufDefaultsForceUnique(); -#else - ::google::protobuf::internal::InitProtobufDefaults(); -#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS { void* ptr = &::google::protobuf::compiler::_Version_default_instance_; new (ptr) ::google::protobuf::compiler::Version(); @@ -62,21 +64,12 @@ void InitDefaultsVersionImpl() { ::google::protobuf::compiler::Version::InitAsDefaultInstance(); } -void InitDefaultsVersion() { - static GOOGLE_PROTOBUF_DECLARE_ONCE(once); - ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsVersionImpl); -} +LIBPROTOC_EXPORT ::google::protobuf::internal::SCCInfo<0> scc_info_Version = + {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsVersion}, {}}; -void InitDefaultsCodeGeneratorRequestImpl() { +static void InitDefaultsCodeGeneratorRequest() { GOOGLE_PROTOBUF_VERIFY_VERSION; -#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS - ::google::protobuf::internal::InitProtobufDefaultsForceUnique(); -#else - ::google::protobuf::internal::InitProtobufDefaults(); -#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS - protobuf_google_2fprotobuf_2fdescriptor_2eproto::InitDefaultsFileDescriptorProto(); - protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto::InitDefaultsVersion(); { void* ptr = &::google::protobuf::compiler::_CodeGeneratorRequest_default_instance_; new (ptr) ::google::protobuf::compiler::CodeGeneratorRequest(); @@ -85,19 +78,14 @@ void InitDefaultsCodeGeneratorRequestImpl() { ::google::protobuf::compiler::CodeGeneratorRequest::InitAsDefaultInstance(); } -void InitDefaultsCodeGeneratorRequest() { - static GOOGLE_PROTOBUF_DECLARE_ONCE(once); - ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsCodeGeneratorRequestImpl); -} +LIBPROTOC_EXPORT ::google::protobuf::internal::SCCInfo<2> scc_info_CodeGeneratorRequest = + {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsCodeGeneratorRequest}, { + &protobuf_google_2fprotobuf_2fdescriptor_2eproto::scc_info_FileDescriptorProto.base, + &protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto::scc_info_Version.base,}}; -void InitDefaultsCodeGeneratorResponse_FileImpl() { +static void InitDefaultsCodeGeneratorResponse_File() { GOOGLE_PROTOBUF_VERIFY_VERSION; -#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS - ::google::protobuf::internal::InitProtobufDefaultsForceUnique(); -#else - ::google::protobuf::internal::InitProtobufDefaults(); -#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS { void* ptr = &::google::protobuf::compiler::_CodeGeneratorResponse_File_default_instance_; new (ptr) ::google::protobuf::compiler::CodeGeneratorResponse_File(); @@ -106,20 +94,12 @@ void InitDefaultsCodeGeneratorResponse_FileImpl() { ::google::protobuf::compiler::CodeGeneratorResponse_File::InitAsDefaultInstance(); } -void InitDefaultsCodeGeneratorResponse_File() { - static GOOGLE_PROTOBUF_DECLARE_ONCE(once); - ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsCodeGeneratorResponse_FileImpl); -} +LIBPROTOC_EXPORT ::google::protobuf::internal::SCCInfo<0> scc_info_CodeGeneratorResponse_File = + {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsCodeGeneratorResponse_File}, {}}; -void InitDefaultsCodeGeneratorResponseImpl() { +static void InitDefaultsCodeGeneratorResponse() { GOOGLE_PROTOBUF_VERIFY_VERSION; -#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS - ::google::protobuf::internal::InitProtobufDefaultsForceUnique(); -#else - ::google::protobuf::internal::InitProtobufDefaults(); -#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS - protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto::InitDefaultsCodeGeneratorResponse_File(); { void* ptr = &::google::protobuf::compiler::_CodeGeneratorResponse_default_instance_; new (ptr) ::google::protobuf::compiler::CodeGeneratorResponse(); @@ -128,9 +108,15 @@ void InitDefaultsCodeGeneratorResponseImpl() { ::google::protobuf::compiler::CodeGeneratorResponse::InitAsDefaultInstance(); } -void InitDefaultsCodeGeneratorResponse() { - static GOOGLE_PROTOBUF_DECLARE_ONCE(once); - ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsCodeGeneratorResponseImpl); +LIBPROTOC_EXPORT ::google::protobuf::internal::SCCInfo<1> scc_info_CodeGeneratorResponse = + {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsCodeGeneratorResponse}, { + &protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto::scc_info_CodeGeneratorResponse_File.base,}}; + +void InitDefaults() { + ::google::protobuf::internal::InitSCC(&scc_info_Version.base); + ::google::protobuf::internal::InitSCC(&scc_info_CodeGeneratorRequest.base); + ::google::protobuf::internal::InitSCC(&scc_info_CodeGeneratorResponse_File.base); + ::google::protobuf::internal::InitSCC(&scc_info_CodeGeneratorResponse.base); } ::google::protobuf::Metadata file_level_metadata[4]; @@ -199,15 +185,14 @@ static ::google::protobuf::Message const * const file_default_instances[] = { void protobuf_AssignDescriptors() { AddDescriptors(); - ::google::protobuf::MessageFactory* factory = NULL; AssignDescriptors( - "google/protobuf/compiler/plugin.proto", schemas, file_default_instances, TableStruct::offsets, factory, + "google/protobuf/compiler/plugin.proto", schemas, file_default_instances, TableStruct::offsets, file_level_metadata, NULL, NULL); } void protobuf_AssignDescriptorsOnce() { - static GOOGLE_PROTOBUF_DECLARE_ONCE(once); - ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors); + static ::google::protobuf::internal::once_flag once; + ::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors); } void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD; @@ -244,8 +229,8 @@ void AddDescriptorsImpl() { } void AddDescriptors() { - static GOOGLE_PROTOBUF_DECLARE_ONCE(once); - ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl); + static ::google::protobuf::internal::once_flag once; + ::google::protobuf::internal::call_once(once, AddDescriptorsImpl); } // Force AddDescriptors() to be called at dynamic initialization time. struct StaticDescriptorInitializer { @@ -271,17 +256,15 @@ const int Version::kSuffixFieldNumber; Version::Version() : ::google::protobuf::Message(), _internal_metadata_(NULL) { - if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { - ::protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto::InitDefaultsVersion(); - } + ::google::protobuf::internal::InitSCC( + &protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto::scc_info_Version.base); SharedCtor(); // @@protoc_insertion_point(constructor:google.protobuf.compiler.Version) } Version::Version(const Version& from) : ::google::protobuf::Message(), _internal_metadata_(NULL), - _has_bits_(from._has_bits_), - _cached_size_(0) { + _has_bits_(from._has_bits_) { _internal_metadata_.MergeFrom(from._internal_metadata_); suffix_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.has_suffix()) { @@ -294,7 +277,6 @@ Version::Version(const Version& from) } void Version::SharedCtor() { - _cached_size_ = 0; suffix_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); ::memset(&major_, 0, static_cast<size_t>( reinterpret_cast<char*>(&patch_) - @@ -311,9 +293,7 @@ void Version::SharedDtor() { } void Version::SetCachedSize(int size) const { - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); + _cached_size_.Set(size); } const ::google::protobuf::Descriptor* Version::descriptor() { ::protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto::protobuf_AssignDescriptorsOnce(); @@ -321,7 +301,7 @@ const ::google::protobuf::Descriptor* Version::descriptor() { } const Version& Version::default_instance() { - ::protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto::InitDefaultsVersion(); + ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto::scc_info_Version.base); return *internal_default_instance(); } @@ -334,8 +314,7 @@ void Version::Clear() { cached_has_bits = _has_bits_[0]; if (cached_has_bits & 0x00000001u) { - GOOGLE_DCHECK(!suffix_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); - suffix_.UnsafeMutablePointer()->clear(); + suffix_.ClearNonDefaultToEmptyNoArena(); } if (cached_has_bits & 14u) { ::memset(&major_, 0, static_cast<size_t>( @@ -352,7 +331,7 @@ bool Version::MergePartialFromCodedStream( ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.protobuf.compiler.Version) for (;;) { - ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { @@ -555,9 +534,7 @@ size_t Version::ByteSizeLong() const { } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = cached_size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); + SetCachedSize(cached_size); return total_size; } @@ -626,13 +603,13 @@ void Version::Swap(Version* other) { } void Version::InternalSwap(Version* other) { using std::swap; - suffix_.Swap(&other->suffix_); + suffix_.Swap(&other->suffix_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); swap(major_, other->major_); swap(minor_, other->minor_); swap(patch_, other->patch_); swap(_has_bits_[0], other->_has_bits_[0]); _internal_metadata_.Swap(&other->_internal_metadata_); - swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata Version::GetMetadata() const { @@ -659,9 +636,8 @@ const int CodeGeneratorRequest::kCompilerVersionFieldNumber; CodeGeneratorRequest::CodeGeneratorRequest() : ::google::protobuf::Message(), _internal_metadata_(NULL) { - if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { - ::protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto::InitDefaultsCodeGeneratorRequest(); - } + ::google::protobuf::internal::InitSCC( + &protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto::scc_info_CodeGeneratorRequest.base); SharedCtor(); // @@protoc_insertion_point(constructor:google.protobuf.compiler.CodeGeneratorRequest) } @@ -669,7 +645,6 @@ CodeGeneratorRequest::CodeGeneratorRequest(const CodeGeneratorRequest& from) : ::google::protobuf::Message(), _internal_metadata_(NULL), _has_bits_(from._has_bits_), - _cached_size_(0), file_to_generate_(from.file_to_generate_), proto_file_(from.proto_file_) { _internal_metadata_.MergeFrom(from._internal_metadata_); @@ -686,7 +661,6 @@ CodeGeneratorRequest::CodeGeneratorRequest(const CodeGeneratorRequest& from) } void CodeGeneratorRequest::SharedCtor() { - _cached_size_ = 0; parameter_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); compiler_version_ = NULL; } @@ -702,9 +676,7 @@ void CodeGeneratorRequest::SharedDtor() { } void CodeGeneratorRequest::SetCachedSize(int size) const { - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); + _cached_size_.Set(size); } const ::google::protobuf::Descriptor* CodeGeneratorRequest::descriptor() { ::protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto::protobuf_AssignDescriptorsOnce(); @@ -712,7 +684,7 @@ const ::google::protobuf::Descriptor* CodeGeneratorRequest::descriptor() { } const CodeGeneratorRequest& CodeGeneratorRequest::default_instance() { - ::protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto::InitDefaultsCodeGeneratorRequest(); + ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto::scc_info_CodeGeneratorRequest.base); return *internal_default_instance(); } @@ -728,8 +700,7 @@ void CodeGeneratorRequest::Clear() { cached_has_bits = _has_bits_[0]; if (cached_has_bits & 3u) { if (cached_has_bits & 0x00000001u) { - GOOGLE_DCHECK(!parameter_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); - parameter_.UnsafeMutablePointer()->clear(); + parameter_.ClearNonDefaultToEmptyNoArena(); } if (cached_has_bits & 0x00000002u) { GOOGLE_DCHECK(compiler_version_ != NULL); @@ -746,7 +717,7 @@ bool CodeGeneratorRequest::MergePartialFromCodedStream( ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.protobuf.compiler.CodeGeneratorRequest) for (;;) { - ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { @@ -857,7 +828,7 @@ void CodeGeneratorRequest::SerializeWithCachedSizes( // optional .google.protobuf.compiler.Version compiler_version = 3; if (cached_has_bits & 0x00000002u) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 3, *compiler_version_, output); + 3, this->_internal_compiler_version(), output); } // repeated .google.protobuf.FileDescriptorProto proto_file = 15; @@ -909,7 +880,7 @@ void CodeGeneratorRequest::SerializeWithCachedSizes( if (cached_has_bits & 0x00000002u) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( - 3, *compiler_version_, deterministic, target); + 3, this->_internal_compiler_version(), deterministic, target); } // repeated .google.protobuf.FileDescriptorProto proto_file = 15; @@ -973,9 +944,7 @@ size_t CodeGeneratorRequest::ByteSizeLong() const { } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = cached_size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); + SetCachedSize(cached_size); return total_size; } @@ -1042,11 +1011,11 @@ void CodeGeneratorRequest::InternalSwap(CodeGeneratorRequest* other) { using std::swap; file_to_generate_.InternalSwap(CastToBase(&other->file_to_generate_)); CastToBase(&proto_file_)->InternalSwap(CastToBase(&other->proto_file_)); - parameter_.Swap(&other->parameter_); + parameter_.Swap(&other->parameter_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); swap(compiler_version_, other->compiler_version_); swap(_has_bits_[0], other->_has_bits_[0]); _internal_metadata_.Swap(&other->_internal_metadata_); - swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata CodeGeneratorRequest::GetMetadata() const { @@ -1067,17 +1036,15 @@ const int CodeGeneratorResponse_File::kContentFieldNumber; CodeGeneratorResponse_File::CodeGeneratorResponse_File() : ::google::protobuf::Message(), _internal_metadata_(NULL) { - if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { - ::protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto::InitDefaultsCodeGeneratorResponse_File(); - } + ::google::protobuf::internal::InitSCC( + &protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto::scc_info_CodeGeneratorResponse_File.base); SharedCtor(); // @@protoc_insertion_point(constructor:google.protobuf.compiler.CodeGeneratorResponse.File) } CodeGeneratorResponse_File::CodeGeneratorResponse_File(const CodeGeneratorResponse_File& from) : ::google::protobuf::Message(), _internal_metadata_(NULL), - _has_bits_(from._has_bits_), - _cached_size_(0) { + _has_bits_(from._has_bits_) { _internal_metadata_.MergeFrom(from._internal_metadata_); name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.has_name()) { @@ -1095,7 +1062,6 @@ CodeGeneratorResponse_File::CodeGeneratorResponse_File(const CodeGeneratorRespon } void CodeGeneratorResponse_File::SharedCtor() { - _cached_size_ = 0; name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); insertion_point_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); content_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); @@ -1113,9 +1079,7 @@ void CodeGeneratorResponse_File::SharedDtor() { } void CodeGeneratorResponse_File::SetCachedSize(int size) const { - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); + _cached_size_.Set(size); } const ::google::protobuf::Descriptor* CodeGeneratorResponse_File::descriptor() { ::protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto::protobuf_AssignDescriptorsOnce(); @@ -1123,7 +1087,7 @@ const ::google::protobuf::Descriptor* CodeGeneratorResponse_File::descriptor() { } const CodeGeneratorResponse_File& CodeGeneratorResponse_File::default_instance() { - ::protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto::InitDefaultsCodeGeneratorResponse_File(); + ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto::scc_info_CodeGeneratorResponse_File.base); return *internal_default_instance(); } @@ -1137,16 +1101,13 @@ void CodeGeneratorResponse_File::Clear() { cached_has_bits = _has_bits_[0]; if (cached_has_bits & 7u) { if (cached_has_bits & 0x00000001u) { - GOOGLE_DCHECK(!name_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); - name_.UnsafeMutablePointer()->clear(); + name_.ClearNonDefaultToEmptyNoArena(); } if (cached_has_bits & 0x00000002u) { - GOOGLE_DCHECK(!insertion_point_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); - insertion_point_.UnsafeMutablePointer()->clear(); + insertion_point_.ClearNonDefaultToEmptyNoArena(); } if (cached_has_bits & 0x00000004u) { - GOOGLE_DCHECK(!content_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); - content_.UnsafeMutablePointer()->clear(); + content_.ClearNonDefaultToEmptyNoArena(); } } _has_bits_.Clear(); @@ -1159,7 +1120,7 @@ bool CodeGeneratorResponse_File::MergePartialFromCodedStream( ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.protobuf.compiler.CodeGeneratorResponse.File) for (;;) { - ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { @@ -1357,9 +1318,7 @@ size_t CodeGeneratorResponse_File::ByteSizeLong() const { } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = cached_size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); + SetCachedSize(cached_size); return total_size; } @@ -1426,12 +1385,14 @@ void CodeGeneratorResponse_File::Swap(CodeGeneratorResponse_File* other) { } void CodeGeneratorResponse_File::InternalSwap(CodeGeneratorResponse_File* other) { using std::swap; - name_.Swap(&other->name_); - insertion_point_.Swap(&other->insertion_point_); - content_.Swap(&other->content_); + name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + insertion_point_.Swap(&other->insertion_point_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + content_.Swap(&other->content_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); swap(_has_bits_[0], other->_has_bits_[0]); _internal_metadata_.Swap(&other->_internal_metadata_); - swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata CodeGeneratorResponse_File::GetMetadata() const { @@ -1451,9 +1412,8 @@ const int CodeGeneratorResponse::kFileFieldNumber; CodeGeneratorResponse::CodeGeneratorResponse() : ::google::protobuf::Message(), _internal_metadata_(NULL) { - if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { - ::protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto::InitDefaultsCodeGeneratorResponse(); - } + ::google::protobuf::internal::InitSCC( + &protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto::scc_info_CodeGeneratorResponse.base); SharedCtor(); // @@protoc_insertion_point(constructor:google.protobuf.compiler.CodeGeneratorResponse) } @@ -1461,7 +1421,6 @@ CodeGeneratorResponse::CodeGeneratorResponse(const CodeGeneratorResponse& from) : ::google::protobuf::Message(), _internal_metadata_(NULL), _has_bits_(from._has_bits_), - _cached_size_(0), file_(from.file_) { _internal_metadata_.MergeFrom(from._internal_metadata_); error_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); @@ -1472,7 +1431,6 @@ CodeGeneratorResponse::CodeGeneratorResponse(const CodeGeneratorResponse& from) } void CodeGeneratorResponse::SharedCtor() { - _cached_size_ = 0; error_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } @@ -1486,9 +1444,7 @@ void CodeGeneratorResponse::SharedDtor() { } void CodeGeneratorResponse::SetCachedSize(int size) const { - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); + _cached_size_.Set(size); } const ::google::protobuf::Descriptor* CodeGeneratorResponse::descriptor() { ::protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto::protobuf_AssignDescriptorsOnce(); @@ -1496,7 +1452,7 @@ const ::google::protobuf::Descriptor* CodeGeneratorResponse::descriptor() { } const CodeGeneratorResponse& CodeGeneratorResponse::default_instance() { - ::protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto::InitDefaultsCodeGeneratorResponse(); + ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto::scc_info_CodeGeneratorResponse.base); return *internal_default_instance(); } @@ -1510,8 +1466,7 @@ void CodeGeneratorResponse::Clear() { file_.Clear(); cached_has_bits = _has_bits_[0]; if (cached_has_bits & 0x00000001u) { - GOOGLE_DCHECK(!error_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); - error_.UnsafeMutablePointer()->clear(); + error_.ClearNonDefaultToEmptyNoArena(); } _has_bits_.Clear(); _internal_metadata_.Clear(); @@ -1523,7 +1478,7 @@ bool CodeGeneratorResponse::MergePartialFromCodedStream( ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.protobuf.compiler.CodeGeneratorResponse) for (;;) { - ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { @@ -1671,9 +1626,7 @@ size_t CodeGeneratorResponse::ByteSizeLong() const { } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = cached_size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); + SetCachedSize(cached_size); return total_size; } @@ -1731,10 +1684,10 @@ void CodeGeneratorResponse::Swap(CodeGeneratorResponse* other) { void CodeGeneratorResponse::InternalSwap(CodeGeneratorResponse* other) { using std::swap; CastToBase(&file_)->InternalSwap(CastToBase(&other->file_)); - error_.Swap(&other->error_); + error_.Swap(&other->error_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); swap(_has_bits_[0], other->_has_bits_[0]); _internal_metadata_.Swap(&other->_internal_metadata_); - swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata CodeGeneratorResponse::GetMetadata() const { @@ -1749,16 +1702,16 @@ void CodeGeneratorResponse::InternalSwap(CodeGeneratorResponse* other) { } // namespace google namespace google { namespace protobuf { -template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::compiler::Version* Arena::Create< ::google::protobuf::compiler::Version >(Arena* arena) { +template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::compiler::Version* Arena::CreateMaybeMessage< ::google::protobuf::compiler::Version >(Arena* arena) { return Arena::CreateInternal< ::google::protobuf::compiler::Version >(arena); } -template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::compiler::CodeGeneratorRequest* Arena::Create< ::google::protobuf::compiler::CodeGeneratorRequest >(Arena* arena) { +template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::compiler::CodeGeneratorRequest* Arena::CreateMaybeMessage< ::google::protobuf::compiler::CodeGeneratorRequest >(Arena* arena) { return Arena::CreateInternal< ::google::protobuf::compiler::CodeGeneratorRequest >(arena); } -template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::compiler::CodeGeneratorResponse_File* Arena::Create< ::google::protobuf::compiler::CodeGeneratorResponse_File >(Arena* arena) { +template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::compiler::CodeGeneratorResponse_File* Arena::CreateMaybeMessage< ::google::protobuf::compiler::CodeGeneratorResponse_File >(Arena* arena) { return Arena::CreateInternal< ::google::protobuf::compiler::CodeGeneratorResponse_File >(arena); } -template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::compiler::CodeGeneratorResponse* Arena::Create< ::google::protobuf::compiler::CodeGeneratorResponse >(Arena* arena) { +template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::compiler::CodeGeneratorResponse* Arena::CreateMaybeMessage< ::google::protobuf::compiler::CodeGeneratorResponse >(Arena* arena) { return Arena::CreateInternal< ::google::protobuf::compiler::CodeGeneratorResponse >(arena); } } // namespace protobuf |