Internal changes

PiperOrigin-RevId: 494281361
pull/11213/head
Mike Kruskal 2 years ago committed by Copybara-Service
parent 615bdd3e2a
commit 40ce34a479
  1. 8
      src/google/protobuf/compiler/cpp/generator.cc
  2. 8
      src/google/protobuf/compiler/cpp/service.cc
  3. 20
      src/google/protobuf/compiler/plugin.pb.cc
  4. 12
      src/google/protobuf/compiler/plugin.pb.h
  5. 128
      src/google/protobuf/descriptor.pb.cc
  6. 70
      src/google/protobuf/descriptor.pb.h
  7. 38
      src/google/protobuf/parse_context.h

@ -84,11 +84,11 @@ absl::flat_hash_map<absl::string_view, std::string> CommonVars(
{"GOOGLE_PROTOBUF", is_oss ? "GOOGLE_PROTOBUF"
: "GOOGLE3_PROTOBU"
"F"},
{"CHK", is_oss ? "GOOGLE_CHECK"
: "CHEC"
{"CHK", is_oss ? "GOOGLE_ABSL_CHECK"
: "ABSL_CHEC"
"K"},
{"DCHK", is_oss ? "GOOGLE_DCHECK"
: "DCHEC"
{"DCHK", is_oss ? "GOOGLE_ABSL_DCHECK"
: "ABSL_DCHEC"
"K"},
};
}

@ -212,12 +212,12 @@ void ServiceGenerator::GenerateCallMethod(io::Printer* printer) {
::$proto_ns$::RpcController* controller,
const ::$proto_ns$::Message* request,
::$proto_ns$::Message* response, ::google::protobuf::Closure* done) {
GOOGLE_DCHECK_EQ(method->service(), $file_level_service_descriptors$[$index$]);
GOOGLE_ABSL_DCHECK_EQ(method->service(), $file_level_service_descriptors$[$index$]);
switch (method->index()) {
$cases$;
default:
GOOGLE_LOG(FATAL) << "Bad method index; this should never happen.";
GOOGLE_ABSL_LOG(FATAL) << "Bad method index; this should never happen.";
break;
}
}
@ -253,12 +253,12 @@ void ServiceGenerator::GenerateGetPrototype(RequestOrResponse which,
R"cc(
const ::$proto_ns$::Message& $classname$::Get$which$Prototype(
const ::$proto_ns$::MethodDescriptor* method) const {
GOOGLE_DCHECK_EQ(method->service(), descriptor());
GOOGLE_ABSL_DCHECK_EQ(method->service(), descriptor());
switch (method->index()) {
$cases$;
default:
GOOGLE_LOG(FATAL) << "Bad method index; this should never happen.";
GOOGLE_ABSL_LOG(FATAL) << "Bad method index; this should never happen.";
return *::$proto_ns$::MessageFactory::generated_factory()
->GetPrototype(method->$which_type$_type());
}

@ -343,7 +343,7 @@ Version::~Version() {
}
inline void Version::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
GOOGLE_ABSL_DCHECK(GetArenaForAllocation() == nullptr);
_impl_.suffix_.Destroy();
}
@ -538,7 +538,7 @@ void Version::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOB
auto& from = static_cast<const Version&>(from_msg);
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.compiler.Version)
GOOGLE_DCHECK_NE(&from, _this);
GOOGLE_ABSL_DCHECK_NE(&from, _this);
::uint32_t cached_has_bits = 0;
(void) cached_has_bits;
@ -676,7 +676,7 @@ CodeGeneratorRequest::~CodeGeneratorRequest() {
}
inline void CodeGeneratorRequest::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
GOOGLE_ABSL_DCHECK(GetArenaForAllocation() == nullptr);
_impl_.file_to_generate_.~RepeatedPtrField();
_impl_.proto_file_.~RepeatedPtrField();
_impl_.parameter_.Destroy();
@ -701,7 +701,7 @@ void CodeGeneratorRequest::Clear() {
_impl_.parameter_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000002u) {
GOOGLE_DCHECK(_impl_.compiler_version_ != nullptr);
GOOGLE_ABSL_DCHECK(_impl_.compiler_version_ != nullptr);
_impl_.compiler_version_->Clear();
}
}
@ -902,7 +902,7 @@ void CodeGeneratorRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, c
auto& from = static_cast<const CodeGeneratorRequest&>(from_msg);
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.compiler.CodeGeneratorRequest)
GOOGLE_DCHECK_NE(&from, _this);
GOOGLE_ABSL_DCHECK_NE(&from, _this);
::uint32_t cached_has_bits = 0;
(void) cached_has_bits;
@ -1066,7 +1066,7 @@ CodeGeneratorResponse_File::~CodeGeneratorResponse_File() {
}
inline void CodeGeneratorResponse_File::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
GOOGLE_ABSL_DCHECK(GetArenaForAllocation() == nullptr);
_impl_.name_.Destroy();
_impl_.insertion_point_.Destroy();
_impl_.content_.Destroy();
@ -1095,7 +1095,7 @@ void CodeGeneratorResponse_File::Clear() {
_impl_.content_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000008u) {
GOOGLE_DCHECK(_impl_.generated_code_info_ != nullptr);
GOOGLE_ABSL_DCHECK(_impl_.generated_code_info_ != nullptr);
_impl_.generated_code_info_->Clear();
}
}
@ -1291,7 +1291,7 @@ void CodeGeneratorResponse_File::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_
auto& from = static_cast<const CodeGeneratorResponse_File&>(from_msg);
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.compiler.CodeGeneratorResponse.File)
GOOGLE_DCHECK_NE(&from, _this);
GOOGLE_ABSL_DCHECK_NE(&from, _this);
::uint32_t cached_has_bits = 0;
(void) cached_has_bits;
@ -1420,7 +1420,7 @@ CodeGeneratorResponse::~CodeGeneratorResponse() {
}
inline void CodeGeneratorResponse::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
GOOGLE_ABSL_DCHECK(GetArenaForAllocation() == nullptr);
_impl_.file_.~RepeatedPtrField();
_impl_.error_.Destroy();
}
@ -1600,7 +1600,7 @@ void CodeGeneratorResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg,
auto& from = static_cast<const CodeGeneratorResponse&>(from_msg);
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.compiler.CodeGeneratorResponse)
GOOGLE_DCHECK_NE(&from, _this);
GOOGLE_ABSL_DCHECK_NE(&from, _this);
::uint32_t cached_has_bits = 0;
(void) cached_has_bits;

