Make PROTOBUF_TSAN_READ/WRITE into functions to reduce the cost of macros in large translation units.

Each macro expansion has a relatively larger cost than a function call.

PiperOrigin-RevId: 607386966
pull/15853/head
Protobuf Team Bot 1 year ago committed by Copybara-Service
parent 1f9b71e9dd
commit 44f328a7de
  1. 6
      src/google/protobuf/compiler/cpp/field.cc
  2. 6
      src/google/protobuf/compiler/cpp/message.cc
  3. 2
      src/google/protobuf/compiler/java/java_features.pb.cc
  4. 12
      src/google/protobuf/compiler/java/java_features.pb.h
  5. 14
      src/google/protobuf/compiler/plugin.pb.cc
  6. 192
      src/google/protobuf/compiler/plugin.pb.h
  7. 2
      src/google/protobuf/cpp_features.pb.cc
  8. 12
      src/google/protobuf/cpp_features.pb.h
  9. 64
      src/google/protobuf/descriptor.pb.cc
  10. 1626
      src/google/protobuf/descriptor.pb.h
  11. 22
      src/google/protobuf/port.h
  12. 19
      src/google/protobuf/port_def.inc
  13. 2
      src/google/protobuf/port_undef.inc

@ -72,9 +72,11 @@ std::vector<Sub> FieldVars(const FieldDescriptor* field, const Options& opts) {
// For TSan validation.
{"TsanDetectConcurrentMutation",
"PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race)"},
absl::StrCat("::", ProtobufNamespace(opts),
"::internal::TSanWrite(&_impl_)")},
{"TsanDetectConcurrentRead",
"PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race)"},
absl::StrCat("::", ProtobufNamespace(opts),
"::internal::TSanRead(&_impl_)")},
// Old-style names.
{"field", FieldMemberName(field, split)},