@ -194,7 +194,7 @@ class PROTOC_EXPORT Version final :
}
void UnsafeArenaSwap(Version* other) {
if (other == this) return;
GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
GOOGLE_ABSL_DCHECK(GetOwningArena() == other->GetOwningArena());
InternalSwap(other);
}
@ -390,7 +390,7 @@ class PROTOC_EXPORT CodeGeneratorRequest final :
}
void UnsafeArenaSwap(CodeGeneratorRequest* other) {
if (other == this) return;
GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
GOOGLE_ABSL_DCHECK(GetOwningArena() == other->GetOwningArena());
InternalSwap(other);
}
@ -613,7 +613,7 @@ class PROTOC_EXPORT CodeGeneratorResponse_File final :
}
void UnsafeArenaSwap(CodeGeneratorResponse_File* other) {
if (other == this) return;
GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
GOOGLE_ABSL_DCHECK(GetOwningArena() == other->GetOwningArena());
InternalSwap(other);
}
@ -824,7 +824,7 @@ class PROTOC_EXPORT CodeGeneratorResponse final :
}
void UnsafeArenaSwap(CodeGeneratorResponse* other) {
if (other == this) return;
GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
GOOGLE_ABSL_DCHECK(GetOwningArena() == other->GetOwningArena());
InternalSwap(other);
}
@ -1156,7 +1156,7 @@ inline void CodeGeneratorRequest::set_file_to_generate(int index, std::string&&
// @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate)
}
inline void CodeGeneratorRequest::set_file_to_generate(int index, const char* value) {
GOOGLE_DCHECK(value != nullptr); _impl_.file_to_generate_.Mutable(index)->assign(value);
GOOGLE_ABSL_DCHECK(value != nullptr); _impl_.file_to_generate_.Mutable(index)->assign(value);
// @@protoc_insertion_point(field_set_char:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate)
}
inline void CodeGeneratorRequest::set_file_to_generate(int index, const char* value, ::size_t size) {
@ -1176,7 +1176,7 @@ inline void CodeGeneratorRequest::add_file_to_generate(std::string&& value) {
// @@protoc_insertion_point(field_add:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate)
}
inline void CodeGeneratorRequest::add_file_to_generate(const char* value) {
GOOGLE_DCHECK(value != nullptr); _impl_.file_to_generate_.Add()->assign(value);
GOOGLE_ABSL_DCHECK(value != nullptr); _impl_.file_to_generate_.Add()->assign(value);
// @@protoc_insertion_point(field_add_char:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate)
}
inline void CodeGeneratorRequest::add_file_to_generate(const char* value, ::size_t size) {

@ -1515,7 +1515,7 @@ FileDescriptorSet::~FileDescriptorSet() {
}
inline void FileDescriptorSet::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
GOOGLE_ABSL_DCHECK(GetArenaForAllocation() == nullptr);
_impl_.file_.~RepeatedPtrField();
}
@ -1631,7 +1631,7 @@ void FileDescriptorSet::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, cons
auto& from = static_cast<const FileDescriptorSet&>(from_msg);
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.FileDescriptorSet)
GOOGLE_DCHECK_NE(&from, _this);
GOOGLE_ABSL_DCHECK_NE(&from, _this);
::uint32_t cached_has_bits = 0;
(void) cached_has_bits;
@ -1815,7 +1815,7 @@ FileDescriptorProto::~FileDescriptorProto() {
}
inline void FileDescriptorProto::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
GOOGLE_ABSL_DCHECK(GetArenaForAllocation() == nullptr);
_impl_.dependency_.~RepeatedPtrField();
_impl_.message_type_.~RepeatedPtrField();
_impl_.enum_type_.~RepeatedPtrField();
@ -1863,11 +1863,11 @@ void FileDescriptorProto::Clear() {
_impl_.edition_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000010u) {
GOOGLE_DCHECK(_impl_.options_ != nullptr);
GOOGLE_ABSL_DCHECK(_impl_.options_ != nullptr);
_impl_.options_->Clear();
}
if (cached_has_bits & 0x00000020u) {
GOOGLE_DCHECK(_impl_.source_code_info_ != nullptr);
GOOGLE_ABSL_DCHECK(_impl_.source_code_info_ != nullptr);
_impl_.source_code_info_->Clear();
}
}
@ -2332,7 +2332,7 @@ void FileDescriptorProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, co
auto& from = static_cast<const FileDescriptorProto&>(from_msg);
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.FileDescriptorProto)
GOOGLE_DCHECK_NE(&from, _this);
GOOGLE_ABSL_DCHECK_NE(&from, _this);
::uint32_t cached_has_bits = 0;
(void) cached_has_bits;
@ -2503,7 +2503,7 @@ DescriptorProto_ExtensionRange::~DescriptorProto_ExtensionRange() {
}
inline void DescriptorProto_ExtensionRange::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
GOOGLE_ABSL_DCHECK(GetArenaForAllocation() == nullptr);
if (this != internal_default_instance()) delete _impl_.options_;
}
@ -2519,7 +2519,7 @@ void DescriptorProto_ExtensionRange::Clear() {
cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000001u) {
GOOGLE_DCHECK(_impl_.options_ != nullptr);
GOOGLE_ABSL_DCHECK(_impl_.options_ != nullptr);
_impl_.options_->Clear();
}
if (cached_has_bits & 0x00000006u) {
@ -2671,7 +2671,7 @@ void DescriptorProto_ExtensionRange::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message&
auto& from = static_cast<const DescriptorProto_ExtensionRange&>(from_msg);
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.DescriptorProto.ExtensionRange)
GOOGLE_DCHECK_NE(&from, _this);
GOOGLE_ABSL_DCHECK_NE(&from, _this);
::uint32_t cached_has_bits = 0;
(void) cached_has_bits;
@ -2771,7 +2771,7 @@ DescriptorProto_ReservedRange::~DescriptorProto_ReservedRange() {
}
inline void DescriptorProto_ReservedRange::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
GOOGLE_ABSL_DCHECK(GetArenaForAllocation() == nullptr);
}
void DescriptorProto_ReservedRange::SetCachedSize(int size) const {
@ -2911,7 +2911,7 @@ void DescriptorProto_ReservedRange::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message&
auto& from = static_cast<const DescriptorProto_ReservedRange&>(from_msg);
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.DescriptorProto.ReservedRange)
GOOGLE_DCHECK_NE(&from, _this);
GOOGLE_ABSL_DCHECK_NE(&from, _this);
::uint32_t cached_has_bits = 0;
(void) cached_has_bits;
@ -3046,7 +3046,7 @@ DescriptorProto::~DescriptorProto() {
}
inline void DescriptorProto::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
GOOGLE_ABSL_DCHECK(GetArenaForAllocation() == nullptr);
_impl_.field_.~RepeatedPtrField();
_impl_.nested_type_.~RepeatedPtrField();
_impl_.enum_type_.~RepeatedPtrField();
@ -3083,7 +3083,7 @@ void DescriptorProto::Clear() {
_impl_.name_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000002u) {
GOOGLE_DCHECK(_impl_.options_ != nullptr);
GOOGLE_ABSL_DCHECK(_impl_.options_ != nullptr);
_impl_.options_->Clear();
}
}
@ -3458,7 +3458,7 @@ void DescriptorProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const
auto& from = static_cast<const DescriptorProto&>(from_msg);
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.DescriptorProto)
GOOGLE_DCHECK_NE(&from, _this);
GOOGLE_ABSL_DCHECK_NE(&from, _this);
::uint32_t cached_has_bits = 0;
(void) cached_has_bits;
@ -3579,7 +3579,7 @@ ExtensionRangeOptions::~ExtensionRangeOptions() {
}
inline void ExtensionRangeOptions::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
GOOGLE_ABSL_DCHECK(GetArenaForAllocation() == nullptr);
_impl_._extensions_.~ExtensionSet();
_impl_.uninterpreted_option_.~RepeatedPtrField();
}
@ -3708,7 +3708,7 @@ void ExtensionRangeOptions::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg,
auto& from = static_cast<const ExtensionRangeOptions&>(from_msg);
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.ExtensionRangeOptions)
GOOGLE_DCHECK_NE(&from, _this);
GOOGLE_ABSL_DCHECK_NE(&from, _this);
::uint32_t cached_has_bits = 0;
(void) cached_has_bits;
@ -3916,7 +3916,7 @@ FieldDescriptorProto::~FieldDescriptorProto() {
}
inline void FieldDescriptorProto::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
GOOGLE_ABSL_DCHECK(GetArenaForAllocation() == nullptr);
_impl_.name_.Destroy();
_impl_.extendee_.Destroy();
_impl_.type_name_.Destroy();
@ -3953,7 +3953,7 @@ void FieldDescriptorProto::Clear() {
_impl_.json_name_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000020u) {
GOOGLE_DCHECK(_impl_.options_ != nullptr);
GOOGLE_ABSL_DCHECK(_impl_.options_ != nullptr);
_impl_.options_->Clear();
}
}
@ -4338,7 +4338,7 @@ void FieldDescriptorProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, c
auto& from = static_cast<const FieldDescriptorProto&>(from_msg);
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.FieldDescriptorProto)
GOOGLE_DCHECK_NE(&from, _this);
GOOGLE_ABSL_DCHECK_NE(&from, _this);
::uint32_t cached_has_bits = 0;
(void) cached_has_bits;
@ -4513,7 +4513,7 @@ OneofDescriptorProto::~OneofDescriptorProto() {
}
inline void OneofDescriptorProto::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
GOOGLE_ABSL_DCHECK(GetArenaForAllocation() == nullptr);
_impl_.name_.Destroy();
if (this != internal_default_instance()) delete _impl_.options_;
}
@ -4534,7 +4534,7 @@ void OneofDescriptorProto::Clear() {
_impl_.name_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000002u) {
GOOGLE_DCHECK(_impl_.options_ != nullptr);
GOOGLE_ABSL_DCHECK(_impl_.options_ != nullptr);
_impl_.options_->Clear();
}
}
@ -4670,7 +4670,7 @@ void OneofDescriptorProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, c
auto& from = static_cast<const OneofDescriptorProto&>(from_msg);
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.OneofDescriptorProto)
GOOGLE_DCHECK_NE(&from, _this);
GOOGLE_ABSL_DCHECK_NE(&from, _this);
::uint32_t cached_has_bits = 0;
(void) cached_has_bits;
@ -4767,7 +4767,7 @@ EnumDescriptorProto_EnumReservedRange::~EnumDescriptorProto_EnumReservedRange()
}
inline void EnumDescriptorProto_EnumReservedRange::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
GOOGLE_ABSL_DCHECK(GetArenaForAllocation() == nullptr);
}
void EnumDescriptorProto_EnumReservedRange::SetCachedSize(int size) const {
@ -4907,7 +4907,7 @@ void EnumDescriptorProto_EnumReservedRange::MergeImpl(::PROTOBUF_NAMESPACE_ID::M
auto& from = static_cast<const EnumDescriptorProto_EnumReservedRange&>(from_msg);
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.EnumDescriptorProto.EnumReservedRange)
GOOGLE_DCHECK_NE(&from, _this);
GOOGLE_ABSL_DCHECK_NE(&from, _this);
::uint32_t cached_has_bits = 0;
(void) cached_has_bits;
@ -5032,7 +5032,7 @@ EnumDescriptorProto::~EnumDescriptorProto() {
}
inline void EnumDescriptorProto::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
GOOGLE_ABSL_DCHECK(GetArenaForAllocation() == nullptr);
_impl_.value_.~RepeatedPtrField();
_impl_.reserved_range_.~RepeatedPtrField();
_impl_.reserved_name_.~RepeatedPtrField();
@ -5059,7 +5059,7 @@ void EnumDescriptorProto::Clear() {
_impl_.name_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000002u) {
GOOGLE_DCHECK(_impl_.options_ != nullptr);
GOOGLE_ABSL_DCHECK(_impl_.options_ != nullptr);
_impl_.options_->Clear();
}
}
@ -5289,7 +5289,7 @@ void EnumDescriptorProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, co
auto& from = static_cast<const EnumDescriptorProto&>(from_msg);
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.EnumDescriptorProto)
GOOGLE_DCHECK_NE(&from, _this);
GOOGLE_ABSL_DCHECK_NE(&from, _this);
::uint32_t cached_has_bits = 0;
(void) cached_has_bits;
@ -5426,7 +5426,7 @@ EnumValueDescriptorProto::~EnumValueDescriptorProto() {
}
inline void EnumValueDescriptorProto::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
GOOGLE_ABSL_DCHECK(GetArenaForAllocation() == nullptr);
_impl_.name_.Destroy();
if (this != internal_default_instance()) delete _impl_.options_;
}
@ -5447,7 +5447,7 @@ void EnumValueDescriptorProto::Clear() {
_impl_.name_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000002u) {
GOOGLE_DCHECK(_impl_.options_ != nullptr);
GOOGLE_ABSL_DCHECK(_impl_.options_ != nullptr);
_impl_.options_->Clear();
}
}
@ -5605,7 +5605,7 @@ void EnumValueDescriptorProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_ms
auto& from = static_cast<const EnumValueDescriptorProto&>(from_msg);
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.EnumValueDescriptorProto)
GOOGLE_DCHECK_NE(&from, _this);
GOOGLE_ABSL_DCHECK_NE(&from, _this);
::uint32_t cached_has_bits = 0;
(void) cached_has_bits;
@ -5739,7 +5739,7 @@ ServiceDescriptorProto::~ServiceDescriptorProto() {
}
inline void ServiceDescriptorProto::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
GOOGLE_ABSL_DCHECK(GetArenaForAllocation() == nullptr);
_impl_.method_.~RepeatedPtrField();
_impl_.name_.Destroy();
if (this != internal_default_instance()) delete _impl_.options_;
@ -5762,7 +5762,7 @@ void ServiceDescriptorProto::Clear() {
_impl_.name_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000002u) {
GOOGLE_DCHECK(_impl_.options_ != nullptr);
GOOGLE_ABSL_DCHECK(_impl_.options_ != nullptr);
_impl_.options_->Clear();
}
}
@ -5927,7 +5927,7 @@ void ServiceDescriptorProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg,
auto& from = static_cast<const ServiceDescriptorProto&>(from_msg);
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.ServiceDescriptorProto)
GOOGLE_DCHECK_NE(&from, _this);
GOOGLE_ABSL_DCHECK_NE(&from, _this);
::uint32_t cached_has_bits = 0;
(void) cached_has_bits;
@ -6101,7 +6101,7 @@ MethodDescriptorProto::~MethodDescriptorProto() {
}
inline void MethodDescriptorProto::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
GOOGLE_ABSL_DCHECK(GetArenaForAllocation() == nullptr);
_impl_.name_.Destroy();
_impl_.input_type_.Destroy();
_impl_.output_type_.Destroy();
@ -6130,7 +6130,7 @@ void MethodDescriptorProto::Clear() {
_impl_.output_type_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000008u) {
GOOGLE_DCHECK(_impl_.options_ != nullptr);
GOOGLE_ABSL_DCHECK(_impl_.options_ != nullptr);
_impl_.options_->Clear();
}
}
@ -6371,7 +6371,7 @@ void MethodDescriptorProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg,
auto& from = static_cast<const MethodDescriptorProto&>(from_msg);
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.MethodDescriptorProto)
GOOGLE_DCHECK_NE(&from, _this);
GOOGLE_ABSL_DCHECK_NE(&from, _this);
::uint32_t cached_has_bits = 0;
(void) cached_has_bits;
@ -6718,7 +6718,7 @@ FileOptions::~FileOptions() {
}
inline void FileOptions::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
GOOGLE_ABSL_DCHECK(GetArenaForAllocation() == nullptr);
_impl_._extensions_.~ExtensionSet();
_impl_.uninterpreted_option_.~RepeatedPtrField();
_impl_.java_package_.Destroy();
@ -7431,7 +7431,7 @@ void FileOptions::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PR
auto& from = static_cast<const FileOptions&>(from_msg);
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.FileOptions)
GOOGLE_DCHECK_NE(&from, _this);
GOOGLE_ABSL_DCHECK_NE(&from, _this);
::uint32_t cached_has_bits = 0;
(void) cached_has_bits;
@ -7659,7 +7659,7 @@ MessageOptions::~MessageOptions() {
}
inline void MessageOptions::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
GOOGLE_ABSL_DCHECK(GetArenaForAllocation() == nullptr);
_impl_._extensions_.~ExtensionSet();
_impl_.uninterpreted_option_.~RepeatedPtrField();
}
@ -7882,7 +7882,7 @@ void MessageOptions::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const :
auto& from = static_cast<const MessageOptions&>(from_msg);
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.MessageOptions)
GOOGLE_DCHECK_NE(&from, _this);
GOOGLE_ABSL_DCHECK_NE(&from, _this);
::uint32_t cached_has_bits = 0;
(void) cached_has_bits;
@ -8030,7 +8030,7 @@ FieldOptions::~FieldOptions() {
}
inline void FieldOptions::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
GOOGLE_ABSL_DCHECK(GetArenaForAllocation() == nullptr);
_impl_._extensions_.~ExtensionSet();
_impl_.uninterpreted_option_.~RepeatedPtrField();
}
@ -8331,7 +8331,7 @@ void FieldOptions::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::P
auto& from = static_cast<const FieldOptions&>(from_msg);
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.FieldOptions)
GOOGLE_DCHECK_NE(&from, _this);
GOOGLE_ABSL_DCHECK_NE(&from, _this);
::uint32_t cached_has_bits = 0;
(void) cached_has_bits;
@ -8445,7 +8445,7 @@ OneofOptions::~OneofOptions() {
}
inline void OneofOptions::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
GOOGLE_ABSL_DCHECK(GetArenaForAllocation() == nullptr);
_impl_._extensions_.~ExtensionSet();
_impl_.uninterpreted_option_.~RepeatedPtrField();
}
@ -8574,7 +8574,7 @@ void OneofOptions::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::P
auto& from = static_cast<const OneofOptions&>(from_msg);
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.OneofOptions)
GOOGLE_DCHECK_NE(&from, _this);
GOOGLE_ABSL_DCHECK_NE(&from, _this);
::uint32_t cached_has_bits = 0;
(void) cached_has_bits;
@ -8674,7 +8674,7 @@ EnumOptions::~EnumOptions() {
}
inline void EnumOptions::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
GOOGLE_ABSL_DCHECK(GetArenaForAllocation() == nullptr);
_impl_._extensions_.~ExtensionSet();
_impl_.uninterpreted_option_.~RepeatedPtrField();
}
@ -8855,7 +8855,7 @@ void EnumOptions::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PR
auto& from = static_cast<const EnumOptions&>(from_msg);
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.EnumOptions)
GOOGLE_DCHECK_NE(&from, _this);
GOOGLE_ABSL_DCHECK_NE(&from, _this);
::uint32_t cached_has_bits = 0;
(void) cached_has_bits;
@ -8965,7 +8965,7 @@ EnumValueOptions::~EnumValueOptions() {
}
inline void EnumValueOptions::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
GOOGLE_ABSL_DCHECK(GetArenaForAllocation() == nullptr);
_impl_._extensions_.~ExtensionSet();
_impl_.uninterpreted_option_.~RepeatedPtrField();
}
@ -9121,7 +9121,7 @@ void EnumValueOptions::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const
auto& from = static_cast<const EnumValueOptions&>(from_msg);
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.EnumValueOptions)
GOOGLE_DCHECK_NE(&from, _this);
GOOGLE_ABSL_DCHECK_NE(&from, _this);
::uint32_t cached_has_bits = 0;
(void) cached_has_bits;
@ -9219,7 +9219,7 @@ ServiceOptions::~ServiceOptions() {
}
inline void ServiceOptions::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
GOOGLE_ABSL_DCHECK(GetArenaForAllocation() == nullptr);
_impl_._extensions_.~ExtensionSet();
_impl_.uninterpreted_option_.~RepeatedPtrField();
}
@ -9375,7 +9375,7 @@ void ServiceOptions::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const :
auto& from = static_cast<const ServiceOptions&>(from_msg);
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.ServiceOptions)
GOOGLE_DCHECK_NE(&from, _this);
GOOGLE_ABSL_DCHECK_NE(&from, _this);
::uint32_t cached_has_bits = 0;
(void) cached_has_bits;
@ -9480,7 +9480,7 @@ MethodOptions::~MethodOptions() {
}
inline void MethodOptions::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
GOOGLE_ABSL_DCHECK(GetArenaForAllocation() == nullptr);
_impl_._extensions_.~ExtensionSet();
_impl_.uninterpreted_option_.~RepeatedPtrField();
}
@ -9670,7 +9670,7 @@ void MethodOptions::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::
auto& from = static_cast<const MethodOptions&>(from_msg);
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.MethodOptions)
GOOGLE_DCHECK_NE(&from, _this);
GOOGLE_ABSL_DCHECK_NE(&from, _this);
::uint32_t cached_has_bits = 0;
(void) cached_has_bits;
@ -9795,7 +9795,7 @@ UninterpretedOption_NamePart::~UninterpretedOption_NamePart() {
}
inline void UninterpretedOption_NamePart::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
GOOGLE_ABSL_DCHECK(GetArenaForAllocation() == nullptr);
_impl_.name_part_.Destroy();
}
@ -9959,7 +9959,7 @@ void UninterpretedOption_NamePart::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& t
auto& from = static_cast<const UninterpretedOption_NamePart&>(from_msg);
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.UninterpretedOption.NamePart)
GOOGLE_DCHECK_NE(&from, _this);
GOOGLE_ABSL_DCHECK_NE(&from, _this);
::uint32_t cached_has_bits = 0;
(void) cached_has_bits;
@ -10121,7 +10121,7 @@ UninterpretedOption::~UninterpretedOption() {
}
inline void UninterpretedOption::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
GOOGLE_ABSL_DCHECK(GetArenaForAllocation() == nullptr);
_impl_.name_.~RepeatedPtrField();
_impl_.identifier_value_.Destroy();
_impl_.string_value_.Destroy();
@ -10410,7 +10410,7 @@ void UninterpretedOption::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, co
auto& from = static_cast<const UninterpretedOption&>(from_msg);
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.UninterpretedOption)
GOOGLE_DCHECK_NE(&from, _this);
GOOGLE_ABSL_DCHECK_NE(&from, _this);
::uint32_t cached_has_bits = 0;
(void) cached_has_bits;
@ -10573,7 +10573,7 @@ SourceCodeInfo_Location::~SourceCodeInfo_Location() {
}
inline void SourceCodeInfo_Location::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
GOOGLE_ABSL_DCHECK(GetArenaForAllocation() == nullptr);
_impl_.path_.~RepeatedField();
_impl_.span_.~RepeatedField();
_impl_.leading_detached_comments_.~RepeatedPtrField();
@ -10846,7 +10846,7 @@ void SourceCodeInfo_Location::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg
auto& from = static_cast<const SourceCodeInfo_Location&>(from_msg);
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.SourceCodeInfo.Location)
GOOGLE_DCHECK_NE(&from, _this);
GOOGLE_ABSL_DCHECK_NE(&from, _this);
::uint32_t cached_has_bits = 0;
(void) cached_has_bits;
@ -10941,7 +10941,7 @@ SourceCodeInfo::~SourceCodeInfo() {
}
inline void SourceCodeInfo::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
GOOGLE_ABSL_DCHECK(GetArenaForAllocation() == nullptr);
_impl_.location_.~RepeatedPtrField();
}
@ -11057,7 +11057,7 @@ void SourceCodeInfo::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const :
auto& from = static_cast<const SourceCodeInfo&>(from_msg);
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.SourceCodeInfo)
GOOGLE_DCHECK_NE(&from, _this);
GOOGLE_ABSL_DCHECK_NE(&from, _this);
::uint32_t cached_has_bits = 0;
(void) cached_has_bits;
@ -11170,7 +11170,7 @@ GeneratedCodeInfo_Annotation::~GeneratedCodeInfo_Annotation() {
}
inline void GeneratedCodeInfo_Annotation::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
GOOGLE_ABSL_DCHECK(GetArenaForAllocation() == nullptr);
_impl_.path_.~RepeatedField();
_impl_.source_file_.Destroy();
}
@ -11407,7 +11407,7 @@ void GeneratedCodeInfo_Annotation::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& t
auto& from = static_cast<const GeneratedCodeInfo_Annotation&>(from_msg);
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.GeneratedCodeInfo.Annotation)
GOOGLE_DCHECK_NE(&from, _this);
GOOGLE_ABSL_DCHECK_NE(&from, _this);
::uint32_t cached_has_bits = 0;
(void) cached_has_bits;
@ -11507,7 +11507,7 @@ GeneratedCodeInfo::~GeneratedCodeInfo() {
}
inline void GeneratedCodeInfo::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
GOOGLE_ABSL_DCHECK(GetArenaForAllocation() == nullptr);
_impl_.annotation_.~RepeatedPtrField();
}
@ -11623,7 +11623,7 @@ void GeneratedCodeInfo::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, cons
auto& from = static_cast<const GeneratedCodeInfo&>(from_msg);
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.GeneratedCodeInfo)
GOOGLE_DCHECK_NE(&from, _this);
GOOGLE_ABSL_DCHECK_NE(&from, _this);
::uint32_t cached_has_bits = 0;
(void) cached_has_bits;

@ -489,7 +489,7 @@ class PROTOBUF_EXPORT FileDescriptorSet final :
}
void UnsafeArenaSwap(FileDescriptorSet* other) {
if (other == this) return;
GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
GOOGLE_ABSL_DCHECK(GetOwningArena() == other->GetOwningArena());
InternalSwap(other);
}
@ -651,7 +651,7 @@ class PROTOBUF_EXPORT FileDescriptorProto final :
}
void UnsafeArenaSwap(FileDescriptorProto* other) {
if (other == this) return;
GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
GOOGLE_ABSL_DCHECK(GetOwningArena() == other->GetOwningArena());
InternalSwap(other);
}
@ -1050,7 +1050,7 @@ class PROTOBUF_EXPORT DescriptorProto_ExtensionRange final :
}
void UnsafeArenaSwap(DescriptorProto_ExtensionRange* other) {
if (other == this) return;
GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
GOOGLE_ABSL_DCHECK(GetOwningArena() == other->GetOwningArena());
InternalSwap(other);
}
@ -1234,7 +1234,7 @@ class PROTOBUF_EXPORT DescriptorProto_ReservedRange final :
}
void UnsafeArenaSwap(DescriptorProto_ReservedRange* other) {
if (other == this) return;
GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
GOOGLE_ABSL_DCHECK(GetOwningArena() == other->GetOwningArena());
InternalSwap(other);
}
@ -1401,7 +1401,7 @@ class PROTOBUF_EXPORT DescriptorProto final :
}
void UnsafeArenaSwap(DescriptorProto* other) {
if (other == this) return;
GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
GOOGLE_ABSL_DCHECK(GetOwningArena() == other->GetOwningArena());
InternalSwap(other);
}
@ -1747,7 +1747,7 @@ class PROTOBUF_EXPORT ExtensionRangeOptions final :
}
void UnsafeArenaSwap(ExtensionRangeOptions* other) {
if (other == this) return;
GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
GOOGLE_ABSL_DCHECK(GetOwningArena() == other->GetOwningArena());
InternalSwap(other);
}
@ -2101,7 +2101,7 @@ class PROTOBUF_EXPORT FieldDescriptorProto final :
}
void UnsafeArenaSwap(FieldDescriptorProto* other) {
if (other == this) return;
GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
GOOGLE_ABSL_DCHECK(GetOwningArena() == other->GetOwningArena());
InternalSwap(other);
}
@ -2463,7 +2463,7 @@ class PROTOBUF_EXPORT OneofDescriptorProto final :
}
void UnsafeArenaSwap(OneofDescriptorProto* other) {
if (other == this) return;
GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
GOOGLE_ABSL_DCHECK(GetOwningArena() == other->GetOwningArena());
InternalSwap(other);
}
@ -2640,7 +2640,7 @@ class PROTOBUF_EXPORT EnumDescriptorProto_EnumReservedRange final :
}
void UnsafeArenaSwap(EnumDescriptorProto_EnumReservedRange* other) {
if (other == this) return;
GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
GOOGLE_ABSL_DCHECK(GetOwningArena() == other->GetOwningArena());
InternalSwap(other);
}
@ -2807,7 +2807,7 @@ class PROTOBUF_EXPORT EnumDescriptorProto final :
}
void UnsafeArenaSwap(EnumDescriptorProto* other) {
if (other == this) return;
GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
GOOGLE_ABSL_DCHECK(GetOwningArena() == other->GetOwningArena());
InternalSwap(other);
}
@ -3052,7 +3052,7 @@ class PROTOBUF_EXPORT EnumValueDescriptorProto final :
}
void UnsafeArenaSwap(EnumValueDescriptorProto* other) {
if (other == this) return;
GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
GOOGLE_ABSL_DCHECK(GetOwningArena() == other->GetOwningArena());
InternalSwap(other);
}
@ -3241,7 +3241,7 @@ class PROTOBUF_EXPORT ServiceDescriptorProto final :
}
void UnsafeArenaSwap(ServiceDescriptorProto* other) {
if (other == this) return;
GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
GOOGLE_ABSL_DCHECK(GetOwningArena() == other->GetOwningArena());
InternalSwap(other);
}
@ -3438,7 +3438,7 @@ class PROTOBUF_EXPORT MethodDescriptorProto final :
}
void UnsafeArenaSwap(MethodDescriptorProto* other) {
if (other == this) return;
GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
GOOGLE_ABSL_DCHECK(GetOwningArena() == other->GetOwningArena());
InternalSwap(other);
}
@ -3673,7 +3673,7 @@ class PROTOBUF_EXPORT FileOptions final :
}
void UnsafeArenaSwap(FileOptions* other) {
if (other == this) return;
GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
GOOGLE_ABSL_DCHECK(GetOwningArena() == other->GetOwningArena());
InternalSwap(other);
}
@ -4339,7 +4339,7 @@ class PROTOBUF_EXPORT MessageOptions final :
}
void UnsafeArenaSwap(MessageOptions* other) {
if (other == this) return;
GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
GOOGLE_ABSL_DCHECK(GetOwningArena() == other->GetOwningArena());
InternalSwap(other);
}
@ -4742,7 +4742,7 @@ class PROTOBUF_EXPORT FieldOptions final :
}
void UnsafeArenaSwap(FieldOptions* other) {
if (other == this) return;
GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
GOOGLE_ABSL_DCHECK(GetOwningArena() == other->GetOwningArena());
InternalSwap(other);
}
@ -5223,7 +5223,7 @@ class PROTOBUF_EXPORT OneofOptions final :
}
void UnsafeArenaSwap(OneofOptions* other) {
if (other == this) return;
GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
GOOGLE_ABSL_DCHECK(GetOwningArena() == other->GetOwningArena());
InternalSwap(other);
}
@ -5577,7 +5577,7 @@ class PROTOBUF_EXPORT EnumOptions final :
}
void UnsafeArenaSwap(EnumOptions* other) {
if (other == this) return;
GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
GOOGLE_ABSL_DCHECK(GetOwningArena() == other->GetOwningArena());
InternalSwap(other);
}
@ -5956,7 +5956,7 @@ class PROTOBUF_EXPORT EnumValueOptions final :
}
void UnsafeArenaSwap(EnumValueOptions* other) {
if (other == this) return;
GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
GOOGLE_ABSL_DCHECK(GetOwningArena() == other->GetOwningArena());
InternalSwap(other);
}
@ -6323,7 +6323,7 @@ class PROTOBUF_EXPORT ServiceOptions final :
}
void UnsafeArenaSwap(ServiceOptions* other) {
if (other == this) return;
GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
GOOGLE_ABSL_DCHECK(GetOwningArena() == other->GetOwningArena());
InternalSwap(other);
}
@ -6690,7 +6690,7 @@ class PROTOBUF_EXPORT MethodOptions final :
}
void UnsafeArenaSwap(MethodOptions* other) {
if (other == this) return;
GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
GOOGLE_ABSL_DCHECK(GetOwningArena() == other->GetOwningArena());
InternalSwap(other);
}
@ -7090,7 +7090,7 @@ class PROTOBUF_EXPORT UninterpretedOption_NamePart final :
}
void UnsafeArenaSwap(UninterpretedOption_NamePart* other) {
if (other == this) return;
GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
GOOGLE_ABSL_DCHECK(GetOwningArena() == other->GetOwningArena());
InternalSwap(other);
}
@ -7265,7 +7265,7 @@ class PROTOBUF_EXPORT UninterpretedOption final :
}
void UnsafeArenaSwap(UninterpretedOption* other) {
if (other == this) return;
GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
GOOGLE_ABSL_DCHECK(GetOwningArena() == other->GetOwningArena());
InternalSwap(other);
}
@ -7517,7 +7517,7 @@ class PROTOBUF_EXPORT SourceCodeInfo_Location final :
}
void UnsafeArenaSwap(SourceCodeInfo_Location* other) {
if (other == this) return;
GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
GOOGLE_ABSL_DCHECK(GetOwningArena() == other->GetOwningArena());
InternalSwap(other);
}
@ -7770,7 +7770,7 @@ class PROTOBUF_EXPORT SourceCodeInfo final :
}
void UnsafeArenaSwap(SourceCodeInfo* other) {
if (other == this) return;
GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
GOOGLE_ABSL_DCHECK(GetOwningArena() == other->GetOwningArena());
InternalSwap(other);
}
@ -7934,7 +7934,7 @@ class PROTOBUF_EXPORT GeneratedCodeInfo_Annotation final :
}
void UnsafeArenaSwap(GeneratedCodeInfo_Annotation* other) {
if (other == this) return;
GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
GOOGLE_ABSL_DCHECK(GetOwningArena() == other->GetOwningArena());
InternalSwap(other);
}
@ -8176,7 +8176,7 @@ class PROTOBUF_EXPORT GeneratedCodeInfo final :
}
void UnsafeArenaSwap(GeneratedCodeInfo* other) {
if (other == this) return;
GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
GOOGLE_ABSL_DCHECK(GetOwningArena() == other->GetOwningArena());
InternalSwap(other);
}
@ -8486,7 +8486,7 @@ inline void FileDescriptorProto::set_dependency(int index, std::string&& value)
// @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.dependency)
}
inline void FileDescriptorProto::set_dependency(int index, const char* value) {
GOOGLE_DCHECK(value != nullptr); _impl_.dependency_.Mutable(index)->assign(value);
GOOGLE_ABSL_DCHECK(value != nullptr); _impl_.dependency_.Mutable(index)->assign(value);
// @@protoc_insertion_point(field_set_char:google.protobuf.FileDescriptorProto.dependency)
}
inline void FileDescriptorProto::set_dependency(int index, const char* value, ::size_t size) {
@ -8506,7 +8506,7 @@ inline void FileDescriptorProto::add_dependency(std::string&& value) {
// @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.dependency)
}
inline void FileDescriptorProto::add_dependency(const char* value) {
GOOGLE_DCHECK(value != nullptr); _impl_.dependency_.Add()->assign(value);
GOOGLE_ABSL_DCHECK(value != nullptr); _impl_.dependency_.Add()->assign(value);
// @@protoc_insertion_point(field_add_char:google.protobuf.FileDescriptorProto.dependency)
}
inline void FileDescriptorProto::add_dependency(const char* value, ::size_t size) {
@ -9742,7 +9742,7 @@ inline void DescriptorProto::set_reserved_name(int index, std::string&& value) {
// @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.reserved_name)
}
inline void DescriptorProto::set_reserved_name(int index, const char* value) {
GOOGLE_DCHECK(value != nullptr); _impl_.reserved_name_.Mutable(index)->assign(value);
GOOGLE_ABSL_DCHECK(value != nullptr); _impl_.reserved_name_.Mutable(index)->assign(value);
// @@protoc_insertion_point(field_set_char:google.protobuf.DescriptorProto.reserved_name)
}
inline void DescriptorProto::set_reserved_name(int index, const char* value, ::size_t size) {
@ -9762,7 +9762,7 @@ inline void DescriptorProto::add_reserved_name(std::string&& value) {
// @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.reserved_name)
}
inline void DescriptorProto::add_reserved_name(const char* value) {
GOOGLE_DCHECK(value != nullptr); _impl_.reserved_name_.Add()->assign(value);
GOOGLE_ABSL_DCHECK(value != nullptr); _impl_.reserved_name_.Add()->assign(value);
// @@protoc_insertion_point(field_add_char:google.protobuf.DescriptorProto.reserved_name)
}
inline void DescriptorProto::add_reserved_name(const char* value, ::size_t size) {
@ -10834,7 +10834,7 @@ inline void EnumDescriptorProto::set_reserved_name(int index, std::string&& valu
// @@protoc_insertion_point(field_set:google.protobuf.EnumDescriptorProto.reserved_name)
}
inline void EnumDescriptorProto::set_reserved_name(int index, const char* value) {
GOOGLE_DCHECK(value != nullptr); _impl_.reserved_name_.Mutable(index)->assign(value);
GOOGLE_ABSL_DCHECK(value != nullptr); _impl_.reserved_name_.Mutable(index)->assign(value);
// @@protoc_insertion_point(field_set_char:google.protobuf.EnumDescriptorProto.reserved_name)
}
inline void EnumDescriptorProto::set_reserved_name(int index, const char* value, ::size_t size) {
@ -10854,7 +10854,7 @@ inline void EnumDescriptorProto::add_reserved_name(std::string&& value) {
// @@protoc_insertion_point(field_add:google.protobuf.EnumDescriptorProto.reserved_name)
}
inline void EnumDescriptorProto::add_reserved_name(const char* value) {
GOOGLE_DCHECK(value != nullptr); _impl_.reserved_name_.Add()->assign(value);
GOOGLE_ABSL_DCHECK(value != nullptr); _impl_.reserved_name_.Add()->assign(value);
// @@protoc_insertion_point(field_add_char:google.protobuf.EnumDescriptorProto.reserved_name)
}
inline void EnumDescriptorProto::add_reserved_name(const char* value, ::size_t size) {
@ -13895,7 +13895,7 @@ inline void SourceCodeInfo_Location::set_leading_detached_comments(int index, st
// @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.leading_detached_comments)
}
inline void SourceCodeInfo_Location::set_leading_detached_comments(int index, const char* value) {
GOOGLE_DCHECK(value != nullptr); _impl_.leading_detached_comments_.Mutable(index)->assign(value);
GOOGLE_ABSL_DCHECK(value != nullptr); _impl_.leading_detached_comments_.Mutable(index)->assign(value);
// @@protoc_insertion_point(field_set_char:google.protobuf.SourceCodeInfo.Location.leading_detached_comments)
}
inline void SourceCodeInfo_Location::set_leading_detached_comments(int index, const char* value, ::size_t size) {
@ -13915,7 +13915,7 @@ inline void SourceCodeInfo_Location::add_leading_detached_comments(std::string&&
// @@protoc_insertion_point(field_add:google.protobuf.SourceCodeInfo.Location.leading_detached_comments)
}
inline void SourceCodeInfo_Location::add_leading_detached_comments(const char* value) {
GOOGLE_DCHECK(value != nullptr); _impl_.leading_detached_comments_.Add()->assign(value);
GOOGLE_ABSL_DCHECK(value != nullptr); _impl_.leading_detached_comments_.Add()->assign(value);
// @@protoc_insertion_point(field_add_char:google.protobuf.SourceCodeInfo.Location.leading_detached_comments)
}
inline void SourceCodeInfo_Location::add_leading_detached_comments(const char* value, ::size_t size) {

@ -36,6 +36,8 @@
#include <string>
#include <type_traits>
#include "google/protobuf/stubs/logging.h"
#include "google/protobuf/stubs/logging.h"
#include "absl/strings/internal/resize_uninitialized.h"
#include "absl/strings/string_view.h"
#include "google/protobuf/arena.h"
@ -119,7 +121,7 @@ class PROTOBUF_EXPORT EpsCopyInputStream {
: aliasing_(enable_aliasing ? kOnPatch : kNoAliasing) {}
void BackUp(const char* ptr) {
GOOGLE_DCHECK(ptr <= buffer_end_ + kSlopBytes);
GOOGLE_ABSL_DCHECK(ptr <= buffer_end_ + kSlopBytes);
int count;
if (next_chunk_ == buffer_) {
count = static_cast<int>(buffer_end_ + kSlopBytes - ptr);
@ -131,7 +133,7 @@ class PROTOBUF_EXPORT EpsCopyInputStream {
// If return value is negative it's an error
PROTOBUF_NODISCARD int PushLimit(const char* ptr, int limit) {
GOOGLE_DCHECK(limit >= 0 && limit <= INT_MAX - kSlopBytes);
GOOGLE_ABSL_DCHECK(limit >= 0 && limit <= INT_MAX - kSlopBytes);
// This add is safe due to the invariant above, because
// ptr - buffer_end_ <= kSlopBytes.
limit += static_cast<int>(ptr - buffer_end_);
@ -225,10 +227,10 @@ class PROTOBUF_EXPORT EpsCopyInputStream {
// reached. It aligns *ptr across buffer seams.
// If limit is exceeded it returns true and ptr is set to null.
bool DoneWithCheck(const char** ptr, int d) {
GOOGLE_DCHECK(*ptr);
GOOGLE_ABSL_DCHECK(*ptr);
if (PROTOBUF_PREDICT_TRUE(*ptr < limit_end_)) return false;
int overrun = static_cast<int>(*ptr - buffer_end_);
GOOGLE_DCHECK_LE(overrun, kSlopBytes); // Guaranteed by parse loop.
GOOGLE_ABSL_DCHECK_LE(overrun, kSlopBytes); // Guaranteed by parse loop.
if (overrun ==
limit_) { // No need to flip buffers if we ended on a limit.
// If we actually overrun the buffer and next_chunk_ is null. It means
@ -341,7 +343,7 @@ class PROTOBUF_EXPORT EpsCopyInputStream {
const char* AppendSize(const char* ptr, int size, const A& append) {
int chunk_size = static_cast<int>(buffer_end_ + kSlopBytes - ptr);
do {
GOOGLE_DCHECK(size > chunk_size);
GOOGLE_ABSL_DCHECK(size > chunk_size);
if (next_chunk_ == nullptr) return nullptr;
append(ptr, chunk_size);
ptr += chunk_size;
@ -375,7 +377,7 @@ class PROTOBUF_EXPORT EpsCopyInputStream {
ptr += kSlopBytes;
}
auto end = buffer_end_ + limit_;
GOOGLE_DCHECK(end >= ptr);
GOOGLE_ABSL_DCHECK(end >= ptr);
append(ptr, end - ptr);
return end;
}
@ -447,7 +449,7 @@ class PROTOBUF_EXPORT ParseContext : public EpsCopyInputStream {
ptr = ReadSizeAndPushLimitAndDepthInlined(ptr, &old);
auto old_depth = depth_;
ptr = ptr ? TcParser::ParseLoop(msg, ptr, this, table) : nullptr;
if (ptr != nullptr) GOOGLE_DCHECK_EQ(old_depth, depth_);
if (ptr != nullptr) GOOGLE_ABSL_DCHECK_EQ(old_depth, depth_);
depth_++;
if (!PopLimit(old)) return nullptr;
return ptr;
@ -462,8 +464,8 @@ class PROTOBUF_EXPORT ParseContext : public EpsCopyInputStream {
auto old_group_depth = group_depth_;
ptr = msg->_InternalParse(ptr, this);
if (ptr != nullptr) {
GOOGLE_DCHECK_EQ(old_depth, depth_);
GOOGLE_DCHECK_EQ(old_group_depth, group_depth_);
GOOGLE_ABSL_DCHECK_EQ(old_depth, depth_);
GOOGLE_ABSL_DCHECK_EQ(old_group_depth, group_depth_);
}
group_depth_--;
depth_++;
@ -480,8 +482,8 @@ class PROTOBUF_EXPORT ParseContext : public EpsCopyInputStream {
auto old_group_depth = group_depth_;
ptr = TcParser::ParseLoop(msg, ptr, this, table);
if (ptr != nullptr) {
GOOGLE_DCHECK_EQ(old_depth, depth_);
GOOGLE_DCHECK_EQ(old_group_depth, group_depth_);
GOOGLE_ABSL_DCHECK_EQ(old_depth, depth_);
GOOGLE_ABSL_DCHECK_EQ(old_group_depth, group_depth_);
}
group_depth_--;
depth_++;
@ -851,7 +853,7 @@ PROTOBUF_NODISCARD const char* ParseContext::ParseMessage(T* msg,
if (ptr == nullptr) return ptr;
auto old_depth = depth_;
ptr = msg->_InternalParse(ptr, this);
if (ptr != nullptr) GOOGLE_DCHECK_EQ(old_depth, depth_);
if (ptr != nullptr) GOOGLE_ABSL_DCHECK_EQ(old_depth, depth_);
depth_++;
if (!PopLimit(old)) return nullptr;
return ptr;
@ -887,7 +889,7 @@ const char* EpsCopyInputStream::ReadRepeatedFixed(const char* ptr,
#define GOOGLE_PROTOBUF_ASSERT_RETURN(predicate, ret) \
if (!(predicate)) { \
/* ::raise(SIGINT); */ \
/* GOOGLE_LOG(ERROR) << "Parse failure"; */ \
/* GOOGLE_ABSL_LOG(ERROR) << "Parse failure"; */ \
return ret; \
}
@ -925,7 +927,7 @@ const char* EpsCopyInputStream::ReadPackedFixed(const char* ptr, int size,
out->Reserve(old_entries + num);
auto dst = out->AddNAlreadyReserved(num);
#ifdef PROTOBUF_LITTLE_ENDIAN
GOOGLE_CHECK(dst != nullptr) << out << "," << num;
GOOGLE_ABSL_CHECK(dst != nullptr) << out << "," << num;
std::memcpy(dst, ptr, block_size);
#else
for (int i = 0; i < num; i++) dst[i] = UnalignedLoad<T>(ptr + i * sizeof(T));
@ -955,21 +957,21 @@ const char* EpsCopyInputStream::ReadPackedVarint(const char* ptr, Add add) {
ptr = ReadPackedVarintArray(ptr, buffer_end_, add);
if (ptr == nullptr) return nullptr;
int overrun = static_cast<int>(ptr - buffer_end_);
GOOGLE_DCHECK(overrun >= 0 && overrun <= kSlopBytes);
GOOGLE_ABSL_DCHECK(overrun >= 0 && overrun <= kSlopBytes);
if (size - chunk_size <= kSlopBytes) {
// The current buffer contains all the information needed, we don't need
// to flip buffers. However we must parse from a buffer with enough space
// so we are not prone to a buffer overflow.
char buf[kSlopBytes + 10] = {};
std::memcpy(buf, buffer_end_, kSlopBytes);
GOOGLE_CHECK_LE(size - chunk_size, kSlopBytes);
GOOGLE_ABSL_CHECK_LE(size - chunk_size, kSlopBytes);
auto end = buf + (size - chunk_size);
auto res = ReadPackedVarintArray(buf + overrun, end, add);
if (res == nullptr || res != end) return nullptr;
return buffer_end_ + (res - buf);
}
size -= overrun + chunk_size;
GOOGLE_DCHECK_GT(size, 0);
GOOGLE_ABSL_DCHECK_GT(size, 0);
// We must flip buffers
if (limit_ <= kSlopBytes) return nullptr;
ptr = Next();
@ -1026,7 +1028,7 @@ PROTOBUF_NODISCARD const char* FieldParser(uint64_t tag, T& field_parser,
break;
}
case WireType::WIRETYPE_END_GROUP: {
GOOGLE_LOG(FATAL) << "Can't happen";
GOOGLE_ABSL_LOG(FATAL) << "Can't happen";
break;
}
case WireType::WIRETYPE_FIXED32: {

Loading…
Cancel
Save