@ -1150,7 +1150,7 @@ void MessageGenerator::GenerateFieldClear(const FieldDescriptor* field,
}}},
R"cc(
$inline $void $classname$::clear_$name$() {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
$pbi$::TSanWrite(&_impl_);
$WeakDescriptorSelfPin$;
$body$;
$annotate_clear$;
@ -3224,7 +3224,7 @@ void MessageGenerator::GenerateClear(io::Printer* p) {
"// @@protoc_insertion_point(message_clear_start:$full_name$)\n");
format.Indent();
format("PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);\n");
format("$pbi$::TSanWrite(&_impl_);\n");
format(
// TODO: It would be better to avoid emitting this if it is not used,
@ -3426,7 +3426,7 @@ void MessageGenerator::GenerateOneofClear(io::Printer* p) {
"void $classname$::clear_$oneofname$() {\n"
"// @@protoc_insertion_point(one_of_clear_start:$full_name$)\n");
format.Indent();
format("PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);\n");
format("$pbi$::TSanWrite(&_impl_);\n");
format("switch ($oneofname$_case()) {\n");
format.Indent();
for (auto field : FieldRange(oneof)) {

@ -228,7 +228,7 @@ const ::_pbi::TcParseTable<1, 2, 1, 0, 2> JavaFeatures::_table_ = {
PROTOBUF_NOINLINE void JavaFeatures::Clear() {
// @@protoc_insertion_point(message_clear_start:pb.JavaFeatures)
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;

@ -325,7 +325,7 @@ inline bool JavaFeatures::has_legacy_closed_enum() const {
return value;
}
inline void JavaFeatures::clear_legacy_closed_enum() {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
_impl_.legacy_closed_enum_ = false;
_impl_._has_bits_[0] &= ~0x00000001u;
}
@ -339,11 +339,11 @@ inline void JavaFeatures::set_legacy_closed_enum(bool value) {
// @@protoc_insertion_point(field_set:pb.JavaFeatures.legacy_closed_enum)
}
inline bool JavaFeatures::_internal_legacy_closed_enum() const {
PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanRead(&_impl_);
return _impl_.legacy_closed_enum_;
}
inline void JavaFeatures::_internal_set_legacy_closed_enum(bool value) {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
_impl_.legacy_closed_enum_ = value;
}
@ -353,7 +353,7 @@ inline bool JavaFeatures::has_utf8_validation() const {
return value;
}
inline void JavaFeatures::clear_utf8_validation() {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
_impl_.utf8_validation_ = 0;
_impl_._has_bits_[0] &= ~0x00000002u;
}
@ -367,11 +367,11 @@ inline void JavaFeatures::set_utf8_validation(::pb::JavaFeatures_Utf8Validation
// @@protoc_insertion_point(field_set:pb.JavaFeatures.utf8_validation)
}
inline ::pb::JavaFeatures_Utf8Validation JavaFeatures::_internal_utf8_validation() const {
PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanRead(&_impl_);
return static_cast<::pb::JavaFeatures_Utf8Validation>(_impl_.utf8_validation_);
}
inline void JavaFeatures::_internal_set_utf8_validation(::pb::JavaFeatures_Utf8Validation value) {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
assert(::pb::JavaFeatures_Utf8Validation_IsValid(value));
_impl_.utf8_validation_ = value;
}

@ -429,7 +429,7 @@ const ::_pbi::TcParseTable<2, 4, 0, 47, 2> Version::_table_ = {
PROTOBUF_NOINLINE void Version::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.compiler.Version)
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@ -604,11 +604,11 @@ class CodeGeneratorRequest::_Internal {
};
void CodeGeneratorRequest::clear_proto_file() {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
_impl_.proto_file_.Clear();
}
void CodeGeneratorRequest::clear_source_file_descriptors() {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
_impl_.source_file_descriptors_.Clear();
}
CodeGeneratorRequest::CodeGeneratorRequest(::google::protobuf::Arena* arena)
@ -750,7 +750,7 @@ const ::_pbi::TcParseTable<3, 5, 3, 79, 2> CodeGeneratorRequest::_table_ = {
PROTOBUF_NOINLINE void CodeGeneratorRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.compiler.CodeGeneratorRequest)
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@ -954,7 +954,7 @@ class CodeGeneratorResponse_File::_Internal {
};
void CodeGeneratorResponse_File::clear_generated_code_info() {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
if (_impl_.generated_code_info_ != nullptr) _impl_.generated_code_info_->Clear();
_impl_._has_bits_[0] &= ~0x00000008u;
}
@ -1089,7 +1089,7 @@ const ::_pbi::TcParseTable<2, 4, 1, 86, 2> CodeGeneratorResponse_File::_table_ =
PROTOBUF_NOINLINE void CodeGeneratorResponse_File::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.compiler.CodeGeneratorResponse.File)
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@ -1416,7 +1416,7 @@ const ::_pbi::TcParseTable<3, 5, 1, 60, 2> CodeGeneratorResponse::_table_ = {
PROTOBUF_NOINLINE void CodeGeneratorResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.compiler.CodeGeneratorResponse)
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;

@ -1090,7 +1090,7 @@ inline bool Version::has_major() const {
return value;
}
inline void Version::clear_major() {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
_impl_.major_ = 0;
_impl_._has_bits_[0] &= ~0x00000002u;
}
@ -1104,11 +1104,11 @@ inline void Version::set_major(::int32_t value) {
// @@protoc_insertion_point(field_set:google.protobuf.compiler.Version.major)
}
inline ::int32_t Version::_internal_major() const {
PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanRead(&_impl_);
return _impl_.major_;
}
inline void Version::_internal_set_major(::int32_t value) {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
_impl_.major_ = value;
}
@ -1118,7 +1118,7 @@ inline bool Version::has_minor() const {
return value;
}
inline void Version::clear_minor() {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
_impl_.minor_ = 0;
_impl_._has_bits_[0] &= ~0x00000004u;
}
@ -1132,11 +1132,11 @@ inline void Version::set_minor(::int32_t value) {
// @@protoc_insertion_point(field_set:google.protobuf.compiler.Version.minor)
}
inline ::int32_t Version::_internal_minor() const {
PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanRead(&_impl_);
return _impl_.minor_;
}
inline void Version::_internal_set_minor(::int32_t value) {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
_impl_.minor_ = value;
}
@ -1146,7 +1146,7 @@ inline bool Version::has_patch() const {
return value;
}
inline void Version::clear_patch() {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
_impl_.patch_ = 0;
_impl_._has_bits_[0] &= ~0x00000008u;
}
@ -1160,11 +1160,11 @@ inline void Version::set_patch(::int32_t value) {
// @@protoc_insertion_point(field_set:google.protobuf.compiler.Version.patch)
}
inline ::int32_t Version::_internal_patch() const {
PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanRead(&_impl_);
return _impl_.patch_;
}
inline void Version::_internal_set_patch(::int32_t value) {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
_impl_.patch_ = value;
}
@ -1174,7 +1174,7 @@ inline bool Version::has_suffix() const {
return value;
}
inline void Version::clear_suffix() {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
_impl_.suffix_.ClearToEmpty();
_impl_._has_bits_[0] &= ~0x00000001u;
}
@ -1186,7 +1186,7 @@ inline const std::string& Version::suffix() const
template <typename Arg_, typename... Args_>
inline PROTOBUF_ALWAYS_INLINE void Version::set_suffix(Arg_&& arg,
Args_... args) {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
_impl_._has_bits_[0] |= 0x00000001u;
_impl_.suffix_.Set(static_cast<Arg_&&>(arg), args..., GetArena());
// @@protoc_insertion_point(field_set:google.protobuf.compiler.Version.suffix)
@ -1197,21 +1197,21 @@ inline std::string* Version::mutable_suffix() ABSL_ATTRIBUTE_LIFETIME_BOUND {
return _s;
}
inline const std::string& Version::_internal_suffix() const {
PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanRead(&_impl_);
return _impl_.suffix_.Get();
}
inline void Version::_internal_set_suffix(const std::string& value) {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
_impl_._has_bits_[0] |= 0x00000001u;
_impl_.suffix_.Set(value, GetArena());
}
inline std::string* Version::_internal_mutable_suffix() {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
_impl_._has_bits_[0] |= 0x00000001u;
return _impl_.suffix_.Mutable( GetArena());
}
inline std::string* Version::release_suffix() {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
// @@protoc_insertion_point(field_release:google.protobuf.compiler.Version.suffix)
if ((_impl_._has_bits_[0] & 0x00000001u) == 0) {
return nullptr;
@ -1224,7 +1224,7 @@ inline std::string* Version::release_suffix() {
return released;
}
inline void Version::set_allocated_suffix(std::string* value) {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
if (value != nullptr) {
_impl_._has_bits_[0] |= 0x00000001u;
} else {
@ -1251,12 +1251,12 @@ inline int CodeGeneratorRequest::file_to_generate_size() const {
return _internal_file_to_generate_size();
}
inline void CodeGeneratorRequest::clear_file_to_generate() {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
_impl_.file_to_generate_.Clear();
}
inline std::string* CodeGeneratorRequest::add_file_to_generate()
ABSL_ATTRIBUTE_LIFETIME_BOUND {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
std::string* _s = _internal_mutable_file_to_generate()->Add();
// @@protoc_insertion_point(field_add_mutable:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate)
return _s;
@ -1296,29 +1296,29 @@ inline void CodeGeneratorRequest::set_file_to_generate(int index, absl::string_v
// @@protoc_insertion_point(field_set_string_piece:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate)
}
inline void CodeGeneratorRequest::add_file_to_generate(const std::string& value) {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
_internal_mutable_file_to_generate()->Add()->assign(value);
// @@protoc_insertion_point(field_add:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate)
}
inline void CodeGeneratorRequest::add_file_to_generate(std::string&& value) {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
_internal_mutable_file_to_generate()->Add(std::move(value));
// @@protoc_insertion_point(field_add:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate)
}
inline void CodeGeneratorRequest::add_file_to_generate(const char* value) {
ABSL_DCHECK(value != nullptr);
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
_internal_mutable_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, std::size_t size) {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
_internal_mutable_file_to_generate()->Add()->assign(
reinterpret_cast<const char*>(value), size);
// @@protoc_insertion_point(field_add_pointer:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate)
}
inline void CodeGeneratorRequest::add_file_to_generate(absl::string_view value) {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
_internal_mutable_file_to_generate()->Add()->assign(value.data(),
value.size());
// @@protoc_insertion_point(field_add_string_piece:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate)
@ -1331,17 +1331,17 @@ CodeGeneratorRequest::file_to_generate() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
inline ::google::protobuf::RepeatedPtrField<std::string>*
CodeGeneratorRequest::mutable_file_to_generate() ABSL_ATTRIBUTE_LIFETIME_BOUND {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate)
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
return _internal_mutable_file_to_generate();
}
inline const ::google::protobuf::RepeatedPtrField<std::string>&
CodeGeneratorRequest::_internal_file_to_generate() const {
PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanRead(&_impl_);
return _impl_.file_to_generate_;
}
inline ::google::protobuf::RepeatedPtrField<std::string>*
CodeGeneratorRequest::_internal_mutable_file_to_generate() {
PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanRead(&_impl_);
return &_impl_.file_to_generate_;
}
@ -1351,7 +1351,7 @@ inline bool CodeGeneratorRequest::has_parameter() const {
return value;
}
inline void CodeGeneratorRequest::clear_parameter() {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
_impl_.parameter_.ClearToEmpty();
_impl_._has_bits_[0] &= ~0x00000001u;
}
@ -1363,7 +1363,7 @@ inline const std::string& CodeGeneratorRequest::parameter() const
template <typename Arg_, typename... Args_>
inline PROTOBUF_ALWAYS_INLINE void CodeGeneratorRequest::set_parameter(Arg_&& arg,
Args_... args) {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
_impl_._has_bits_[0] |= 0x00000001u;
_impl_.parameter_.Set(static_cast<Arg_&&>(arg), args..., GetArena());
// @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorRequest.parameter)
@ -1374,21 +1374,21 @@ inline std::string* CodeGeneratorRequest::mutable_parameter() ABSL_ATTRIBUTE_LIF
return _s;
}
inline const std::string& CodeGeneratorRequest::_internal_parameter() const {
PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanRead(&_impl_);
return _impl_.parameter_.Get();
}
inline void CodeGeneratorRequest::_internal_set_parameter(const std::string& value) {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
_impl_._has_bits_[0] |= 0x00000001u;
_impl_.parameter_.Set(value, GetArena());
}
inline std::string* CodeGeneratorRequest::_internal_mutable_parameter() {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
_impl_._has_bits_[0] |= 0x00000001u;
return _impl_.parameter_.Mutable( GetArena());
}
inline std::string* CodeGeneratorRequest::release_parameter() {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
// @@protoc_insertion_point(field_release:google.protobuf.compiler.CodeGeneratorRequest.parameter)
if ((_impl_._has_bits_[0] & 0x00000001u) == 0) {
return nullptr;
@ -1401,7 +1401,7 @@ inline std::string* CodeGeneratorRequest::release_parameter() {
return released;
}
inline void CodeGeneratorRequest::set_allocated_parameter(std::string* value) {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
if (value != nullptr) {
_impl_._has_bits_[0] |= 0x00000001u;
} else {
@ -1431,7 +1431,7 @@ inline ::google::protobuf::FileDescriptorProto* CodeGeneratorRequest::mutable_pr
inline ::google::protobuf::RepeatedPtrField<::google::protobuf::FileDescriptorProto>* CodeGeneratorRequest::mutable_proto_file()
ABSL_ATTRIBUTE_LIFETIME_BOUND {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.compiler.CodeGeneratorRequest.proto_file)
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
return _internal_mutable_proto_file();
}
inline const ::google::protobuf::FileDescriptorProto& CodeGeneratorRequest::proto_file(int index) const
@ -1440,7 +1440,7 @@ inline const ::google::protobuf::FileDescriptorProto& CodeGeneratorRequest::prot
return _internal_proto_file().Get(index);
}
inline ::google::protobuf::FileDescriptorProto* CodeGeneratorRequest::add_proto_file() ABSL_ATTRIBUTE_LIFETIME_BOUND {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
::google::protobuf::FileDescriptorProto* _add = _internal_mutable_proto_file()->Add();
// @@protoc_insertion_point(field_add:google.protobuf.compiler.CodeGeneratorRequest.proto_file)
return _add;
@ -1452,12 +1452,12 @@ inline const ::google::protobuf::RepeatedPtrField<::google::protobuf::FileDescri
}
inline const ::google::protobuf::RepeatedPtrField<::google::protobuf::FileDescriptorProto>&
CodeGeneratorRequest::_internal_proto_file() const {
PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanRead(&_impl_);
return _impl_.proto_file_;
}
inline ::google::protobuf::RepeatedPtrField<::google::protobuf::FileDescriptorProto>*
CodeGeneratorRequest::_internal_mutable_proto_file() {
PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanRead(&_impl_);
return &_impl_.proto_file_;
}
@ -1476,7 +1476,7 @@ inline ::google::protobuf::FileDescriptorProto* CodeGeneratorRequest::mutable_so
inline ::google::protobuf::RepeatedPtrField<::google::protobuf::FileDescriptorProto>* CodeGeneratorRequest::mutable_source_file_descriptors()
ABSL_ATTRIBUTE_LIFETIME_BOUND {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.compiler.CodeGeneratorRequest.source_file_descriptors)
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
return _internal_mutable_source_file_descriptors();
}
inline const ::google::protobuf::FileDescriptorProto& CodeGeneratorRequest::source_file_descriptors(int index) const
@ -1485,7 +1485,7 @@ inline const ::google::protobuf::FileDescriptorProto& CodeGeneratorRequest::sour
return _internal_source_file_descriptors().Get(index);
}
inline ::google::protobuf::FileDescriptorProto* CodeGeneratorRequest::add_source_file_descriptors() ABSL_ATTRIBUTE_LIFETIME_BOUND {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
::google::protobuf::FileDescriptorProto* _add = _internal_mutable_source_file_descriptors()->Add();
// @@protoc_insertion_point(field_add:google.protobuf.compiler.CodeGeneratorRequest.source_file_descriptors)
return _add;
@ -1497,12 +1497,12 @@ inline const ::google::protobuf::RepeatedPtrField<::google::protobuf::FileDescri
}
inline const ::google::protobuf::RepeatedPtrField<::google::protobuf::FileDescriptorProto>&
CodeGeneratorRequest::_internal_source_file_descriptors() const {
PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanRead(&_impl_);
return _impl_.source_file_descriptors_;
}
inline ::google::protobuf::RepeatedPtrField<::google::protobuf::FileDescriptorProto>*
CodeGeneratorRequest::_internal_mutable_source_file_descriptors() {
PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanRead(&_impl_);
return &_impl_.source_file_descriptors_;
}
@ -1513,12 +1513,12 @@ inline bool CodeGeneratorRequest::has_compiler_version() const {
return value;
}
inline void CodeGeneratorRequest::clear_compiler_version() {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
if (_impl_.compiler_version_ != nullptr) _impl_.compiler_version_->Clear();
_impl_._has_bits_[0] &= ~0x00000002u;
}
inline const ::google::protobuf::compiler::Version& CodeGeneratorRequest::_internal_compiler_version() const {
PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanRead(&_impl_);
const ::google::protobuf::compiler::Version* p = _impl_.compiler_version_;
return p != nullptr ? *p : reinterpret_cast<const ::google::protobuf::compiler::Version&>(::google::protobuf::compiler::_Version_default_instance_);
}
@ -1527,7 +1527,7 @@ inline const ::google::protobuf::compiler::Version& CodeGeneratorRequest::compil
return _internal_compiler_version();
}
inline void CodeGeneratorRequest::unsafe_arena_set_allocated_compiler_version(::google::protobuf::compiler::Version* value) {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
if (GetArena() == nullptr) {
delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.compiler_version_);
}
@ -1540,7 +1540,7 @@ inline void CodeGeneratorRequest::unsafe_arena_set_allocated_compiler_version(::
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.compiler.CodeGeneratorRequest.compiler_version)
}
inline ::google::protobuf::compiler::Version* CodeGeneratorRequest::release_compiler_version() {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
_impl_._has_bits_[0] &= ~0x00000002u;
::google::protobuf::compiler::Version* released = _impl_.compiler_version_;
@ -1559,7 +1559,7 @@ inline ::google::protobuf::compiler::Version* CodeGeneratorRequest::release_comp
return released;
}
inline ::google::protobuf::compiler::Version* CodeGeneratorRequest::unsafe_arena_release_compiler_version() {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
// @@protoc_insertion_point(field_release:google.protobuf.compiler.CodeGeneratorRequest.compiler_version)
_impl_._has_bits_[0] &= ~0x00000002u;
@ -1568,7 +1568,7 @@ inline ::google::protobuf::compiler::Version* CodeGeneratorRequest::unsafe_arena
return temp;
}
inline ::google::protobuf::compiler::Version* CodeGeneratorRequest::_internal_mutable_compiler_version() {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
if (_impl_.compiler_version_ == nullptr) {
auto* p = ::google::protobuf::Message::DefaultConstruct<::google::protobuf::compiler::Version>(GetArena());
_impl_.compiler_version_ = reinterpret_cast<::google::protobuf::compiler::Version*>(p);
@ -1583,7 +1583,7 @@ inline ::google::protobuf::compiler::Version* CodeGeneratorRequest::mutable_comp
}
inline void CodeGeneratorRequest::set_allocated_compiler_version(::google::protobuf::compiler::Version* value) {
::google::protobuf::Arena* message_arena = GetArena();
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
if (message_arena == nullptr) {
delete (_impl_.compiler_version_);
}
@ -1612,7 +1612,7 @@ inline bool CodeGeneratorResponse_File::has_name() const {
return value;
}
inline void CodeGeneratorResponse_File::clear_name() {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
_impl_.name_.ClearToEmpty();
_impl_._has_bits_[0] &= ~0x00000001u;
}
@ -1624,7 +1624,7 @@ inline const std::string& CodeGeneratorResponse_File::name() const
template <typename Arg_, typename... Args_>
inline PROTOBUF_ALWAYS_INLINE void CodeGeneratorResponse_File::set_name(Arg_&& arg,
Args_... args) {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
_impl_._has_bits_[0] |= 0x00000001u;
_impl_.name_.Set(static_cast<Arg_&&>(arg), args..., GetArena());
// @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorResponse.File.name)
@ -1635,21 +1635,21 @@ inline std::string* CodeGeneratorResponse_File::mutable_name() ABSL_ATTRIBUTE_LI
return _s;
}
inline const std::string& CodeGeneratorResponse_File::_internal_name() const {
PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanRead(&_impl_);
return _impl_.name_.Get();
}
inline void CodeGeneratorResponse_File::_internal_set_name(const std::string& value) {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
_impl_._has_bits_[0] |= 0x00000001u;
_impl_.name_.Set(value, GetArena());
}
inline std::string* CodeGeneratorResponse_File::_internal_mutable_name() {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
_impl_._has_bits_[0] |= 0x00000001u;
return _impl_.name_.Mutable( GetArena());
}
inline std::string* CodeGeneratorResponse_File::release_name() {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
// @@protoc_insertion_point(field_release:google.protobuf.compiler.CodeGeneratorResponse.File.name)
if ((_impl_._has_bits_[0] & 0x00000001u) == 0) {
return nullptr;
@ -1662,7 +1662,7 @@ inline std::string* CodeGeneratorResponse_File::release_name() {
return released;
}
inline void CodeGeneratorResponse_File::set_allocated_name(std::string* value) {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
if (value != nullptr) {
_impl_._has_bits_[0] |= 0x00000001u;
} else {
@ -1683,7 +1683,7 @@ inline bool CodeGeneratorResponse_File::has_insertion_point() const {
return value;
}
inline void CodeGeneratorResponse_File::clear_insertion_point() {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
_impl_.insertion_point_.ClearToEmpty();
_impl_._has_bits_[0] &= ~0x00000002u;
}
@ -1695,7 +1695,7 @@ inline const std::string& CodeGeneratorResponse_File::insertion_point() const
template <typename Arg_, typename... Args_>
inline PROTOBUF_ALWAYS_INLINE void CodeGeneratorResponse_File::set_insertion_point(Arg_&& arg,
Args_... args) {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
_impl_._has_bits_[0] |= 0x00000002u;
_impl_.insertion_point_.Set(static_cast<Arg_&&>(arg), args..., GetArena());
// @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point)
@ -1706,21 +1706,21 @@ inline std::string* CodeGeneratorResponse_File::mutable_insertion_point() ABSL_A
return _s;
}
inline const std::string& CodeGeneratorResponse_File::_internal_insertion_point() const {
PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanRead(&_impl_);
return _impl_.insertion_point_.Get();
}
inline void CodeGeneratorResponse_File::_internal_set_insertion_point(const std::string& value) {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
_impl_._has_bits_[0] |= 0x00000002u;
_impl_.insertion_point_.Set(value, GetArena());
}
inline std::string* CodeGeneratorResponse_File::_internal_mutable_insertion_point() {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
_impl_._has_bits_[0] |= 0x00000002u;
return _impl_.insertion_point_.Mutable( GetArena());
}
inline std::string* CodeGeneratorResponse_File::release_insertion_point() {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
// @@protoc_insertion_point(field_release:google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point)
if ((_impl_._has_bits_[0] & 0x00000002u) == 0) {
return nullptr;
@ -1733,7 +1733,7 @@ inline std::string* CodeGeneratorResponse_File::release_insertion_point() {
return released;
}
inline void CodeGeneratorResponse_File::set_allocated_insertion_point(std::string* value) {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
if (value != nullptr) {
_impl_._has_bits_[0] |= 0x00000002u;
} else {
@ -1754,7 +1754,7 @@ inline bool CodeGeneratorResponse_File::has_content() const {
return value;
}
inline void CodeGeneratorResponse_File::clear_content() {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
_impl_.content_.ClearToEmpty();
_impl_._has_bits_[0] &= ~0x00000004u;
}
@ -1766,7 +1766,7 @@ inline const std::string& CodeGeneratorResponse_File::content() const
template <typename Arg_, typename... Args_>
inline PROTOBUF_ALWAYS_INLINE void CodeGeneratorResponse_File::set_content(Arg_&& arg,
Args_... args) {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
_impl_._has_bits_[0] |= 0x00000004u;
_impl_.content_.Set(static_cast<Arg_&&>(arg), args..., GetArena());
// @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorResponse.File.content)
@ -1777,21 +1777,21 @@ inline std::string* CodeGeneratorResponse_File::mutable_content() ABSL_ATTRIBUTE
return _s;
}
inline const std::string& CodeGeneratorResponse_File::_internal_content() const {
PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanRead(&_impl_);
return _impl_.content_.Get();
}
inline void CodeGeneratorResponse_File::_internal_set_content(const std::string& value) {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
_impl_._has_bits_[0] |= 0x00000004u;
_impl_.content_.Set(value, GetArena());
}
inline std::string* CodeGeneratorResponse_File::_internal_mutable_content() {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
_impl_._has_bits_[0] |= 0x00000004u;
return _impl_.content_.Mutable( GetArena());
}
inline std::string* CodeGeneratorResponse_File::release_content() {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
// @@protoc_insertion_point(field_release:google.protobuf.compiler.CodeGeneratorResponse.File.content)
if ((_impl_._has_bits_[0] & 0x00000004u) == 0) {
return nullptr;
@ -1804,7 +1804,7 @@ inline std::string* CodeGeneratorResponse_File::release_content() {
return released;
}
inline void CodeGeneratorResponse_File::set_allocated_content(std::string* value) {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
if (value != nullptr) {
_impl_._has_bits_[0] |= 0x00000004u;
} else {
@ -1826,7 +1826,7 @@ inline bool CodeGeneratorResponse_File::has_generated_code_info() const {
return value;
}
inline const ::google::protobuf::GeneratedCodeInfo& CodeGeneratorResponse_File::_internal_generated_code_info() const {
PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanRead(&_impl_);
const ::google::protobuf::GeneratedCodeInfo* p = _impl_.generated_code_info_;
return p != nullptr ? *p : reinterpret_cast<const ::google::protobuf::GeneratedCodeInfo&>(::google::protobuf::_GeneratedCodeInfo_default_instance_);
}
@ -1835,7 +1835,7 @@ inline const ::google::protobuf::GeneratedCodeInfo& CodeGeneratorResponse_File::
return _internal_generated_code_info();
}
inline void CodeGeneratorResponse_File::unsafe_arena_set_allocated_generated_code_info(::google::protobuf::GeneratedCodeInfo* value) {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
if (GetArena() == nullptr) {
delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.generated_code_info_);
}
@ -1848,7 +1848,7 @@ inline void CodeGeneratorResponse_File::unsafe_arena_set_allocated_generated_cod
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.compiler.CodeGeneratorResponse.File.generated_code_info)
}
inline ::google::protobuf::GeneratedCodeInfo* CodeGeneratorResponse_File::release_generated_code_info() {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
_impl_._has_bits_[0] &= ~0x00000008u;
::google::protobuf::GeneratedCodeInfo* released = _impl_.generated_code_info_;
@ -1867,7 +1867,7 @@ inline ::google::protobuf::GeneratedCodeInfo* CodeGeneratorResponse_File::releas
return released;
}
inline ::google::protobuf::GeneratedCodeInfo* CodeGeneratorResponse_File::unsafe_arena_release_generated_code_info() {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
// @@protoc_insertion_point(field_release:google.protobuf.compiler.CodeGeneratorResponse.File.generated_code_info)
_impl_._has_bits_[0] &= ~0x00000008u;
@ -1876,7 +1876,7 @@ inline ::google::protobuf::GeneratedCodeInfo* CodeGeneratorResponse_File::unsafe
return temp;
}
inline ::google::protobuf::GeneratedCodeInfo* CodeGeneratorResponse_File::_internal_mutable_generated_code_info() {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
if (_impl_.generated_code_info_ == nullptr) {
auto* p = ::google::protobuf::Message::DefaultConstruct<::google::protobuf::GeneratedCodeInfo>(GetArena());
_impl_.generated_code_info_ = reinterpret_cast<::google::protobuf::GeneratedCodeInfo*>(p);
@ -1891,7 +1891,7 @@ inline ::google::protobuf::GeneratedCodeInfo* CodeGeneratorResponse_File::mutabl
}
inline void CodeGeneratorResponse_File::set_allocated_generated_code_info(::google::protobuf::GeneratedCodeInfo* value) {
::google::protobuf::Arena* message_arena = GetArena();
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
if (message_arena == nullptr) {
delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.generated_code_info_);
}
@ -1920,7 +1920,7 @@ inline bool CodeGeneratorResponse::has_error() const {
return value;
}
inline void CodeGeneratorResponse::clear_error() {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
_impl_.error_.ClearToEmpty();
_impl_._has_bits_[0] &= ~0x00000001u;
}
@ -1932,7 +1932,7 @@ inline const std::string& CodeGeneratorResponse::error() const
template <typename Arg_, typename... Args_>
inline PROTOBUF_ALWAYS_INLINE void CodeGeneratorResponse::set_error(Arg_&& arg,
Args_... args) {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
_impl_._has_bits_[0] |= 0x00000001u;
_impl_.error_.Set(static_cast<Arg_&&>(arg), args..., GetArena());
// @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorResponse.error)
@ -1943,21 +1943,21 @@ inline std::string* CodeGeneratorResponse::mutable_error() ABSL_ATTRIBUTE_LIFETI
return _s;
}
inline const std::string& CodeGeneratorResponse::_internal_error() const {
PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanRead(&_impl_);
return _impl_.error_.Get();
}
inline void CodeGeneratorResponse::_internal_set_error(const std::string& value) {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
_impl_._has_bits_[0] |= 0x00000001u;
_impl_.error_.Set(value, GetArena());
}
inline std::string* CodeGeneratorResponse::_internal_mutable_error() {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
_impl_._has_bits_[0] |= 0x00000001u;
return _impl_.error_.Mutable( GetArena());
}
inline std::string* CodeGeneratorResponse::release_error() {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
// @@protoc_insertion_point(field_release:google.protobuf.compiler.CodeGeneratorResponse.error)
if ((_impl_._has_bits_[0] & 0x00000001u) == 0) {
return nullptr;
@ -1970,7 +1970,7 @@ inline std::string* CodeGeneratorResponse::release_error() {
return released;
}
inline void CodeGeneratorResponse::set_allocated_error(std::string* value) {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
if (value != nullptr) {
_impl_._has_bits_[0] |= 0x00000001u;
} else {
@ -1991,7 +1991,7 @@ inline bool CodeGeneratorResponse::has_supported_features() const {
return value;
}
inline void CodeGeneratorResponse::clear_supported_features() {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
_impl_.supported_features_ = ::uint64_t{0u};
_impl_._has_bits_[0] &= ~0x00000002u;
}
@ -2005,11 +2005,11 @@ inline void CodeGeneratorResponse::set_supported_features(::uint64_t value) {
// @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorResponse.supported_features)
}
inline ::uint64_t CodeGeneratorResponse::_internal_supported_features() const {
PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanRead(&_impl_);
return _impl_.supported_features_;
}
inline void CodeGeneratorResponse::_internal_set_supported_features(::uint64_t value) {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
_impl_.supported_features_ = value;
}
@ -2019,7 +2019,7 @@ inline bool CodeGeneratorResponse::has_minimum_edition() const {
return value;
}
inline void CodeGeneratorResponse::clear_minimum_edition() {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
_impl_.minimum_edition_ = 0;
_impl_._has_bits_[0] &= ~0x00000004u;
}
@ -2033,11 +2033,11 @@ inline void CodeGeneratorResponse::set_minimum_edition(::int32_t value) {
// @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorResponse.minimum_edition)
}
inline ::int32_t CodeGeneratorResponse::_internal_minimum_edition() const {
PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanRead(&_impl_);
return _impl_.minimum_edition_;
}
inline void CodeGeneratorResponse::_internal_set_minimum_edition(::int32_t value) {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
_impl_.minimum_edition_ = value;
}
@ -2047,7 +2047,7 @@ inline bool CodeGeneratorResponse::has_maximum_edition() const {
return value;
}
inline void CodeGeneratorResponse::clear_maximum_edition() {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
_impl_.maximum_edition_ = 0;
_impl_._has_bits_[0] &= ~0x00000008u;
}
@ -2061,11 +2061,11 @@ inline void CodeGeneratorResponse::set_maximum_edition(::int32_t value) {
// @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorResponse.maximum_edition)
}
inline ::int32_t CodeGeneratorResponse::_internal_maximum_edition() const {
PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanRead(&_impl_);
return _impl_.maximum_edition_;
}
inline void CodeGeneratorResponse::_internal_set_maximum_edition(::int32_t value) {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
_impl_.maximum_edition_ = value;
}
@ -2077,7 +2077,7 @@ inline int CodeGeneratorResponse::file_size() const {
return _internal_file_size();
}
inline void CodeGeneratorResponse::clear_file() {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
_impl_.file_.Clear();
}
inline ::google::protobuf::compiler::CodeGeneratorResponse_File* CodeGeneratorResponse::mutable_file(int index)
@ -2088,7 +2088,7 @@ inline ::google::protobuf::compiler::CodeGeneratorResponse_File* CodeGeneratorRe
inline ::google::protobuf::RepeatedPtrField<::google::protobuf::compiler::CodeGeneratorResponse_File>* CodeGeneratorResponse::mutable_file()
ABSL_ATTRIBUTE_LIFETIME_BOUND {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.compiler.CodeGeneratorResponse.file)
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
return _internal_mutable_file();
}
inline const ::google::protobuf::compiler::CodeGeneratorResponse_File& CodeGeneratorResponse::file(int index) const
@ -2097,7 +2097,7 @@ inline const ::google::protobuf::compiler::CodeGeneratorResponse_File& CodeGener
return _internal_file().Get(index);
}
inline ::google::protobuf::compiler::CodeGeneratorResponse_File* CodeGeneratorResponse::add_file() ABSL_ATTRIBUTE_LIFETIME_BOUND {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
::google::protobuf::compiler::CodeGeneratorResponse_File* _add = _internal_mutable_file()->Add();
// @@protoc_insertion_point(field_add:google.protobuf.compiler.CodeGeneratorResponse.file)
return _add;
@ -2109,12 +2109,12 @@ inline const ::google::protobuf::RepeatedPtrField<::google::protobuf::compiler::
}
inline const ::google::protobuf::RepeatedPtrField<::google::protobuf::compiler::CodeGeneratorResponse_File>&
CodeGeneratorResponse::_internal_file() const {
PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanRead(&_impl_);
return _impl_.file_;
}
inline ::google::protobuf::RepeatedPtrField<::google::protobuf::compiler::CodeGeneratorResponse_File>*
CodeGeneratorResponse::_internal_mutable_file() {
PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanRead(&_impl_);
return &_impl_.file_;
}

@ -228,7 +228,7 @@ const ::_pbi::TcParseTable<1, 2, 1, 0, 2> CppFeatures::_table_ = {
PROTOBUF_NOINLINE void CppFeatures::Clear() {
// @@protoc_insertion_point(message_clear_start:pb.CppFeatures)
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;

@ -327,7 +327,7 @@ inline bool CppFeatures::has_legacy_closed_enum() const {
return value;
}
inline void CppFeatures::clear_legacy_closed_enum() {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
_impl_.legacy_closed_enum_ = false;
_impl_._has_bits_[0] &= ~0x00000001u;
}
@ -341,11 +341,11 @@ inline void CppFeatures::set_legacy_closed_enum(bool value) {
// @@protoc_insertion_point(field_set:pb.CppFeatures.legacy_closed_enum)
}
inline bool CppFeatures::_internal_legacy_closed_enum() const {
PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanRead(&_impl_);
return _impl_.legacy_closed_enum_;
}
inline void CppFeatures::_internal_set_legacy_closed_enum(bool value) {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
_impl_.legacy_closed_enum_ = value;
}
@ -355,7 +355,7 @@ inline bool CppFeatures::has_string_type() const {
return value;
}
inline void CppFeatures::clear_string_type() {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
_impl_.string_type_ = 0;
_impl_._has_bits_[0] &= ~0x00000002u;
}
@ -369,11 +369,11 @@ inline void CppFeatures::set_string_type(::pb::CppFeatures_StringType value) {
// @@protoc_insertion_point(field_set:pb.CppFeatures.string_type)
}
inline ::pb::CppFeatures_StringType CppFeatures::_internal_string_type() const {
PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanRead(&_impl_);
return static_cast<::pb::CppFeatures_StringType>(_impl_.string_type_);
}
inline void CppFeatures::_internal_set_string_type(::pb::CppFeatures_StringType value) {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
assert(::pb::CppFeatures_StringType_IsValid(value));
_impl_.string_type_ = value;
}

@ -2428,7 +2428,7 @@ constexpr ::_pbi::TcParseTable<0, 1, 1, 0, 2> FileDescriptorSet::_table_ = {
PROTOBUF_NOINLINE void FileDescriptorSet::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.FileDescriptorSet)
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@ -2748,7 +2748,7 @@ constexpr ::_pbi::TcParseTable<4, 13, 7, 79, 2> FileDescriptorProto::_table_ = {
PROTOBUF_NOINLINE void FileDescriptorProto::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.FileDescriptorProto)
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@ -3248,7 +3248,7 @@ constexpr ::_pbi::TcParseTable<2, 3, 1, 0, 2> DescriptorProto_ExtensionRange::_t
PROTOBUF_NOINLINE void DescriptorProto_ExtensionRange::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.DescriptorProto.ExtensionRange)
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@ -3503,7 +3503,7 @@ constexpr ::_pbi::TcParseTable<1, 2, 0, 0, 2> DescriptorProto_ReservedRange::_ta
PROTOBUF_NOINLINE void DescriptorProto_ReservedRange::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.DescriptorProto.ReservedRange)
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@ -3826,7 +3826,7 @@ constexpr ::_pbi::TcParseTable<4, 10, 8, 65, 2> DescriptorProto::_table_ = {
PROTOBUF_NOINLINE void DescriptorProto::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.DescriptorProto)
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@ -4278,7 +4278,7 @@ constexpr ::_pbi::TcParseTable<3, 5, 0, 71, 2> ExtensionRangeOptions_Declaration
PROTOBUF_NOINLINE void ExtensionRangeOptions_Declaration::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.ExtensionRangeOptions.Declaration)
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@ -4606,7 +4606,7 @@ constexpr ::_pbi::TcParseTable<3, 4, 4, 0, 12> ExtensionRangeOptions::_table_ =
PROTOBUF_NOINLINE void ExtensionRangeOptions::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.ExtensionRangeOptions)
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@ -5003,7 +5003,7 @@ constexpr ::_pbi::TcParseTable<4, 11, 3, 96, 2> FieldDescriptorProto::_table_ =
PROTOBUF_NOINLINE void FieldDescriptorProto::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.FieldDescriptorProto)
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@ -5442,7 +5442,7 @@ constexpr ::_pbi::TcParseTable<1, 2, 1, 49, 2> OneofDescriptorProto::_table_ = {
PROTOBUF_NOINLINE void OneofDescriptorProto::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.OneofDescriptorProto)
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@ -5680,7 +5680,7 @@ constexpr ::_pbi::TcParseTable<1, 2, 0, 0, 2> EnumDescriptorProto_EnumReservedRa
PROTOBUF_NOINLINE void EnumDescriptorProto_EnumReservedRange::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.EnumDescriptorProto.EnumReservedRange)
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@ -5955,7 +5955,7 @@ constexpr ::_pbi::TcParseTable<3, 5, 3, 61, 2> EnumDescriptorProto::_table_ = {
PROTOBUF_NOINLINE void EnumDescriptorProto::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.EnumDescriptorProto)
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@ -6283,7 +6283,7 @@ constexpr ::_pbi::TcParseTable<2, 3, 1, 53, 2> EnumValueDescriptorProto::_table_
PROTOBUF_NOINLINE void EnumValueDescriptorProto::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.EnumValueDescriptorProto)
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@ -6572,7 +6572,7 @@ constexpr ::_pbi::TcParseTable<2, 3, 2, 51, 2> ServiceDescriptorProto::_table_ =
PROTOBUF_NOINLINE void ServiceDescriptorProto::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.ServiceDescriptorProto)
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@ -6896,7 +6896,7 @@ constexpr ::_pbi::TcParseTable<3, 6, 1, 71, 2> MethodDescriptorProto::_table_ =
PROTOBUF_NOINLINE void MethodDescriptorProto::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.MethodDescriptorProto)
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@ -7410,7 +7410,7 @@ constexpr ::_pbi::TcParseTable<5, 21, 3, 202, 12> FileOptions::_table_ = {
PROTOBUF_NOINLINE void FileOptions::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.FileOptions)
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@ -8092,7 +8092,7 @@ constexpr ::_pbi::TcParseTable<3, 7, 2, 0, 7> MessageOptions::_table_ = {
PROTOBUF_NOINLINE void MessageOptions::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.MessageOptions)
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@ -8437,7 +8437,7 @@ constexpr ::_pbi::TcParseTable<1, 2, 1, 57, 2> FieldOptions_EditionDefault::_tab
PROTOBUF_NOINLINE void FieldOptions_EditionDefault::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.FieldOptions.EditionDefault)
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@ -8766,7 +8766,7 @@ constexpr ::_pbi::TcParseTable<4, 13, 7, 0, 7> FieldOptions::_table_ = {
PROTOBUF_NOINLINE void FieldOptions::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.FieldOptions)
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@ -9234,7 +9234,7 @@ constexpr ::_pbi::TcParseTable<2, 2, 2, 0, 7> OneofOptions::_table_ = {
PROTOBUF_NOINLINE void OneofOptions::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.OneofOptions)
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@ -9527,7 +9527,7 @@ constexpr ::_pbi::TcParseTable<3, 5, 2, 0, 7> EnumOptions::_table_ = {
PROTOBUF_NOINLINE void EnumOptions::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.EnumOptions)
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@ -9874,7 +9874,7 @@ constexpr ::_pbi::TcParseTable<3, 4, 2, 0, 7> EnumValueOptions::_table_ = {
PROTOBUF_NOINLINE void EnumValueOptions::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.EnumValueOptions)
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@ -10192,7 +10192,7 @@ constexpr ::_pbi::TcParseTable<2, 3, 2, 0, 12> ServiceOptions::_table_ = {
PROTOBUF_NOINLINE void ServiceOptions::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.ServiceOptions)
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@ -10509,7 +10509,7 @@ constexpr ::_pbi::TcParseTable<3, 4, 3, 0, 12> MethodOptions::_table_ = {
PROTOBUF_NOINLINE void MethodOptions::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.MethodOptions)
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@ -10813,7 +10813,7 @@ constexpr ::_pbi::TcParseTable<1, 2, 0, 62, 2> UninterpretedOption_NamePart::_ta
PROTOBUF_NOINLINE void UninterpretedOption_NamePart::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.UninterpretedOption.NamePart)
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@ -11105,7 +11105,7 @@ constexpr ::_pbi::TcParseTable<3, 7, 1, 75, 2> UninterpretedOption::_table_ = {
PROTOBUF_NOINLINE void UninterpretedOption::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.UninterpretedOption)
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@ -11486,7 +11486,7 @@ constexpr ::_pbi::TcParseTable<3, 6, 6, 0, 2> FeatureSet::_table_ = {
PROTOBUF_NOINLINE void FeatureSet::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.FeatureSet)
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@ -11807,7 +11807,7 @@ constexpr ::_pbi::TcParseTable<1, 2, 2, 0, 2> FeatureSetDefaults_FeatureSetEditi
PROTOBUF_NOINLINE void FeatureSetDefaults_FeatureSetEditionDefault::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault)
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@ -12069,7 +12069,7 @@ constexpr ::_pbi::TcParseTable<1, 3, 3, 0, 2> FeatureSetDefaults::_table_ = {
PROTOBUF_NOINLINE void FeatureSetDefaults::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.FeatureSetDefaults)
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@ -12365,7 +12365,7 @@ constexpr ::_pbi::TcParseTable<3, 5, 0, 106, 2> SourceCodeInfo_Location::_table_
PROTOBUF_NOINLINE void SourceCodeInfo_Location::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.SourceCodeInfo.Location)
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@ -12660,7 +12660,7 @@ constexpr ::_pbi::TcParseTable<0, 1, 1, 0, 2> SourceCodeInfo::_table_ = {
PROTOBUF_NOINLINE void SourceCodeInfo::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.SourceCodeInfo)
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@ -12903,7 +12903,7 @@ constexpr ::_pbi::TcParseTable<3, 5, 1, 64, 2> GeneratedCodeInfo_Annotation::_ta
PROTOBUF_NOINLINE void GeneratedCodeInfo_Annotation::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.GeneratedCodeInfo.Annotation)
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@ -13192,7 +13192,7 @@ constexpr ::_pbi::TcParseTable<0, 1, 1, 0, 2> GeneratedCodeInfo::_table_ = {
PROTOBUF_NOINLINE void GeneratedCodeInfo::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.GeneratedCodeInfo)
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::google::protobuf::internal::TSanWrite(&_impl_);
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;

File diff suppressed because it is too large Load Diff

@ -245,6 +245,28 @@ Unreachable() {
}
#endif
#ifdef PROTOBUF_TSAN
// TODO: it would be preferable to use __tsan_external_read/
// __tsan_external_write, but they can cause dlopen issues.
template <typename T>
PROTOBUF_ALWAYS_INLINE inline void TSanRead(const T* impl) {
char protobuf_tsan_dummy =
*reinterpret_cast<const char*>(&impl->_tsan_detect_race);
asm volatile("" : "+r"(protobuf_tsan_dummy));
}
// We currently use a dedicated member for TSan checking so the value of this
// member is not important. We can unconditionally write to it without affecting
// correctness of the rest of the class.
template <typename T>
PROTOBUF_ALWAYS_INLINE inline void TSanWrite(T* impl) {
*reinterpret_cast<char*>(&impl->_tsan_detect_race) = 0;
}
#else
PROTOBUF_ALWAYS_INLINE inline void TSanRead(const void*) {}
PROTOBUF_ALWAYS_INLINE inline void TSanWrite(const void*) {}
#endif
} // namespace internal
} // namespace protobuf
} // namespace google

@ -642,25 +642,6 @@ static_assert(PROTOBUF_ABSL_MIN(20230125, 3),
#ifdef PROTOBUF_TSAN_WRITE
#error PROTOBUF_TSAN_WRITE was previously defined
#endif
#ifdef PROTOBUF_TSAN
// TODO: it would be preferable to use __tsan_external_read/
// __tsan_external_write, but they can cause dlopen issues.
#define PROTOBUF_TSAN_READ(addr) \
do { \
char protobuf_tsan_dummy = *reinterpret_cast<const char *>(addr); \
asm volatile("" : "+r"(protobuf_tsan_dummy)); \
} while (0)
// We currently use a dedicated member for TSan checking so the value of this
// member is not important. We can unconditionally write to it without affecting
// correctness of the rest of the class.
#define PROTOBUF_TSAN_WRITE(addr) \
do { \
*reinterpret_cast<char *>(addr) = 0; \
} while (0)
#else // PROTOBUF_TSAN
#define PROTOBUF_TSAN_READ(addr) (void)0
#define PROTOBUF_TSAN_WRITE(addr) (void)0
#endif // PROTOBUF_TSAN
#ifdef PROTOBUF_TSAN
#define PROTOBUF_TSAN_DECLARE_MEMBER ::uint32_t _tsan_detect_race = 0;

@ -70,8 +70,6 @@
#undef PROTOBUF_MSAN
#undef PROTOBUF_TSAN
#undef PROTOBUF_TSAN_DECLARE_MEMBER
#undef PROTOBUF_TSAN_READ
#undef PROTOBUF_TSAN_WRITE
#undef PROTOBUF_USE_TABLE_PARSER_ON_REFLECTION
#undef PROTOBUF_BUILTIN_CONSTANT_P
#undef PROTOBUF_DESCRIPTOR_WEAK_MESSAGES_ALLOWED

Loading…
Cancel
Save