1 // Generated by the protocol buffer compiler.  DO NOT EDIT!
2 // source: protos/perfetto/common/descriptor.proto
3 
4 #include "protos/perfetto/common/descriptor.pb.h"
5 
6 #include <algorithm>
7 #include <cstdint>
8 
9 #include <google/protobuf/io/coded_stream.h>
10 #include <google/protobuf/extension_set.h>
11 #include <google/protobuf/wire_format_lite.h>
12 #include <google/protobuf/io/zero_copy_stream_impl_lite.h>
13 // @@protoc_insertion_point(includes)
14 #include <google/protobuf/port_def.inc>
15 
16 PROTOBUF_PRAGMA_INIT_SEG
17 
18 namespace _pb = ::PROTOBUF_NAMESPACE_ID;
19 namespace _pbi = _pb::internal;
20 
21 namespace perfetto {
22 namespace protos {
FileDescriptorSet(::_pbi::ConstantInitialized)23 PROTOBUF_CONSTEXPR FileDescriptorSet::FileDescriptorSet(
24     ::_pbi::ConstantInitialized): _impl_{
25     /*decltype(_impl_.file_)*/{}
26   , /*decltype(_impl_._cached_size_)*/{}} {}
27 struct FileDescriptorSetDefaultTypeInternal {
FileDescriptorSetDefaultTypeInternalperfetto::protos::FileDescriptorSetDefaultTypeInternal28   PROTOBUF_CONSTEXPR FileDescriptorSetDefaultTypeInternal()
29       : _instance(::_pbi::ConstantInitialized{}) {}
~FileDescriptorSetDefaultTypeInternalperfetto::protos::FileDescriptorSetDefaultTypeInternal30   ~FileDescriptorSetDefaultTypeInternal() {}
31   union {  // NOLINT(misc-non-private-member-variables-in-classes)
32     FileDescriptorSet _instance;
33   };
34 };
35 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FileDescriptorSetDefaultTypeInternal _FileDescriptorSet_default_instance_;
FileDescriptorProto(::_pbi::ConstantInitialized)36 PROTOBUF_CONSTEXPR FileDescriptorProto::FileDescriptorProto(
37     ::_pbi::ConstantInitialized): _impl_{
38     /*decltype(_impl_._has_bits_)*/{}
39   , /*decltype(_impl_._cached_size_)*/{}
40   , /*decltype(_impl_.dependency_)*/{}
41   , /*decltype(_impl_.message_type_)*/{}
42   , /*decltype(_impl_.enum_type_)*/{}
43   , /*decltype(_impl_.extension_)*/{}
44   , /*decltype(_impl_.public_dependency_)*/{}
45   , /*decltype(_impl_.weak_dependency_)*/{}
46   , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
47   , /*decltype(_impl_.package_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}} {}
48 struct FileDescriptorProtoDefaultTypeInternal {
FileDescriptorProtoDefaultTypeInternalperfetto::protos::FileDescriptorProtoDefaultTypeInternal49   PROTOBUF_CONSTEXPR FileDescriptorProtoDefaultTypeInternal()
50       : _instance(::_pbi::ConstantInitialized{}) {}
~FileDescriptorProtoDefaultTypeInternalperfetto::protos::FileDescriptorProtoDefaultTypeInternal51   ~FileDescriptorProtoDefaultTypeInternal() {}
52   union {  // NOLINT(misc-non-private-member-variables-in-classes)
53     FileDescriptorProto _instance;
54   };
55 };
56 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FileDescriptorProtoDefaultTypeInternal _FileDescriptorProto_default_instance_;
DescriptorProto_ReservedRange(::_pbi::ConstantInitialized)57 PROTOBUF_CONSTEXPR DescriptorProto_ReservedRange::DescriptorProto_ReservedRange(
58     ::_pbi::ConstantInitialized): _impl_{
59     /*decltype(_impl_._has_bits_)*/{}
60   , /*decltype(_impl_._cached_size_)*/{}
61   , /*decltype(_impl_.start_)*/0
62   , /*decltype(_impl_.end_)*/0} {}
63 struct DescriptorProto_ReservedRangeDefaultTypeInternal {
DescriptorProto_ReservedRangeDefaultTypeInternalperfetto::protos::DescriptorProto_ReservedRangeDefaultTypeInternal64   PROTOBUF_CONSTEXPR DescriptorProto_ReservedRangeDefaultTypeInternal()
65       : _instance(::_pbi::ConstantInitialized{}) {}
~DescriptorProto_ReservedRangeDefaultTypeInternalperfetto::protos::DescriptorProto_ReservedRangeDefaultTypeInternal66   ~DescriptorProto_ReservedRangeDefaultTypeInternal() {}
67   union {  // NOLINT(misc-non-private-member-variables-in-classes)
68     DescriptorProto_ReservedRange _instance;
69   };
70 };
71 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DescriptorProto_ReservedRangeDefaultTypeInternal _DescriptorProto_ReservedRange_default_instance_;
DescriptorProto(::_pbi::ConstantInitialized)72 PROTOBUF_CONSTEXPR DescriptorProto::DescriptorProto(
73     ::_pbi::ConstantInitialized): _impl_{
74     /*decltype(_impl_._has_bits_)*/{}
75   , /*decltype(_impl_._cached_size_)*/{}
76   , /*decltype(_impl_.field_)*/{}
77   , /*decltype(_impl_.nested_type_)*/{}
78   , /*decltype(_impl_.enum_type_)*/{}
79   , /*decltype(_impl_.extension_)*/{}
80   , /*decltype(_impl_.oneof_decl_)*/{}
81   , /*decltype(_impl_.reserved_range_)*/{}
82   , /*decltype(_impl_.reserved_name_)*/{}
83   , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}} {}
84 struct DescriptorProtoDefaultTypeInternal {
DescriptorProtoDefaultTypeInternalperfetto::protos::DescriptorProtoDefaultTypeInternal85   PROTOBUF_CONSTEXPR DescriptorProtoDefaultTypeInternal()
86       : _instance(::_pbi::ConstantInitialized{}) {}
~DescriptorProtoDefaultTypeInternalperfetto::protos::DescriptorProtoDefaultTypeInternal87   ~DescriptorProtoDefaultTypeInternal() {}
88   union {  // NOLINT(misc-non-private-member-variables-in-classes)
89     DescriptorProto _instance;
90   };
91 };
92 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DescriptorProtoDefaultTypeInternal _DescriptorProto_default_instance_;
UninterpretedOption_NamePart(::_pbi::ConstantInitialized)93 PROTOBUF_CONSTEXPR UninterpretedOption_NamePart::UninterpretedOption_NamePart(
94     ::_pbi::ConstantInitialized): _impl_{
95     /*decltype(_impl_._has_bits_)*/{}
96   , /*decltype(_impl_._cached_size_)*/{}
97   , /*decltype(_impl_.name_part_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
98   , /*decltype(_impl_.is_extension_)*/false} {}
99 struct UninterpretedOption_NamePartDefaultTypeInternal {
UninterpretedOption_NamePartDefaultTypeInternalperfetto::protos::UninterpretedOption_NamePartDefaultTypeInternal100   PROTOBUF_CONSTEXPR UninterpretedOption_NamePartDefaultTypeInternal()
101       : _instance(::_pbi::ConstantInitialized{}) {}
~UninterpretedOption_NamePartDefaultTypeInternalperfetto::protos::UninterpretedOption_NamePartDefaultTypeInternal102   ~UninterpretedOption_NamePartDefaultTypeInternal() {}
103   union {  // NOLINT(misc-non-private-member-variables-in-classes)
104     UninterpretedOption_NamePart _instance;
105   };
106 };
107 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 UninterpretedOption_NamePartDefaultTypeInternal _UninterpretedOption_NamePart_default_instance_;
UninterpretedOption(::_pbi::ConstantInitialized)108 PROTOBUF_CONSTEXPR UninterpretedOption::UninterpretedOption(
109     ::_pbi::ConstantInitialized): _impl_{
110     /*decltype(_impl_._has_bits_)*/{}
111   , /*decltype(_impl_._cached_size_)*/{}
112   , /*decltype(_impl_.name_)*/{}
113   , /*decltype(_impl_.identifier_value_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
114   , /*decltype(_impl_.string_value_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
115   , /*decltype(_impl_.aggregate_value_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
116   , /*decltype(_impl_.positive_int_value_)*/::uint64_t{0u}
117   , /*decltype(_impl_.negative_int_value_)*/::int64_t{0}
118   , /*decltype(_impl_.double_value_)*/0} {}
119 struct UninterpretedOptionDefaultTypeInternal {
UninterpretedOptionDefaultTypeInternalperfetto::protos::UninterpretedOptionDefaultTypeInternal120   PROTOBUF_CONSTEXPR UninterpretedOptionDefaultTypeInternal()
121       : _instance(::_pbi::ConstantInitialized{}) {}
~UninterpretedOptionDefaultTypeInternalperfetto::protos::UninterpretedOptionDefaultTypeInternal122   ~UninterpretedOptionDefaultTypeInternal() {}
123   union {  // NOLINT(misc-non-private-member-variables-in-classes)
124     UninterpretedOption _instance;
125   };
126 };
127 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 UninterpretedOptionDefaultTypeInternal _UninterpretedOption_default_instance_;
FieldOptions(::_pbi::ConstantInitialized)128 PROTOBUF_CONSTEXPR FieldOptions::FieldOptions(
129     ::_pbi::ConstantInitialized): _impl_{
130     /*decltype(_impl_._has_bits_)*/{}
131   , /*decltype(_impl_._cached_size_)*/{}
132   , /*decltype(_impl_.uninterpreted_option_)*/{}
133   , /*decltype(_impl_.packed_)*/false} {}
134 struct FieldOptionsDefaultTypeInternal {
FieldOptionsDefaultTypeInternalperfetto::protos::FieldOptionsDefaultTypeInternal135   PROTOBUF_CONSTEXPR FieldOptionsDefaultTypeInternal()
136       : _instance(::_pbi::ConstantInitialized{}) {}
~FieldOptionsDefaultTypeInternalperfetto::protos::FieldOptionsDefaultTypeInternal137   ~FieldOptionsDefaultTypeInternal() {}
138   union {  // NOLINT(misc-non-private-member-variables-in-classes)
139     FieldOptions _instance;
140   };
141 };
142 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FieldOptionsDefaultTypeInternal _FieldOptions_default_instance_;
FieldDescriptorProto(::_pbi::ConstantInitialized)143 PROTOBUF_CONSTEXPR FieldDescriptorProto::FieldDescriptorProto(
144     ::_pbi::ConstantInitialized): _impl_{
145     /*decltype(_impl_._has_bits_)*/{}
146   , /*decltype(_impl_._cached_size_)*/{}
147   , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
148   , /*decltype(_impl_.extendee_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
149   , /*decltype(_impl_.type_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
150   , /*decltype(_impl_.default_value_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
151   , /*decltype(_impl_.options_)*/nullptr
152   , /*decltype(_impl_.number_)*/0
153   , /*decltype(_impl_.oneof_index_)*/0
154   , /*decltype(_impl_.label_)*/1
155   , /*decltype(_impl_.type_)*/1} {}
156 struct FieldDescriptorProtoDefaultTypeInternal {
FieldDescriptorProtoDefaultTypeInternalperfetto::protos::FieldDescriptorProtoDefaultTypeInternal157   PROTOBUF_CONSTEXPR FieldDescriptorProtoDefaultTypeInternal()
158       : _instance(::_pbi::ConstantInitialized{}) {}
~FieldDescriptorProtoDefaultTypeInternalperfetto::protos::FieldDescriptorProtoDefaultTypeInternal159   ~FieldDescriptorProtoDefaultTypeInternal() {}
160   union {  // NOLINT(misc-non-private-member-variables-in-classes)
161     FieldDescriptorProto _instance;
162   };
163 };
164 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FieldDescriptorProtoDefaultTypeInternal _FieldDescriptorProto_default_instance_;
OneofDescriptorProto(::_pbi::ConstantInitialized)165 PROTOBUF_CONSTEXPR OneofDescriptorProto::OneofDescriptorProto(
166     ::_pbi::ConstantInitialized): _impl_{
167     /*decltype(_impl_._has_bits_)*/{}
168   , /*decltype(_impl_._cached_size_)*/{}
169   , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
170   , /*decltype(_impl_.options_)*/nullptr} {}
171 struct OneofDescriptorProtoDefaultTypeInternal {
OneofDescriptorProtoDefaultTypeInternalperfetto::protos::OneofDescriptorProtoDefaultTypeInternal172   PROTOBUF_CONSTEXPR OneofDescriptorProtoDefaultTypeInternal()
173       : _instance(::_pbi::ConstantInitialized{}) {}
~OneofDescriptorProtoDefaultTypeInternalperfetto::protos::OneofDescriptorProtoDefaultTypeInternal174   ~OneofDescriptorProtoDefaultTypeInternal() {}
175   union {  // NOLINT(misc-non-private-member-variables-in-classes)
176     OneofDescriptorProto _instance;
177   };
178 };
179 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 OneofDescriptorProtoDefaultTypeInternal _OneofDescriptorProto_default_instance_;
EnumDescriptorProto(::_pbi::ConstantInitialized)180 PROTOBUF_CONSTEXPR EnumDescriptorProto::EnumDescriptorProto(
181     ::_pbi::ConstantInitialized): _impl_{
182     /*decltype(_impl_._has_bits_)*/{}
183   , /*decltype(_impl_._cached_size_)*/{}
184   , /*decltype(_impl_.value_)*/{}
185   , /*decltype(_impl_.reserved_name_)*/{}
186   , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}} {}
187 struct EnumDescriptorProtoDefaultTypeInternal {
EnumDescriptorProtoDefaultTypeInternalperfetto::protos::EnumDescriptorProtoDefaultTypeInternal188   PROTOBUF_CONSTEXPR EnumDescriptorProtoDefaultTypeInternal()
189       : _instance(::_pbi::ConstantInitialized{}) {}
~EnumDescriptorProtoDefaultTypeInternalperfetto::protos::EnumDescriptorProtoDefaultTypeInternal190   ~EnumDescriptorProtoDefaultTypeInternal() {}
191   union {  // NOLINT(misc-non-private-member-variables-in-classes)
192     EnumDescriptorProto _instance;
193   };
194 };
195 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EnumDescriptorProtoDefaultTypeInternal _EnumDescriptorProto_default_instance_;
EnumValueDescriptorProto(::_pbi::ConstantInitialized)196 PROTOBUF_CONSTEXPR EnumValueDescriptorProto::EnumValueDescriptorProto(
197     ::_pbi::ConstantInitialized): _impl_{
198     /*decltype(_impl_._has_bits_)*/{}
199   , /*decltype(_impl_._cached_size_)*/{}
200   , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
201   , /*decltype(_impl_.number_)*/0} {}
202 struct EnumValueDescriptorProtoDefaultTypeInternal {
EnumValueDescriptorProtoDefaultTypeInternalperfetto::protos::EnumValueDescriptorProtoDefaultTypeInternal203   PROTOBUF_CONSTEXPR EnumValueDescriptorProtoDefaultTypeInternal()
204       : _instance(::_pbi::ConstantInitialized{}) {}
~EnumValueDescriptorProtoDefaultTypeInternalperfetto::protos::EnumValueDescriptorProtoDefaultTypeInternal205   ~EnumValueDescriptorProtoDefaultTypeInternal() {}
206   union {  // NOLINT(misc-non-private-member-variables-in-classes)
207     EnumValueDescriptorProto _instance;
208   };
209 };
210 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EnumValueDescriptorProtoDefaultTypeInternal _EnumValueDescriptorProto_default_instance_;
OneofOptions(::_pbi::ConstantInitialized)211 PROTOBUF_CONSTEXPR OneofOptions::OneofOptions(
212     ::_pbi::ConstantInitialized): _impl_{
213     /*decltype(_impl_._extensions_)*/{}
214   , /*decltype(_impl_._cached_size_)*/{}} {}
215 struct OneofOptionsDefaultTypeInternal {
OneofOptionsDefaultTypeInternalperfetto::protos::OneofOptionsDefaultTypeInternal216   PROTOBUF_CONSTEXPR OneofOptionsDefaultTypeInternal()
217       : _instance(::_pbi::ConstantInitialized{}) {}
~OneofOptionsDefaultTypeInternalperfetto::protos::OneofOptionsDefaultTypeInternal218   ~OneofOptionsDefaultTypeInternal() {}
219   union {  // NOLINT(misc-non-private-member-variables-in-classes)
220     OneofOptions _instance;
221   };
222 };
223 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 OneofOptionsDefaultTypeInternal _OneofOptions_default_instance_;
224 }  // namespace protos
225 }  // namespace perfetto
226 namespace perfetto {
227 namespace protos {
FieldDescriptorProto_Type_IsValid(int value)228 bool FieldDescriptorProto_Type_IsValid(int value) {
229   switch (value) {
230     case 1:
231     case 2:
232     case 3:
233     case 4:
234     case 5:
235     case 6:
236     case 7:
237     case 8:
238     case 9:
239     case 10:
240     case 11:
241     case 12:
242     case 13:
243     case 14:
244     case 15:
245     case 16:
246     case 17:
247     case 18:
248       return true;
249     default:
250       return false;
251   }
252 }
253 
254 static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> FieldDescriptorProto_Type_strings[18] = {};
255 
256 static const char FieldDescriptorProto_Type_names[] =
257   "TYPE_BOOL"
258   "TYPE_BYTES"
259   "TYPE_DOUBLE"
260   "TYPE_ENUM"
261   "TYPE_FIXED32"
262   "TYPE_FIXED64"
263   "TYPE_FLOAT"
264   "TYPE_GROUP"
265   "TYPE_INT32"
266   "TYPE_INT64"
267   "TYPE_MESSAGE"
268   "TYPE_SFIXED32"
269   "TYPE_SFIXED64"
270   "TYPE_SINT32"
271   "TYPE_SINT64"
272   "TYPE_STRING"
273   "TYPE_UINT32"
274   "TYPE_UINT64";
275 
276 static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry FieldDescriptorProto_Type_entries[] = {
277   { {FieldDescriptorProto_Type_names + 0, 9}, 8 },
278   { {FieldDescriptorProto_Type_names + 9, 10}, 12 },
279   { {FieldDescriptorProto_Type_names + 19, 11}, 1 },
280   { {FieldDescriptorProto_Type_names + 30, 9}, 14 },
281   { {FieldDescriptorProto_Type_names + 39, 12}, 7 },
282   { {FieldDescriptorProto_Type_names + 51, 12}, 6 },
283   { {FieldDescriptorProto_Type_names + 63, 10}, 2 },
284   { {FieldDescriptorProto_Type_names + 73, 10}, 10 },
285   { {FieldDescriptorProto_Type_names + 83, 10}, 5 },
286   { {FieldDescriptorProto_Type_names + 93, 10}, 3 },
287   { {FieldDescriptorProto_Type_names + 103, 12}, 11 },
288   { {FieldDescriptorProto_Type_names + 115, 13}, 15 },
289   { {FieldDescriptorProto_Type_names + 128, 13}, 16 },
290   { {FieldDescriptorProto_Type_names + 141, 11}, 17 },
291   { {FieldDescriptorProto_Type_names + 152, 11}, 18 },
292   { {FieldDescriptorProto_Type_names + 163, 11}, 9 },
293   { {FieldDescriptorProto_Type_names + 174, 11}, 13 },
294   { {FieldDescriptorProto_Type_names + 185, 11}, 4 },
295 };
296 
297 static const int FieldDescriptorProto_Type_entries_by_number[] = {
298   2, // 1 -> TYPE_DOUBLE
299   6, // 2 -> TYPE_FLOAT
300   9, // 3 -> TYPE_INT64
301   17, // 4 -> TYPE_UINT64
302   8, // 5 -> TYPE_INT32
303   5, // 6 -> TYPE_FIXED64
304   4, // 7 -> TYPE_FIXED32
305   0, // 8 -> TYPE_BOOL
306   15, // 9 -> TYPE_STRING
307   7, // 10 -> TYPE_GROUP
308   10, // 11 -> TYPE_MESSAGE
309   1, // 12 -> TYPE_BYTES
310   16, // 13 -> TYPE_UINT32
311   3, // 14 -> TYPE_ENUM
312   11, // 15 -> TYPE_SFIXED32
313   12, // 16 -> TYPE_SFIXED64
314   13, // 17 -> TYPE_SINT32
315   14, // 18 -> TYPE_SINT64
316 };
317 
FieldDescriptorProto_Type_Name(FieldDescriptorProto_Type value)318 const std::string& FieldDescriptorProto_Type_Name(
319     FieldDescriptorProto_Type value) {
320   static const bool dummy =
321       ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
322           FieldDescriptorProto_Type_entries,
323           FieldDescriptorProto_Type_entries_by_number,
324           18, FieldDescriptorProto_Type_strings);
325   (void) dummy;
326   int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
327       FieldDescriptorProto_Type_entries,
328       FieldDescriptorProto_Type_entries_by_number,
329       18, value);
330   return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
331                      FieldDescriptorProto_Type_strings[idx].get();
332 }
FieldDescriptorProto_Type_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name,FieldDescriptorProto_Type * value)333 bool FieldDescriptorProto_Type_Parse(
334     ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, FieldDescriptorProto_Type* value) {
335   int int_value;
336   bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
337       FieldDescriptorProto_Type_entries, 18, name, &int_value);
338   if (success) {
339     *value = static_cast<FieldDescriptorProto_Type>(int_value);
340   }
341   return success;
342 }
343 #if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
344 constexpr FieldDescriptorProto_Type FieldDescriptorProto::TYPE_DOUBLE;
345 constexpr FieldDescriptorProto_Type FieldDescriptorProto::TYPE_FLOAT;
346 constexpr FieldDescriptorProto_Type FieldDescriptorProto::TYPE_INT64;
347 constexpr FieldDescriptorProto_Type FieldDescriptorProto::TYPE_UINT64;
348 constexpr FieldDescriptorProto_Type FieldDescriptorProto::TYPE_INT32;
349 constexpr FieldDescriptorProto_Type FieldDescriptorProto::TYPE_FIXED64;
350 constexpr FieldDescriptorProto_Type FieldDescriptorProto::TYPE_FIXED32;
351 constexpr FieldDescriptorProto_Type FieldDescriptorProto::TYPE_BOOL;
352 constexpr FieldDescriptorProto_Type FieldDescriptorProto::TYPE_STRING;
353 constexpr FieldDescriptorProto_Type FieldDescriptorProto::TYPE_GROUP;
354 constexpr FieldDescriptorProto_Type FieldDescriptorProto::TYPE_MESSAGE;
355 constexpr FieldDescriptorProto_Type FieldDescriptorProto::TYPE_BYTES;
356 constexpr FieldDescriptorProto_Type FieldDescriptorProto::TYPE_UINT32;
357 constexpr FieldDescriptorProto_Type FieldDescriptorProto::TYPE_ENUM;
358 constexpr FieldDescriptorProto_Type FieldDescriptorProto::TYPE_SFIXED32;
359 constexpr FieldDescriptorProto_Type FieldDescriptorProto::TYPE_SFIXED64;
360 constexpr FieldDescriptorProto_Type FieldDescriptorProto::TYPE_SINT32;
361 constexpr FieldDescriptorProto_Type FieldDescriptorProto::TYPE_SINT64;
362 constexpr FieldDescriptorProto_Type FieldDescriptorProto::Type_MIN;
363 constexpr FieldDescriptorProto_Type FieldDescriptorProto::Type_MAX;
364 constexpr int FieldDescriptorProto::Type_ARRAYSIZE;
365 #endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
FieldDescriptorProto_Label_IsValid(int value)366 bool FieldDescriptorProto_Label_IsValid(int value) {
367   switch (value) {
368     case 1:
369     case 2:
370     case 3:
371       return true;
372     default:
373       return false;
374   }
375 }
376 
377 static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> FieldDescriptorProto_Label_strings[3] = {};
378 
379 static const char FieldDescriptorProto_Label_names[] =
380   "LABEL_OPTIONAL"
381   "LABEL_REPEATED"
382   "LABEL_REQUIRED";
383 
384 static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry FieldDescriptorProto_Label_entries[] = {
385   { {FieldDescriptorProto_Label_names + 0, 14}, 1 },
386   { {FieldDescriptorProto_Label_names + 14, 14}, 3 },
387   { {FieldDescriptorProto_Label_names + 28, 14}, 2 },
388 };
389 
390 static const int FieldDescriptorProto_Label_entries_by_number[] = {
391   0, // 1 -> LABEL_OPTIONAL
392   2, // 2 -> LABEL_REQUIRED
393   1, // 3 -> LABEL_REPEATED
394 };
395 
FieldDescriptorProto_Label_Name(FieldDescriptorProto_Label value)396 const std::string& FieldDescriptorProto_Label_Name(
397     FieldDescriptorProto_Label value) {
398   static const bool dummy =
399       ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
400           FieldDescriptorProto_Label_entries,
401           FieldDescriptorProto_Label_entries_by_number,
402           3, FieldDescriptorProto_Label_strings);
403   (void) dummy;
404   int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
405       FieldDescriptorProto_Label_entries,
406       FieldDescriptorProto_Label_entries_by_number,
407       3, value);
408   return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
409                      FieldDescriptorProto_Label_strings[idx].get();
410 }
FieldDescriptorProto_Label_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name,FieldDescriptorProto_Label * value)411 bool FieldDescriptorProto_Label_Parse(
412     ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, FieldDescriptorProto_Label* value) {
413   int int_value;
414   bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
415       FieldDescriptorProto_Label_entries, 3, name, &int_value);
416   if (success) {
417     *value = static_cast<FieldDescriptorProto_Label>(int_value);
418   }
419   return success;
420 }
421 #if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
422 constexpr FieldDescriptorProto_Label FieldDescriptorProto::LABEL_OPTIONAL;
423 constexpr FieldDescriptorProto_Label FieldDescriptorProto::LABEL_REQUIRED;
424 constexpr FieldDescriptorProto_Label FieldDescriptorProto::LABEL_REPEATED;
425 constexpr FieldDescriptorProto_Label FieldDescriptorProto::Label_MIN;
426 constexpr FieldDescriptorProto_Label FieldDescriptorProto::Label_MAX;
427 constexpr int FieldDescriptorProto::Label_ARRAYSIZE;
428 #endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
429 
430 // ===================================================================
431 
432 class FileDescriptorSet::_Internal {
433  public:
434 };
435 
FileDescriptorSet(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)436 FileDescriptorSet::FileDescriptorSet(::PROTOBUF_NAMESPACE_ID::Arena* arena,
437                          bool is_message_owned)
438   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
439   SharedCtor(arena, is_message_owned);
440   // @@protoc_insertion_point(arena_constructor:perfetto.protos.FileDescriptorSet)
441 }
FileDescriptorSet(const FileDescriptorSet & from)442 FileDescriptorSet::FileDescriptorSet(const FileDescriptorSet& from)
443   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
444   FileDescriptorSet* const _this = this; (void)_this;
445   new (&_impl_) Impl_{
446       decltype(_impl_.file_){from._impl_.file_}
447     , /*decltype(_impl_._cached_size_)*/{}};
448 
449   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
450   // @@protoc_insertion_point(copy_constructor:perfetto.protos.FileDescriptorSet)
451 }
452 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)453 inline void FileDescriptorSet::SharedCtor(
454     ::_pb::Arena* arena, bool is_message_owned) {
455   (void)arena;
456   (void)is_message_owned;
457   new (&_impl_) Impl_{
458       decltype(_impl_.file_){arena}
459     , /*decltype(_impl_._cached_size_)*/{}
460   };
461 }
462 
~FileDescriptorSet()463 FileDescriptorSet::~FileDescriptorSet() {
464   // @@protoc_insertion_point(destructor:perfetto.protos.FileDescriptorSet)
465   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
466   (void)arena;
467     return;
468   }
469   SharedDtor();
470 }
471 
SharedDtor()472 inline void FileDescriptorSet::SharedDtor() {
473   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
474   _impl_.file_.~RepeatedPtrField();
475 }
476 
SetCachedSize(int size) const477 void FileDescriptorSet::SetCachedSize(int size) const {
478   _impl_._cached_size_.Set(size);
479 }
480 
Clear()481 void FileDescriptorSet::Clear() {
482 // @@protoc_insertion_point(message_clear_start:perfetto.protos.FileDescriptorSet)
483   ::uint32_t cached_has_bits = 0;
484   // Prevent compiler warnings about cached_has_bits being unused
485   (void) cached_has_bits;
486 
487   _impl_.file_.Clear();
488   _internal_metadata_.Clear<std::string>();
489 }
490 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)491 const char* FileDescriptorSet::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
492 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
493   while (!ctx->Done(&ptr)) {
494     ::uint32_t tag;
495     ptr = ::_pbi::ReadTag(ptr, &tag);
496     switch (tag >> 3) {
497       // repeated .perfetto.protos.FileDescriptorProto file = 1;
498       case 1:
499         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
500           ptr -= 1;
501           do {
502             ptr += 1;
503             ptr = ctx->ParseMessage(_internal_add_file(), ptr);
504             CHK_(ptr);
505             if (!ctx->DataAvailable(ptr)) break;
506           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
507         } else {
508           goto handle_unusual;
509         }
510         continue;
511       default:
512         goto handle_unusual;
513     }  // switch
514   handle_unusual:
515     if ((tag == 0) || ((tag & 7) == 4)) {
516       CHK_(ptr);
517       ctx->SetLastTag(tag);
518       goto message_done;
519     }
520     ptr = UnknownFieldParse(
521         tag,
522         _internal_metadata_.mutable_unknown_fields<std::string>(),
523         ptr, ctx);
524     CHK_(ptr != nullptr);
525   }  // while
526 message_done:
527   return ptr;
528 failure:
529   ptr = nullptr;
530   goto message_done;
531 #undef CHK_
532 }
533 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const534 ::uint8_t* FileDescriptorSet::_InternalSerialize(
535     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
536   // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.FileDescriptorSet)
537   ::uint32_t cached_has_bits = 0;
538   (void) cached_has_bits;
539 
540   // repeated .perfetto.protos.FileDescriptorProto file = 1;
541   for (unsigned i = 0,
542       n = static_cast<unsigned>(this->_internal_file_size()); i < n; i++) {
543     const auto& repfield = this->_internal_file(i);
544     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
545         InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream);
546   }
547 
548   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
549     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
550         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
551   }
552   // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.FileDescriptorSet)
553   return target;
554 }
555 
ByteSizeLong() const556 size_t FileDescriptorSet::ByteSizeLong() const {
557 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.FileDescriptorSet)
558   size_t total_size = 0;
559 
560   ::uint32_t cached_has_bits = 0;
561   // Prevent compiler warnings about cached_has_bits being unused
562   (void) cached_has_bits;
563 
564   // repeated .perfetto.protos.FileDescriptorProto file = 1;
565   total_size += 1UL * this->_internal_file_size();
566   for (const auto& msg : this->_impl_.file_) {
567     total_size +=
568       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
569   }
570 
571   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
572     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
573   }
574   int cached_size = ::_pbi::ToCachedSize(total_size);
575   SetCachedSize(cached_size);
576   return total_size;
577 }
578 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)579 void FileDescriptorSet::CheckTypeAndMergeFrom(
580     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
581   MergeFrom(*::_pbi::DownCast<const FileDescriptorSet*>(
582       &from));
583 }
584 
MergeFrom(const FileDescriptorSet & from)585 void FileDescriptorSet::MergeFrom(const FileDescriptorSet& from) {
586   FileDescriptorSet* const _this = this;
587   // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.FileDescriptorSet)
588   GOOGLE_DCHECK_NE(&from, _this);
589   ::uint32_t cached_has_bits = 0;
590   (void) cached_has_bits;
591 
592   _this->_impl_.file_.MergeFrom(from._impl_.file_);
593   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
594 }
595 
CopyFrom(const FileDescriptorSet & from)596 void FileDescriptorSet::CopyFrom(const FileDescriptorSet& from) {
597 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.FileDescriptorSet)
598   if (&from == this) return;
599   Clear();
600   MergeFrom(from);
601 }
602 
IsInitialized() const603 bool FileDescriptorSet::IsInitialized() const {
604   if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(_impl_.file_))
605     return false;
606   return true;
607 }
608 
InternalSwap(FileDescriptorSet * other)609 void FileDescriptorSet::InternalSwap(FileDescriptorSet* other) {
610   using std::swap;
611   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
612   _impl_.file_.InternalSwap(&other->_impl_.file_);
613 }
614 
GetTypeName() const615 std::string FileDescriptorSet::GetTypeName() const {
616   return "perfetto.protos.FileDescriptorSet";
617 }
618 
619 
620 // ===================================================================
621 
622 class FileDescriptorProto::_Internal {
623  public:
624   using HasBits = decltype(std::declval<FileDescriptorProto>()._impl_._has_bits_);
set_has_name(HasBits * has_bits)625   static void set_has_name(HasBits* has_bits) {
626     (*has_bits)[0] |= 1u;
627   }
set_has_package(HasBits * has_bits)628   static void set_has_package(HasBits* has_bits) {
629     (*has_bits)[0] |= 2u;
630   }
631 };
632 
FileDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)633 FileDescriptorProto::FileDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
634                          bool is_message_owned)
635   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
636   SharedCtor(arena, is_message_owned);
637   // @@protoc_insertion_point(arena_constructor:perfetto.protos.FileDescriptorProto)
638 }
FileDescriptorProto(const FileDescriptorProto & from)639 FileDescriptorProto::FileDescriptorProto(const FileDescriptorProto& from)
640   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
641   FileDescriptorProto* const _this = this; (void)_this;
642   new (&_impl_) Impl_{
643       decltype(_impl_._has_bits_){from._impl_._has_bits_}
644     , /*decltype(_impl_._cached_size_)*/{}
645     , decltype(_impl_.dependency_){from._impl_.dependency_}
646     , decltype(_impl_.message_type_){from._impl_.message_type_}
647     , decltype(_impl_.enum_type_){from._impl_.enum_type_}
648     , decltype(_impl_.extension_){from._impl_.extension_}
649     , decltype(_impl_.public_dependency_){from._impl_.public_dependency_}
650     , decltype(_impl_.weak_dependency_){from._impl_.weak_dependency_}
651     , decltype(_impl_.name_){}
652     , decltype(_impl_.package_){}};
653 
654   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
655   _impl_.name_.InitDefault();
656   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
657     _impl_.name_.Set("", GetArenaForAllocation());
658   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
659   if (from._internal_has_name()) {
660     _this->_impl_.name_.Set(from._internal_name(),
661       _this->GetArenaForAllocation());
662   }
663   _impl_.package_.InitDefault();
664   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
665     _impl_.package_.Set("", GetArenaForAllocation());
666   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
667   if (from._internal_has_package()) {
668     _this->_impl_.package_.Set(from._internal_package(),
669       _this->GetArenaForAllocation());
670   }
671   // @@protoc_insertion_point(copy_constructor:perfetto.protos.FileDescriptorProto)
672 }
673 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)674 inline void FileDescriptorProto::SharedCtor(
675     ::_pb::Arena* arena, bool is_message_owned) {
676   (void)arena;
677   (void)is_message_owned;
678   new (&_impl_) Impl_{
679       decltype(_impl_._has_bits_){}
680     , /*decltype(_impl_._cached_size_)*/{}
681     , decltype(_impl_.dependency_){arena}
682     , decltype(_impl_.message_type_){arena}
683     , decltype(_impl_.enum_type_){arena}
684     , decltype(_impl_.extension_){arena}
685     , decltype(_impl_.public_dependency_){arena}
686     , decltype(_impl_.weak_dependency_){arena}
687     , decltype(_impl_.name_){}
688     , decltype(_impl_.package_){}
689   };
690   _impl_.name_.InitDefault();
691   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
692     _impl_.name_.Set("", GetArenaForAllocation());
693   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
694   _impl_.package_.InitDefault();
695   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
696     _impl_.package_.Set("", GetArenaForAllocation());
697   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
698 }
699 
~FileDescriptorProto()700 FileDescriptorProto::~FileDescriptorProto() {
701   // @@protoc_insertion_point(destructor:perfetto.protos.FileDescriptorProto)
702   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
703   (void)arena;
704     return;
705   }
706   SharedDtor();
707 }
708 
SharedDtor()709 inline void FileDescriptorProto::SharedDtor() {
710   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
711   _impl_.dependency_.~RepeatedPtrField();
712   _impl_.message_type_.~RepeatedPtrField();
713   _impl_.enum_type_.~RepeatedPtrField();
714   _impl_.extension_.~RepeatedPtrField();
715   _impl_.public_dependency_.~RepeatedField();
716   _impl_.weak_dependency_.~RepeatedField();
717   _impl_.name_.Destroy();
718   _impl_.package_.Destroy();
719 }
720 
SetCachedSize(int size) const721 void FileDescriptorProto::SetCachedSize(int size) const {
722   _impl_._cached_size_.Set(size);
723 }
724 
Clear()725 void FileDescriptorProto::Clear() {
726 // @@protoc_insertion_point(message_clear_start:perfetto.protos.FileDescriptorProto)
727   ::uint32_t cached_has_bits = 0;
728   // Prevent compiler warnings about cached_has_bits being unused
729   (void) cached_has_bits;
730 
731   _impl_.dependency_.Clear();
732   _impl_.message_type_.Clear();
733   _impl_.enum_type_.Clear();
734   _impl_.extension_.Clear();
735   _impl_.public_dependency_.Clear();
736   _impl_.weak_dependency_.Clear();
737   cached_has_bits = _impl_._has_bits_[0];
738   if (cached_has_bits & 0x00000003u) {
739     if (cached_has_bits & 0x00000001u) {
740       _impl_.name_.ClearNonDefaultToEmpty();
741     }
742     if (cached_has_bits & 0x00000002u) {
743       _impl_.package_.ClearNonDefaultToEmpty();
744     }
745   }
746   _impl_._has_bits_.Clear();
747   _internal_metadata_.Clear<std::string>();
748 }
749 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)750 const char* FileDescriptorProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
751 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
752   _Internal::HasBits has_bits{};
753   while (!ctx->Done(&ptr)) {
754     ::uint32_t tag;
755     ptr = ::_pbi::ReadTag(ptr, &tag);
756     switch (tag >> 3) {
757       // optional string name = 1;
758       case 1:
759         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
760           auto str = _internal_mutable_name();
761           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
762           CHK_(ptr);
763         } else {
764           goto handle_unusual;
765         }
766         continue;
767       // optional string package = 2;
768       case 2:
769         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
770           auto str = _internal_mutable_package();
771           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
772           CHK_(ptr);
773         } else {
774           goto handle_unusual;
775         }
776         continue;
777       // repeated string dependency = 3;
778       case 3:
779         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
780           ptr -= 1;
781           do {
782             ptr += 1;
783             auto str = _internal_add_dependency();
784             ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
785             CHK_(ptr);
786             if (!ctx->DataAvailable(ptr)) break;
787           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
788         } else {
789           goto handle_unusual;
790         }
791         continue;
792       // repeated .perfetto.protos.DescriptorProto message_type = 4;
793       case 4:
794         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
795           ptr -= 1;
796           do {
797             ptr += 1;
798             ptr = ctx->ParseMessage(_internal_add_message_type(), ptr);
799             CHK_(ptr);
800             if (!ctx->DataAvailable(ptr)) break;
801           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr));
802         } else {
803           goto handle_unusual;
804         }
805         continue;
806       // repeated .perfetto.protos.EnumDescriptorProto enum_type = 5;
807       case 5:
808         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
809           ptr -= 1;
810           do {
811             ptr += 1;
812             ptr = ctx->ParseMessage(_internal_add_enum_type(), ptr);
813             CHK_(ptr);
814             if (!ctx->DataAvailable(ptr)) break;
815           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<42>(ptr));
816         } else {
817           goto handle_unusual;
818         }
819         continue;
820       // repeated .perfetto.protos.FieldDescriptorProto extension = 7;
821       case 7:
822         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 58)) {
823           ptr -= 1;
824           do {
825             ptr += 1;
826             ptr = ctx->ParseMessage(_internal_add_extension(), ptr);
827             CHK_(ptr);
828             if (!ctx->DataAvailable(ptr)) break;
829           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<58>(ptr));
830         } else {
831           goto handle_unusual;
832         }
833         continue;
834       // repeated int32 public_dependency = 10;
835       case 10:
836         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 80)) {
837           ptr -= 1;
838           do {
839             ptr += 1;
840             _internal_add_public_dependency(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
841             CHK_(ptr);
842             if (!ctx->DataAvailable(ptr)) break;
843           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<80>(ptr));
844         } else if (static_cast<::uint8_t>(tag) == 82) {
845           ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_public_dependency(), ptr, ctx);
846           CHK_(ptr);
847         } else {
848           goto handle_unusual;
849         }
850         continue;
851       // repeated int32 weak_dependency = 11;
852       case 11:
853         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 88)) {
854           ptr -= 1;
855           do {
856             ptr += 1;
857             _internal_add_weak_dependency(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
858             CHK_(ptr);
859             if (!ctx->DataAvailable(ptr)) break;
860           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<88>(ptr));
861         } else if (static_cast<::uint8_t>(tag) == 90) {
862           ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_weak_dependency(), ptr, ctx);
863           CHK_(ptr);
864         } else {
865           goto handle_unusual;
866         }
867         continue;
868       default:
869         goto handle_unusual;
870     }  // switch
871   handle_unusual:
872     if ((tag == 0) || ((tag & 7) == 4)) {
873       CHK_(ptr);
874       ctx->SetLastTag(tag);
875       goto message_done;
876     }
877     ptr = UnknownFieldParse(
878         tag,
879         _internal_metadata_.mutable_unknown_fields<std::string>(),
880         ptr, ctx);
881     CHK_(ptr != nullptr);
882   }  // while
883 message_done:
884   _impl_._has_bits_.Or(has_bits);
885   return ptr;
886 failure:
887   ptr = nullptr;
888   goto message_done;
889 #undef CHK_
890 }
891 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const892 ::uint8_t* FileDescriptorProto::_InternalSerialize(
893     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
894   // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.FileDescriptorProto)
895   ::uint32_t cached_has_bits = 0;
896   (void) cached_has_bits;
897 
898   cached_has_bits = _impl_._has_bits_[0];
899   // optional string name = 1;
900   if (cached_has_bits & 0x00000001u) {
901     target = stream->WriteStringMaybeAliased(
902         1, this->_internal_name(), target);
903   }
904 
905   // optional string package = 2;
906   if (cached_has_bits & 0x00000002u) {
907     target = stream->WriteStringMaybeAliased(
908         2, this->_internal_package(), target);
909   }
910 
911   // repeated string dependency = 3;
912   for (int i = 0, n = this->_internal_dependency_size(); i < n; i++) {
913     const auto& s = this->_internal_dependency(i);
914     target = stream->WriteString(3, s, target);
915   }
916 
917   // repeated .perfetto.protos.DescriptorProto message_type = 4;
918   for (unsigned i = 0,
919       n = static_cast<unsigned>(this->_internal_message_type_size()); i < n; i++) {
920     const auto& repfield = this->_internal_message_type(i);
921     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
922         InternalWriteMessage(4, repfield, repfield.GetCachedSize(), target, stream);
923   }
924 
925   // repeated .perfetto.protos.EnumDescriptorProto enum_type = 5;
926   for (unsigned i = 0,
927       n = static_cast<unsigned>(this->_internal_enum_type_size()); i < n; i++) {
928     const auto& repfield = this->_internal_enum_type(i);
929     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
930         InternalWriteMessage(5, repfield, repfield.GetCachedSize(), target, stream);
931   }
932 
933   // repeated .perfetto.protos.FieldDescriptorProto extension = 7;
934   for (unsigned i = 0,
935       n = static_cast<unsigned>(this->_internal_extension_size()); i < n; i++) {
936     const auto& repfield = this->_internal_extension(i);
937     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
938         InternalWriteMessage(7, repfield, repfield.GetCachedSize(), target, stream);
939   }
940 
941   // repeated int32 public_dependency = 10;
942   for (int i = 0, n = this->_internal_public_dependency_size(); i < n; i++) {
943     target = stream->EnsureSpace(target);
944     target = ::_pbi::WireFormatLite::WriteInt32ToArray(10, this->_internal_public_dependency(i), target);
945   }
946 
947   // repeated int32 weak_dependency = 11;
948   for (int i = 0, n = this->_internal_weak_dependency_size(); i < n; i++) {
949     target = stream->EnsureSpace(target);
950     target = ::_pbi::WireFormatLite::WriteInt32ToArray(11, this->_internal_weak_dependency(i), target);
951   }
952 
953   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
954     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
955         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
956   }
957   // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.FileDescriptorProto)
958   return target;
959 }
960 
ByteSizeLong() const961 size_t FileDescriptorProto::ByteSizeLong() const {
962 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.FileDescriptorProto)
963   size_t total_size = 0;
964 
965   ::uint32_t cached_has_bits = 0;
966   // Prevent compiler warnings about cached_has_bits being unused
967   (void) cached_has_bits;
968 
969   // repeated string dependency = 3;
970   total_size += 1 *
971       ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.dependency_.size());
972   for (int i = 0, n = _impl_.dependency_.size(); i < n; i++) {
973     total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
974       _impl_.dependency_.Get(i));
975   }
976 
977   // repeated .perfetto.protos.DescriptorProto message_type = 4;
978   total_size += 1UL * this->_internal_message_type_size();
979   for (const auto& msg : this->_impl_.message_type_) {
980     total_size +=
981       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
982   }
983 
984   // repeated .perfetto.protos.EnumDescriptorProto enum_type = 5;
985   total_size += 1UL * this->_internal_enum_type_size();
986   for (const auto& msg : this->_impl_.enum_type_) {
987     total_size +=
988       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
989   }
990 
991   // repeated .perfetto.protos.FieldDescriptorProto extension = 7;
992   total_size += 1UL * this->_internal_extension_size();
993   for (const auto& msg : this->_impl_.extension_) {
994     total_size +=
995       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
996   }
997 
998   // repeated int32 public_dependency = 10;
999   {
1000     size_t data_size = ::_pbi::WireFormatLite::
1001       Int32Size(this->_impl_.public_dependency_);
1002     total_size += 1 *
1003                   ::_pbi::FromIntSize(this->_internal_public_dependency_size());
1004     total_size += data_size;
1005   }
1006 
1007   // repeated int32 weak_dependency = 11;
1008   {
1009     size_t data_size = ::_pbi::WireFormatLite::
1010       Int32Size(this->_impl_.weak_dependency_);
1011     total_size += 1 *
1012                   ::_pbi::FromIntSize(this->_internal_weak_dependency_size());
1013     total_size += data_size;
1014   }
1015 
1016   cached_has_bits = _impl_._has_bits_[0];
1017   if (cached_has_bits & 0x00000003u) {
1018     // optional string name = 1;
1019     if (cached_has_bits & 0x00000001u) {
1020       total_size += 1 +
1021         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1022           this->_internal_name());
1023     }
1024 
1025     // optional string package = 2;
1026     if (cached_has_bits & 0x00000002u) {
1027       total_size += 1 +
1028         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1029           this->_internal_package());
1030     }
1031 
1032   }
1033   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1034     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1035   }
1036   int cached_size = ::_pbi::ToCachedSize(total_size);
1037   SetCachedSize(cached_size);
1038   return total_size;
1039 }
1040 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1041 void FileDescriptorProto::CheckTypeAndMergeFrom(
1042     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1043   MergeFrom(*::_pbi::DownCast<const FileDescriptorProto*>(
1044       &from));
1045 }
1046 
MergeFrom(const FileDescriptorProto & from)1047 void FileDescriptorProto::MergeFrom(const FileDescriptorProto& from) {
1048   FileDescriptorProto* const _this = this;
1049   // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.FileDescriptorProto)
1050   GOOGLE_DCHECK_NE(&from, _this);
1051   ::uint32_t cached_has_bits = 0;
1052   (void) cached_has_bits;
1053 
1054   _this->_impl_.dependency_.MergeFrom(from._impl_.dependency_);
1055   _this->_impl_.message_type_.MergeFrom(from._impl_.message_type_);
1056   _this->_impl_.enum_type_.MergeFrom(from._impl_.enum_type_);
1057   _this->_impl_.extension_.MergeFrom(from._impl_.extension_);
1058   _this->_impl_.public_dependency_.MergeFrom(from._impl_.public_dependency_);
1059   _this->_impl_.weak_dependency_.MergeFrom(from._impl_.weak_dependency_);
1060   cached_has_bits = from._impl_._has_bits_[0];
1061   if (cached_has_bits & 0x00000003u) {
1062     if (cached_has_bits & 0x00000001u) {
1063       _this->_internal_set_name(from._internal_name());
1064     }
1065     if (cached_has_bits & 0x00000002u) {
1066       _this->_internal_set_package(from._internal_package());
1067     }
1068   }
1069   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1070 }
1071 
CopyFrom(const FileDescriptorProto & from)1072 void FileDescriptorProto::CopyFrom(const FileDescriptorProto& from) {
1073 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.FileDescriptorProto)
1074   if (&from == this) return;
1075   Clear();
1076   MergeFrom(from);
1077 }
1078 
IsInitialized() const1079 bool FileDescriptorProto::IsInitialized() const {
1080   if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(_impl_.message_type_))
1081     return false;
1082   return true;
1083 }
1084 
InternalSwap(FileDescriptorProto * other)1085 void FileDescriptorProto::InternalSwap(FileDescriptorProto* other) {
1086   using std::swap;
1087   auto* lhs_arena = GetArenaForAllocation();
1088   auto* rhs_arena = other->GetArenaForAllocation();
1089   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1090   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1091   _impl_.dependency_.InternalSwap(&other->_impl_.dependency_);
1092   _impl_.message_type_.InternalSwap(&other->_impl_.message_type_);
1093   _impl_.enum_type_.InternalSwap(&other->_impl_.enum_type_);
1094   _impl_.extension_.InternalSwap(&other->_impl_.extension_);
1095   _impl_.public_dependency_.InternalSwap(&other->_impl_.public_dependency_);
1096   _impl_.weak_dependency_.InternalSwap(&other->_impl_.weak_dependency_);
1097   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
1098       &_impl_.name_, lhs_arena,
1099       &other->_impl_.name_, rhs_arena
1100   );
1101   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
1102       &_impl_.package_, lhs_arena,
1103       &other->_impl_.package_, rhs_arena
1104   );
1105 }
1106 
GetTypeName() const1107 std::string FileDescriptorProto::GetTypeName() const {
1108   return "perfetto.protos.FileDescriptorProto";
1109 }
1110 
1111 
1112 // ===================================================================
1113 
1114 class DescriptorProto_ReservedRange::_Internal {
1115  public:
1116   using HasBits = decltype(std::declval<DescriptorProto_ReservedRange>()._impl_._has_bits_);
set_has_start(HasBits * has_bits)1117   static void set_has_start(HasBits* has_bits) {
1118     (*has_bits)[0] |= 1u;
1119   }
set_has_end(HasBits * has_bits)1120   static void set_has_end(HasBits* has_bits) {
1121     (*has_bits)[0] |= 2u;
1122   }
1123 };
1124 
DescriptorProto_ReservedRange(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1125 DescriptorProto_ReservedRange::DescriptorProto_ReservedRange(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1126                          bool is_message_owned)
1127   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1128   SharedCtor(arena, is_message_owned);
1129   // @@protoc_insertion_point(arena_constructor:perfetto.protos.DescriptorProto.ReservedRange)
1130 }
DescriptorProto_ReservedRange(const DescriptorProto_ReservedRange & from)1131 DescriptorProto_ReservedRange::DescriptorProto_ReservedRange(const DescriptorProto_ReservedRange& from)
1132   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1133   DescriptorProto_ReservedRange* const _this = this; (void)_this;
1134   new (&_impl_) Impl_{
1135       decltype(_impl_._has_bits_){from._impl_._has_bits_}
1136     , /*decltype(_impl_._cached_size_)*/{}
1137     , decltype(_impl_.start_){}
1138     , decltype(_impl_.end_){}};
1139 
1140   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1141   ::memcpy(&_impl_.start_, &from._impl_.start_,
1142     static_cast<size_t>(reinterpret_cast<char*>(&_impl_.end_) -
1143     reinterpret_cast<char*>(&_impl_.start_)) + sizeof(_impl_.end_));
1144   // @@protoc_insertion_point(copy_constructor:perfetto.protos.DescriptorProto.ReservedRange)
1145 }
1146 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1147 inline void DescriptorProto_ReservedRange::SharedCtor(
1148     ::_pb::Arena* arena, bool is_message_owned) {
1149   (void)arena;
1150   (void)is_message_owned;
1151   new (&_impl_) Impl_{
1152       decltype(_impl_._has_bits_){}
1153     , /*decltype(_impl_._cached_size_)*/{}
1154     , decltype(_impl_.start_){0}
1155     , decltype(_impl_.end_){0}
1156   };
1157 }
1158 
~DescriptorProto_ReservedRange()1159 DescriptorProto_ReservedRange::~DescriptorProto_ReservedRange() {
1160   // @@protoc_insertion_point(destructor:perfetto.protos.DescriptorProto.ReservedRange)
1161   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1162   (void)arena;
1163     return;
1164   }
1165   SharedDtor();
1166 }
1167 
SharedDtor()1168 inline void DescriptorProto_ReservedRange::SharedDtor() {
1169   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1170 }
1171 
SetCachedSize(int size) const1172 void DescriptorProto_ReservedRange::SetCachedSize(int size) const {
1173   _impl_._cached_size_.Set(size);
1174 }
1175 
Clear()1176 void DescriptorProto_ReservedRange::Clear() {
1177 // @@protoc_insertion_point(message_clear_start:perfetto.protos.DescriptorProto.ReservedRange)
1178   ::uint32_t cached_has_bits = 0;
1179   // Prevent compiler warnings about cached_has_bits being unused
1180   (void) cached_has_bits;
1181 
1182   cached_has_bits = _impl_._has_bits_[0];
1183   if (cached_has_bits & 0x00000003u) {
1184     ::memset(&_impl_.start_, 0, static_cast<size_t>(
1185         reinterpret_cast<char*>(&_impl_.end_) -
1186         reinterpret_cast<char*>(&_impl_.start_)) + sizeof(_impl_.end_));
1187   }
1188   _impl_._has_bits_.Clear();
1189   _internal_metadata_.Clear<std::string>();
1190 }
1191 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1192 const char* DescriptorProto_ReservedRange::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1193 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1194   _Internal::HasBits has_bits{};
1195   while (!ctx->Done(&ptr)) {
1196     ::uint32_t tag;
1197     ptr = ::_pbi::ReadTag(ptr, &tag);
1198     switch (tag >> 3) {
1199       // optional int32 start = 1;
1200       case 1:
1201         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
1202           _Internal::set_has_start(&has_bits);
1203           _impl_.start_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1204           CHK_(ptr);
1205         } else {
1206           goto handle_unusual;
1207         }
1208         continue;
1209       // optional int32 end = 2;
1210       case 2:
1211         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
1212           _Internal::set_has_end(&has_bits);
1213           _impl_.end_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1214           CHK_(ptr);
1215         } else {
1216           goto handle_unusual;
1217         }
1218         continue;
1219       default:
1220         goto handle_unusual;
1221     }  // switch
1222   handle_unusual:
1223     if ((tag == 0) || ((tag & 7) == 4)) {
1224       CHK_(ptr);
1225       ctx->SetLastTag(tag);
1226       goto message_done;
1227     }
1228     ptr = UnknownFieldParse(
1229         tag,
1230         _internal_metadata_.mutable_unknown_fields<std::string>(),
1231         ptr, ctx);
1232     CHK_(ptr != nullptr);
1233   }  // while
1234 message_done:
1235   _impl_._has_bits_.Or(has_bits);
1236   return ptr;
1237 failure:
1238   ptr = nullptr;
1239   goto message_done;
1240 #undef CHK_
1241 }
1242 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1243 ::uint8_t* DescriptorProto_ReservedRange::_InternalSerialize(
1244     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1245   // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.DescriptorProto.ReservedRange)
1246   ::uint32_t cached_has_bits = 0;
1247   (void) cached_has_bits;
1248 
1249   cached_has_bits = _impl_._has_bits_[0];
1250   // optional int32 start = 1;
1251   if (cached_has_bits & 0x00000001u) {
1252     target = stream->EnsureSpace(target);
1253     target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_start(), target);
1254   }
1255 
1256   // optional int32 end = 2;
1257   if (cached_has_bits & 0x00000002u) {
1258     target = stream->EnsureSpace(target);
1259     target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_end(), target);
1260   }
1261 
1262   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1263     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1264         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1265   }
1266   // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.DescriptorProto.ReservedRange)
1267   return target;
1268 }
1269 
ByteSizeLong() const1270 size_t DescriptorProto_ReservedRange::ByteSizeLong() const {
1271 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.DescriptorProto.ReservedRange)
1272   size_t total_size = 0;
1273 
1274   ::uint32_t cached_has_bits = 0;
1275   // Prevent compiler warnings about cached_has_bits being unused
1276   (void) cached_has_bits;
1277 
1278   cached_has_bits = _impl_._has_bits_[0];
1279   if (cached_has_bits & 0x00000003u) {
1280     // optional int32 start = 1;
1281     if (cached_has_bits & 0x00000001u) {
1282       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_start());
1283     }
1284 
1285     // optional int32 end = 2;
1286     if (cached_has_bits & 0x00000002u) {
1287       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_end());
1288     }
1289 
1290   }
1291   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1292     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1293   }
1294   int cached_size = ::_pbi::ToCachedSize(total_size);
1295   SetCachedSize(cached_size);
1296   return total_size;
1297 }
1298 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1299 void DescriptorProto_ReservedRange::CheckTypeAndMergeFrom(
1300     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1301   MergeFrom(*::_pbi::DownCast<const DescriptorProto_ReservedRange*>(
1302       &from));
1303 }
1304 
MergeFrom(const DescriptorProto_ReservedRange & from)1305 void DescriptorProto_ReservedRange::MergeFrom(const DescriptorProto_ReservedRange& from) {
1306   DescriptorProto_ReservedRange* const _this = this;
1307   // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.DescriptorProto.ReservedRange)
1308   GOOGLE_DCHECK_NE(&from, _this);
1309   ::uint32_t cached_has_bits = 0;
1310   (void) cached_has_bits;
1311 
1312   cached_has_bits = from._impl_._has_bits_[0];
1313   if (cached_has_bits & 0x00000003u) {
1314     if (cached_has_bits & 0x00000001u) {
1315       _this->_impl_.start_ = from._impl_.start_;
1316     }
1317     if (cached_has_bits & 0x00000002u) {
1318       _this->_impl_.end_ = from._impl_.end_;
1319     }
1320     _this->_impl_._has_bits_[0] |= cached_has_bits;
1321   }
1322   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1323 }
1324 
CopyFrom(const DescriptorProto_ReservedRange & from)1325 void DescriptorProto_ReservedRange::CopyFrom(const DescriptorProto_ReservedRange& from) {
1326 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.DescriptorProto.ReservedRange)
1327   if (&from == this) return;
1328   Clear();
1329   MergeFrom(from);
1330 }
1331 
IsInitialized() const1332 bool DescriptorProto_ReservedRange::IsInitialized() const {
1333   return true;
1334 }
1335 
InternalSwap(DescriptorProto_ReservedRange * other)1336 void DescriptorProto_ReservedRange::InternalSwap(DescriptorProto_ReservedRange* other) {
1337   using std::swap;
1338   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1339   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1340   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
1341       PROTOBUF_FIELD_OFFSET(DescriptorProto_ReservedRange, _impl_.end_)
1342       + sizeof(DescriptorProto_ReservedRange::_impl_.end_)  // NOLINT
1343       - PROTOBUF_FIELD_OFFSET(DescriptorProto_ReservedRange, _impl_.start_)>(
1344           reinterpret_cast<char*>(&_impl_.start_),
1345           reinterpret_cast<char*>(&other->_impl_.start_));
1346 }
1347 
GetTypeName() const1348 std::string DescriptorProto_ReservedRange::GetTypeName() const {
1349   return "perfetto.protos.DescriptorProto.ReservedRange";
1350 }
1351 
1352 
1353 // ===================================================================
1354 
1355 class DescriptorProto::_Internal {
1356  public:
1357   using HasBits = decltype(std::declval<DescriptorProto>()._impl_._has_bits_);
set_has_name(HasBits * has_bits)1358   static void set_has_name(HasBits* has_bits) {
1359     (*has_bits)[0] |= 1u;
1360   }
1361 };
1362 
DescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1363 DescriptorProto::DescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1364                          bool is_message_owned)
1365   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1366   SharedCtor(arena, is_message_owned);
1367   // @@protoc_insertion_point(arena_constructor:perfetto.protos.DescriptorProto)
1368 }
DescriptorProto(const DescriptorProto & from)1369 DescriptorProto::DescriptorProto(const DescriptorProto& from)
1370   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1371   DescriptorProto* const _this = this; (void)_this;
1372   new (&_impl_) Impl_{
1373       decltype(_impl_._has_bits_){from._impl_._has_bits_}
1374     , /*decltype(_impl_._cached_size_)*/{}
1375     , decltype(_impl_.field_){from._impl_.field_}
1376     , decltype(_impl_.nested_type_){from._impl_.nested_type_}
1377     , decltype(_impl_.enum_type_){from._impl_.enum_type_}
1378     , decltype(_impl_.extension_){from._impl_.extension_}
1379     , decltype(_impl_.oneof_decl_){from._impl_.oneof_decl_}
1380     , decltype(_impl_.reserved_range_){from._impl_.reserved_range_}
1381     , decltype(_impl_.reserved_name_){from._impl_.reserved_name_}
1382     , decltype(_impl_.name_){}};
1383 
1384   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1385   _impl_.name_.InitDefault();
1386   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1387     _impl_.name_.Set("", GetArenaForAllocation());
1388   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1389   if (from._internal_has_name()) {
1390     _this->_impl_.name_.Set(from._internal_name(),
1391       _this->GetArenaForAllocation());
1392   }
1393   // @@protoc_insertion_point(copy_constructor:perfetto.protos.DescriptorProto)
1394 }
1395 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1396 inline void DescriptorProto::SharedCtor(
1397     ::_pb::Arena* arena, bool is_message_owned) {
1398   (void)arena;
1399   (void)is_message_owned;
1400   new (&_impl_) Impl_{
1401       decltype(_impl_._has_bits_){}
1402     , /*decltype(_impl_._cached_size_)*/{}
1403     , decltype(_impl_.field_){arena}
1404     , decltype(_impl_.nested_type_){arena}
1405     , decltype(_impl_.enum_type_){arena}
1406     , decltype(_impl_.extension_){arena}
1407     , decltype(_impl_.oneof_decl_){arena}
1408     , decltype(_impl_.reserved_range_){arena}
1409     , decltype(_impl_.reserved_name_){arena}
1410     , decltype(_impl_.name_){}
1411   };
1412   _impl_.name_.InitDefault();
1413   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1414     _impl_.name_.Set("", GetArenaForAllocation());
1415   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1416 }
1417 
~DescriptorProto()1418 DescriptorProto::~DescriptorProto() {
1419   // @@protoc_insertion_point(destructor:perfetto.protos.DescriptorProto)
1420   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1421   (void)arena;
1422     return;
1423   }
1424   SharedDtor();
1425 }
1426 
SharedDtor()1427 inline void DescriptorProto::SharedDtor() {
1428   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1429   _impl_.field_.~RepeatedPtrField();
1430   _impl_.nested_type_.~RepeatedPtrField();
1431   _impl_.enum_type_.~RepeatedPtrField();
1432   _impl_.extension_.~RepeatedPtrField();
1433   _impl_.oneof_decl_.~RepeatedPtrField();
1434   _impl_.reserved_range_.~RepeatedPtrField();
1435   _impl_.reserved_name_.~RepeatedPtrField();
1436   _impl_.name_.Destroy();
1437 }
1438 
SetCachedSize(int size) const1439 void DescriptorProto::SetCachedSize(int size) const {
1440   _impl_._cached_size_.Set(size);
1441 }
1442 
Clear()1443 void DescriptorProto::Clear() {
1444 // @@protoc_insertion_point(message_clear_start:perfetto.protos.DescriptorProto)
1445   ::uint32_t cached_has_bits = 0;
1446   // Prevent compiler warnings about cached_has_bits being unused
1447   (void) cached_has_bits;
1448 
1449   _impl_.field_.Clear();
1450   _impl_.nested_type_.Clear();
1451   _impl_.enum_type_.Clear();
1452   _impl_.extension_.Clear();
1453   _impl_.oneof_decl_.Clear();
1454   _impl_.reserved_range_.Clear();
1455   _impl_.reserved_name_.Clear();
1456   cached_has_bits = _impl_._has_bits_[0];
1457   if (cached_has_bits & 0x00000001u) {
1458     _impl_.name_.ClearNonDefaultToEmpty();
1459   }
1460   _impl_._has_bits_.Clear();
1461   _internal_metadata_.Clear<std::string>();
1462 }
1463 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1464 const char* DescriptorProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1465 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1466   _Internal::HasBits has_bits{};
1467   while (!ctx->Done(&ptr)) {
1468     ::uint32_t tag;
1469     ptr = ::_pbi::ReadTag(ptr, &tag);
1470     switch (tag >> 3) {
1471       // optional string name = 1;
1472       case 1:
1473         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
1474           auto str = _internal_mutable_name();
1475           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1476           CHK_(ptr);
1477         } else {
1478           goto handle_unusual;
1479         }
1480         continue;
1481       // repeated .perfetto.protos.FieldDescriptorProto field = 2;
1482       case 2:
1483         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
1484           ptr -= 1;
1485           do {
1486             ptr += 1;
1487             ptr = ctx->ParseMessage(_internal_add_field(), ptr);
1488             CHK_(ptr);
1489             if (!ctx->DataAvailable(ptr)) break;
1490           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
1491         } else {
1492           goto handle_unusual;
1493         }
1494         continue;
1495       // repeated .perfetto.protos.DescriptorProto nested_type = 3;
1496       case 3:
1497         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
1498           ptr -= 1;
1499           do {
1500             ptr += 1;
1501             ptr = ctx->ParseMessage(_internal_add_nested_type(), ptr);
1502             CHK_(ptr);
1503             if (!ctx->DataAvailable(ptr)) break;
1504           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
1505         } else {
1506           goto handle_unusual;
1507         }
1508         continue;
1509       // repeated .perfetto.protos.EnumDescriptorProto enum_type = 4;
1510       case 4:
1511         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
1512           ptr -= 1;
1513           do {
1514             ptr += 1;
1515             ptr = ctx->ParseMessage(_internal_add_enum_type(), ptr);
1516             CHK_(ptr);
1517             if (!ctx->DataAvailable(ptr)) break;
1518           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr));
1519         } else {
1520           goto handle_unusual;
1521         }
1522         continue;
1523       // repeated .perfetto.protos.FieldDescriptorProto extension = 6;
1524       case 6:
1525         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 50)) {
1526           ptr -= 1;
1527           do {
1528             ptr += 1;
1529             ptr = ctx->ParseMessage(_internal_add_extension(), ptr);
1530             CHK_(ptr);
1531             if (!ctx->DataAvailable(ptr)) break;
1532           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<50>(ptr));
1533         } else {
1534           goto handle_unusual;
1535         }
1536         continue;
1537       // repeated .perfetto.protos.OneofDescriptorProto oneof_decl = 8;
1538       case 8:
1539         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 66)) {
1540           ptr -= 1;
1541           do {
1542             ptr += 1;
1543             ptr = ctx->ParseMessage(_internal_add_oneof_decl(), ptr);
1544             CHK_(ptr);
1545             if (!ctx->DataAvailable(ptr)) break;
1546           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<66>(ptr));
1547         } else {
1548           goto handle_unusual;
1549         }
1550         continue;
1551       // repeated .perfetto.protos.DescriptorProto.ReservedRange reserved_range = 9;
1552       case 9:
1553         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 74)) {
1554           ptr -= 1;
1555           do {
1556             ptr += 1;
1557             ptr = ctx->ParseMessage(_internal_add_reserved_range(), ptr);
1558             CHK_(ptr);
1559             if (!ctx->DataAvailable(ptr)) break;
1560           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<74>(ptr));
1561         } else {
1562           goto handle_unusual;
1563         }
1564         continue;
1565       // repeated string reserved_name = 10;
1566       case 10:
1567         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 82)) {
1568           ptr -= 1;
1569           do {
1570             ptr += 1;
1571             auto str = _internal_add_reserved_name();
1572             ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1573             CHK_(ptr);
1574             if (!ctx->DataAvailable(ptr)) break;
1575           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<82>(ptr));
1576         } else {
1577           goto handle_unusual;
1578         }
1579         continue;
1580       default:
1581         goto handle_unusual;
1582     }  // switch
1583   handle_unusual:
1584     if ((tag == 0) || ((tag & 7) == 4)) {
1585       CHK_(ptr);
1586       ctx->SetLastTag(tag);
1587       goto message_done;
1588     }
1589     ptr = UnknownFieldParse(
1590         tag,
1591         _internal_metadata_.mutable_unknown_fields<std::string>(),
1592         ptr, ctx);
1593     CHK_(ptr != nullptr);
1594   }  // while
1595 message_done:
1596   _impl_._has_bits_.Or(has_bits);
1597   return ptr;
1598 failure:
1599   ptr = nullptr;
1600   goto message_done;
1601 #undef CHK_
1602 }
1603 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1604 ::uint8_t* DescriptorProto::_InternalSerialize(
1605     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1606   // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.DescriptorProto)
1607   ::uint32_t cached_has_bits = 0;
1608   (void) cached_has_bits;
1609 
1610   cached_has_bits = _impl_._has_bits_[0];
1611   // optional string name = 1;
1612   if (cached_has_bits & 0x00000001u) {
1613     target = stream->WriteStringMaybeAliased(
1614         1, this->_internal_name(), target);
1615   }
1616 
1617   // repeated .perfetto.protos.FieldDescriptorProto field = 2;
1618   for (unsigned i = 0,
1619       n = static_cast<unsigned>(this->_internal_field_size()); i < n; i++) {
1620     const auto& repfield = this->_internal_field(i);
1621     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1622         InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream);
1623   }
1624 
1625   // repeated .perfetto.protos.DescriptorProto nested_type = 3;
1626   for (unsigned i = 0,
1627       n = static_cast<unsigned>(this->_internal_nested_type_size()); i < n; i++) {
1628     const auto& repfield = this->_internal_nested_type(i);
1629     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1630         InternalWriteMessage(3, repfield, repfield.GetCachedSize(), target, stream);
1631   }
1632 
1633   // repeated .perfetto.protos.EnumDescriptorProto enum_type = 4;
1634   for (unsigned i = 0,
1635       n = static_cast<unsigned>(this->_internal_enum_type_size()); i < n; i++) {
1636     const auto& repfield = this->_internal_enum_type(i);
1637     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1638         InternalWriteMessage(4, repfield, repfield.GetCachedSize(), target, stream);
1639   }
1640 
1641   // repeated .perfetto.protos.FieldDescriptorProto extension = 6;
1642   for (unsigned i = 0,
1643       n = static_cast<unsigned>(this->_internal_extension_size()); i < n; i++) {
1644     const auto& repfield = this->_internal_extension(i);
1645     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1646         InternalWriteMessage(6, repfield, repfield.GetCachedSize(), target, stream);
1647   }
1648 
1649   // repeated .perfetto.protos.OneofDescriptorProto oneof_decl = 8;
1650   for (unsigned i = 0,
1651       n = static_cast<unsigned>(this->_internal_oneof_decl_size()); i < n; i++) {
1652     const auto& repfield = this->_internal_oneof_decl(i);
1653     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1654         InternalWriteMessage(8, repfield, repfield.GetCachedSize(), target, stream);
1655   }
1656 
1657   // repeated .perfetto.protos.DescriptorProto.ReservedRange reserved_range = 9;
1658   for (unsigned i = 0,
1659       n = static_cast<unsigned>(this->_internal_reserved_range_size()); i < n; i++) {
1660     const auto& repfield = this->_internal_reserved_range(i);
1661     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1662         InternalWriteMessage(9, repfield, repfield.GetCachedSize(), target, stream);
1663   }
1664 
1665   // repeated string reserved_name = 10;
1666   for (int i = 0, n = this->_internal_reserved_name_size(); i < n; i++) {
1667     const auto& s = this->_internal_reserved_name(i);
1668     target = stream->WriteString(10, s, target);
1669   }
1670 
1671   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1672     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1673         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1674   }
1675   // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.DescriptorProto)
1676   return target;
1677 }
1678 
ByteSizeLong() const1679 size_t DescriptorProto::ByteSizeLong() const {
1680 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.DescriptorProto)
1681   size_t total_size = 0;
1682 
1683   ::uint32_t cached_has_bits = 0;
1684   // Prevent compiler warnings about cached_has_bits being unused
1685   (void) cached_has_bits;
1686 
1687   // repeated .perfetto.protos.FieldDescriptorProto field = 2;
1688   total_size += 1UL * this->_internal_field_size();
1689   for (const auto& msg : this->_impl_.field_) {
1690     total_size +=
1691       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
1692   }
1693 
1694   // repeated .perfetto.protos.DescriptorProto nested_type = 3;
1695   total_size += 1UL * this->_internal_nested_type_size();
1696   for (const auto& msg : this->_impl_.nested_type_) {
1697     total_size +=
1698       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
1699   }
1700 
1701   // repeated .perfetto.protos.EnumDescriptorProto enum_type = 4;
1702   total_size += 1UL * this->_internal_enum_type_size();
1703   for (const auto& msg : this->_impl_.enum_type_) {
1704     total_size +=
1705       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
1706   }
1707 
1708   // repeated .perfetto.protos.FieldDescriptorProto extension = 6;
1709   total_size += 1UL * this->_internal_extension_size();
1710   for (const auto& msg : this->_impl_.extension_) {
1711     total_size +=
1712       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
1713   }
1714 
1715   // repeated .perfetto.protos.OneofDescriptorProto oneof_decl = 8;
1716   total_size += 1UL * this->_internal_oneof_decl_size();
1717   for (const auto& msg : this->_impl_.oneof_decl_) {
1718     total_size +=
1719       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
1720   }
1721 
1722   // repeated .perfetto.protos.DescriptorProto.ReservedRange reserved_range = 9;
1723   total_size += 1UL * this->_internal_reserved_range_size();
1724   for (const auto& msg : this->_impl_.reserved_range_) {
1725     total_size +=
1726       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
1727   }
1728 
1729   // repeated string reserved_name = 10;
1730   total_size += 1 *
1731       ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.reserved_name_.size());
1732   for (int i = 0, n = _impl_.reserved_name_.size(); i < n; i++) {
1733     total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1734       _impl_.reserved_name_.Get(i));
1735   }
1736 
1737   // optional string name = 1;
1738   cached_has_bits = _impl_._has_bits_[0];
1739   if (cached_has_bits & 0x00000001u) {
1740     total_size += 1 +
1741       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1742         this->_internal_name());
1743   }
1744 
1745   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1746     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1747   }
1748   int cached_size = ::_pbi::ToCachedSize(total_size);
1749   SetCachedSize(cached_size);
1750   return total_size;
1751 }
1752 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1753 void DescriptorProto::CheckTypeAndMergeFrom(
1754     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1755   MergeFrom(*::_pbi::DownCast<const DescriptorProto*>(
1756       &from));
1757 }
1758 
MergeFrom(const DescriptorProto & from)1759 void DescriptorProto::MergeFrom(const DescriptorProto& from) {
1760   DescriptorProto* const _this = this;
1761   // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.DescriptorProto)
1762   GOOGLE_DCHECK_NE(&from, _this);
1763   ::uint32_t cached_has_bits = 0;
1764   (void) cached_has_bits;
1765 
1766   _this->_impl_.field_.MergeFrom(from._impl_.field_);
1767   _this->_impl_.nested_type_.MergeFrom(from._impl_.nested_type_);
1768   _this->_impl_.enum_type_.MergeFrom(from._impl_.enum_type_);
1769   _this->_impl_.extension_.MergeFrom(from._impl_.extension_);
1770   _this->_impl_.oneof_decl_.MergeFrom(from._impl_.oneof_decl_);
1771   _this->_impl_.reserved_range_.MergeFrom(from._impl_.reserved_range_);
1772   _this->_impl_.reserved_name_.MergeFrom(from._impl_.reserved_name_);
1773   if (from._internal_has_name()) {
1774     _this->_internal_set_name(from._internal_name());
1775   }
1776   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1777 }
1778 
CopyFrom(const DescriptorProto & from)1779 void DescriptorProto::CopyFrom(const DescriptorProto& from) {
1780 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.DescriptorProto)
1781   if (&from == this) return;
1782   Clear();
1783   MergeFrom(from);
1784 }
1785 
IsInitialized() const1786 bool DescriptorProto::IsInitialized() const {
1787   if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(_impl_.nested_type_))
1788     return false;
1789   if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(_impl_.oneof_decl_))
1790     return false;
1791   return true;
1792 }
1793 
InternalSwap(DescriptorProto * other)1794 void DescriptorProto::InternalSwap(DescriptorProto* other) {
1795   using std::swap;
1796   auto* lhs_arena = GetArenaForAllocation();
1797   auto* rhs_arena = other->GetArenaForAllocation();
1798   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1799   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1800   _impl_.field_.InternalSwap(&other->_impl_.field_);
1801   _impl_.nested_type_.InternalSwap(&other->_impl_.nested_type_);
1802   _impl_.enum_type_.InternalSwap(&other->_impl_.enum_type_);
1803   _impl_.extension_.InternalSwap(&other->_impl_.extension_);
1804   _impl_.oneof_decl_.InternalSwap(&other->_impl_.oneof_decl_);
1805   _impl_.reserved_range_.InternalSwap(&other->_impl_.reserved_range_);
1806   _impl_.reserved_name_.InternalSwap(&other->_impl_.reserved_name_);
1807   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
1808       &_impl_.name_, lhs_arena,
1809       &other->_impl_.name_, rhs_arena
1810   );
1811 }
1812 
GetTypeName() const1813 std::string DescriptorProto::GetTypeName() const {
1814   return "perfetto.protos.DescriptorProto";
1815 }
1816 
1817 
1818 // ===================================================================
1819 
1820 class UninterpretedOption_NamePart::_Internal {
1821  public:
1822   using HasBits = decltype(std::declval<UninterpretedOption_NamePart>()._impl_._has_bits_);
set_has_name_part(HasBits * has_bits)1823   static void set_has_name_part(HasBits* has_bits) {
1824     (*has_bits)[0] |= 1u;
1825   }
set_has_is_extension(HasBits * has_bits)1826   static void set_has_is_extension(HasBits* has_bits) {
1827     (*has_bits)[0] |= 2u;
1828   }
1829 };
1830 
UninterpretedOption_NamePart(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1831 UninterpretedOption_NamePart::UninterpretedOption_NamePart(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1832                          bool is_message_owned)
1833   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1834   SharedCtor(arena, is_message_owned);
1835   // @@protoc_insertion_point(arena_constructor:perfetto.protos.UninterpretedOption.NamePart)
1836 }
UninterpretedOption_NamePart(const UninterpretedOption_NamePart & from)1837 UninterpretedOption_NamePart::UninterpretedOption_NamePart(const UninterpretedOption_NamePart& from)
1838   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1839   UninterpretedOption_NamePart* const _this = this; (void)_this;
1840   new (&_impl_) Impl_{
1841       decltype(_impl_._has_bits_){from._impl_._has_bits_}
1842     , /*decltype(_impl_._cached_size_)*/{}
1843     , decltype(_impl_.name_part_){}
1844     , decltype(_impl_.is_extension_){}};
1845 
1846   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1847   _impl_.name_part_.InitDefault();
1848   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1849     _impl_.name_part_.Set("", GetArenaForAllocation());
1850   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1851   if (from._internal_has_name_part()) {
1852     _this->_impl_.name_part_.Set(from._internal_name_part(),
1853       _this->GetArenaForAllocation());
1854   }
1855   _this->_impl_.is_extension_ = from._impl_.is_extension_;
1856   // @@protoc_insertion_point(copy_constructor:perfetto.protos.UninterpretedOption.NamePart)
1857 }
1858 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1859 inline void UninterpretedOption_NamePart::SharedCtor(
1860     ::_pb::Arena* arena, bool is_message_owned) {
1861   (void)arena;
1862   (void)is_message_owned;
1863   new (&_impl_) Impl_{
1864       decltype(_impl_._has_bits_){}
1865     , /*decltype(_impl_._cached_size_)*/{}
1866     , decltype(_impl_.name_part_){}
1867     , decltype(_impl_.is_extension_){false}
1868   };
1869   _impl_.name_part_.InitDefault();
1870   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1871     _impl_.name_part_.Set("", GetArenaForAllocation());
1872   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1873 }
1874 
~UninterpretedOption_NamePart()1875 UninterpretedOption_NamePart::~UninterpretedOption_NamePart() {
1876   // @@protoc_insertion_point(destructor:perfetto.protos.UninterpretedOption.NamePart)
1877   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1878   (void)arena;
1879     return;
1880   }
1881   SharedDtor();
1882 }
1883 
SharedDtor()1884 inline void UninterpretedOption_NamePart::SharedDtor() {
1885   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1886   _impl_.name_part_.Destroy();
1887 }
1888 
SetCachedSize(int size) const1889 void UninterpretedOption_NamePart::SetCachedSize(int size) const {
1890   _impl_._cached_size_.Set(size);
1891 }
1892 
Clear()1893 void UninterpretedOption_NamePart::Clear() {
1894 // @@protoc_insertion_point(message_clear_start:perfetto.protos.UninterpretedOption.NamePart)
1895   ::uint32_t cached_has_bits = 0;
1896   // Prevent compiler warnings about cached_has_bits being unused
1897   (void) cached_has_bits;
1898 
1899   cached_has_bits = _impl_._has_bits_[0];
1900   if (cached_has_bits & 0x00000001u) {
1901     _impl_.name_part_.ClearNonDefaultToEmpty();
1902   }
1903   _impl_.is_extension_ = false;
1904   _impl_._has_bits_.Clear();
1905   _internal_metadata_.Clear<std::string>();
1906 }
1907 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1908 const char* UninterpretedOption_NamePart::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1909 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1910   _Internal::HasBits has_bits{};
1911   while (!ctx->Done(&ptr)) {
1912     ::uint32_t tag;
1913     ptr = ::_pbi::ReadTag(ptr, &tag);
1914     switch (tag >> 3) {
1915       // optional string name_part = 1;
1916       case 1:
1917         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
1918           auto str = _internal_mutable_name_part();
1919           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1920           CHK_(ptr);
1921         } else {
1922           goto handle_unusual;
1923         }
1924         continue;
1925       // optional bool is_extension = 2;
1926       case 2:
1927         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
1928           _Internal::set_has_is_extension(&has_bits);
1929           _impl_.is_extension_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1930           CHK_(ptr);
1931         } else {
1932           goto handle_unusual;
1933         }
1934         continue;
1935       default:
1936         goto handle_unusual;
1937     }  // switch
1938   handle_unusual:
1939     if ((tag == 0) || ((tag & 7) == 4)) {
1940       CHK_(ptr);
1941       ctx->SetLastTag(tag);
1942       goto message_done;
1943     }
1944     ptr = UnknownFieldParse(
1945         tag,
1946         _internal_metadata_.mutable_unknown_fields<std::string>(),
1947         ptr, ctx);
1948     CHK_(ptr != nullptr);
1949   }  // while
1950 message_done:
1951   _impl_._has_bits_.Or(has_bits);
1952   return ptr;
1953 failure:
1954   ptr = nullptr;
1955   goto message_done;
1956 #undef CHK_
1957 }
1958 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1959 ::uint8_t* UninterpretedOption_NamePart::_InternalSerialize(
1960     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1961   // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.UninterpretedOption.NamePart)
1962   ::uint32_t cached_has_bits = 0;
1963   (void) cached_has_bits;
1964 
1965   cached_has_bits = _impl_._has_bits_[0];
1966   // optional string name_part = 1;
1967   if (cached_has_bits & 0x00000001u) {
1968     target = stream->WriteStringMaybeAliased(
1969         1, this->_internal_name_part(), target);
1970   }
1971 
1972   // optional bool is_extension = 2;
1973   if (cached_has_bits & 0x00000002u) {
1974     target = stream->EnsureSpace(target);
1975     target = ::_pbi::WireFormatLite::WriteBoolToArray(2, this->_internal_is_extension(), target);
1976   }
1977 
1978   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1979     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1980         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1981   }
1982   // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.UninterpretedOption.NamePart)
1983   return target;
1984 }
1985 
ByteSizeLong() const1986 size_t UninterpretedOption_NamePart::ByteSizeLong() const {
1987 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.UninterpretedOption.NamePart)
1988   size_t total_size = 0;
1989 
1990   ::uint32_t cached_has_bits = 0;
1991   // Prevent compiler warnings about cached_has_bits being unused
1992   (void) cached_has_bits;
1993 
1994   cached_has_bits = _impl_._has_bits_[0];
1995   if (cached_has_bits & 0x00000003u) {
1996     // optional string name_part = 1;
1997     if (cached_has_bits & 0x00000001u) {
1998       total_size += 1 +
1999         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
2000           this->_internal_name_part());
2001     }
2002 
2003     // optional bool is_extension = 2;
2004     if (cached_has_bits & 0x00000002u) {
2005       total_size += 1 + 1;
2006     }
2007 
2008   }
2009   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2010     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
2011   }
2012   int cached_size = ::_pbi::ToCachedSize(total_size);
2013   SetCachedSize(cached_size);
2014   return total_size;
2015 }
2016 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)2017 void UninterpretedOption_NamePart::CheckTypeAndMergeFrom(
2018     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
2019   MergeFrom(*::_pbi::DownCast<const UninterpretedOption_NamePart*>(
2020       &from));
2021 }
2022 
MergeFrom(const UninterpretedOption_NamePart & from)2023 void UninterpretedOption_NamePart::MergeFrom(const UninterpretedOption_NamePart& from) {
2024   UninterpretedOption_NamePart* const _this = this;
2025   // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.UninterpretedOption.NamePart)
2026   GOOGLE_DCHECK_NE(&from, _this);
2027   ::uint32_t cached_has_bits = 0;
2028   (void) cached_has_bits;
2029 
2030   cached_has_bits = from._impl_._has_bits_[0];
2031   if (cached_has_bits & 0x00000003u) {
2032     if (cached_has_bits & 0x00000001u) {
2033       _this->_internal_set_name_part(from._internal_name_part());
2034     }
2035     if (cached_has_bits & 0x00000002u) {
2036       _this->_impl_.is_extension_ = from._impl_.is_extension_;
2037     }
2038     _this->_impl_._has_bits_[0] |= cached_has_bits;
2039   }
2040   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2041 }
2042 
CopyFrom(const UninterpretedOption_NamePart & from)2043 void UninterpretedOption_NamePart::CopyFrom(const UninterpretedOption_NamePart& from) {
2044 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.UninterpretedOption.NamePart)
2045   if (&from == this) return;
2046   Clear();
2047   MergeFrom(from);
2048 }
2049 
IsInitialized() const2050 bool UninterpretedOption_NamePart::IsInitialized() const {
2051   return true;
2052 }
2053 
InternalSwap(UninterpretedOption_NamePart * other)2054 void UninterpretedOption_NamePart::InternalSwap(UninterpretedOption_NamePart* other) {
2055   using std::swap;
2056   auto* lhs_arena = GetArenaForAllocation();
2057   auto* rhs_arena = other->GetArenaForAllocation();
2058   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
2059   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
2060   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
2061       &_impl_.name_part_, lhs_arena,
2062       &other->_impl_.name_part_, rhs_arena
2063   );
2064   swap(_impl_.is_extension_, other->_impl_.is_extension_);
2065 }
2066 
GetTypeName() const2067 std::string UninterpretedOption_NamePart::GetTypeName() const {
2068   return "perfetto.protos.UninterpretedOption.NamePart";
2069 }
2070 
2071 
2072 // ===================================================================
2073 
2074 class UninterpretedOption::_Internal {
2075  public:
2076   using HasBits = decltype(std::declval<UninterpretedOption>()._impl_._has_bits_);
set_has_identifier_value(HasBits * has_bits)2077   static void set_has_identifier_value(HasBits* has_bits) {
2078     (*has_bits)[0] |= 1u;
2079   }
set_has_positive_int_value(HasBits * has_bits)2080   static void set_has_positive_int_value(HasBits* has_bits) {
2081     (*has_bits)[0] |= 8u;
2082   }
set_has_negative_int_value(HasBits * has_bits)2083   static void set_has_negative_int_value(HasBits* has_bits) {
2084     (*has_bits)[0] |= 16u;
2085   }
set_has_double_value(HasBits * has_bits)2086   static void set_has_double_value(HasBits* has_bits) {
2087     (*has_bits)[0] |= 32u;
2088   }
set_has_string_value(HasBits * has_bits)2089   static void set_has_string_value(HasBits* has_bits) {
2090     (*has_bits)[0] |= 2u;
2091   }
set_has_aggregate_value(HasBits * has_bits)2092   static void set_has_aggregate_value(HasBits* has_bits) {
2093     (*has_bits)[0] |= 4u;
2094   }
2095 };
2096 
UninterpretedOption(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)2097 UninterpretedOption::UninterpretedOption(::PROTOBUF_NAMESPACE_ID::Arena* arena,
2098                          bool is_message_owned)
2099   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
2100   SharedCtor(arena, is_message_owned);
2101   // @@protoc_insertion_point(arena_constructor:perfetto.protos.UninterpretedOption)
2102 }
UninterpretedOption(const UninterpretedOption & from)2103 UninterpretedOption::UninterpretedOption(const UninterpretedOption& from)
2104   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
2105   UninterpretedOption* const _this = this; (void)_this;
2106   new (&_impl_) Impl_{
2107       decltype(_impl_._has_bits_){from._impl_._has_bits_}
2108     , /*decltype(_impl_._cached_size_)*/{}
2109     , decltype(_impl_.name_){from._impl_.name_}
2110     , decltype(_impl_.identifier_value_){}
2111     , decltype(_impl_.string_value_){}
2112     , decltype(_impl_.aggregate_value_){}
2113     , decltype(_impl_.positive_int_value_){}
2114     , decltype(_impl_.negative_int_value_){}
2115     , decltype(_impl_.double_value_){}};
2116 
2117   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2118   _impl_.identifier_value_.InitDefault();
2119   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2120     _impl_.identifier_value_.Set("", GetArenaForAllocation());
2121   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2122   if (from._internal_has_identifier_value()) {
2123     _this->_impl_.identifier_value_.Set(from._internal_identifier_value(),
2124       _this->GetArenaForAllocation());
2125   }
2126   _impl_.string_value_.InitDefault();
2127   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2128     _impl_.string_value_.Set("", GetArenaForAllocation());
2129   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2130   if (from._internal_has_string_value()) {
2131     _this->_impl_.string_value_.Set(from._internal_string_value(),
2132       _this->GetArenaForAllocation());
2133   }
2134   _impl_.aggregate_value_.InitDefault();
2135   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2136     _impl_.aggregate_value_.Set("", GetArenaForAllocation());
2137   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2138   if (from._internal_has_aggregate_value()) {
2139     _this->_impl_.aggregate_value_.Set(from._internal_aggregate_value(),
2140       _this->GetArenaForAllocation());
2141   }
2142   ::memcpy(&_impl_.positive_int_value_, &from._impl_.positive_int_value_,
2143     static_cast<size_t>(reinterpret_cast<char*>(&_impl_.double_value_) -
2144     reinterpret_cast<char*>(&_impl_.positive_int_value_)) + sizeof(_impl_.double_value_));
2145   // @@protoc_insertion_point(copy_constructor:perfetto.protos.UninterpretedOption)
2146 }
2147 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)2148 inline void UninterpretedOption::SharedCtor(
2149     ::_pb::Arena* arena, bool is_message_owned) {
2150   (void)arena;
2151   (void)is_message_owned;
2152   new (&_impl_) Impl_{
2153       decltype(_impl_._has_bits_){}
2154     , /*decltype(_impl_._cached_size_)*/{}
2155     , decltype(_impl_.name_){arena}
2156     , decltype(_impl_.identifier_value_){}
2157     , decltype(_impl_.string_value_){}
2158     , decltype(_impl_.aggregate_value_){}
2159     , decltype(_impl_.positive_int_value_){::uint64_t{0u}}
2160     , decltype(_impl_.negative_int_value_){::int64_t{0}}
2161     , decltype(_impl_.double_value_){0}
2162   };
2163   _impl_.identifier_value_.InitDefault();
2164   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2165     _impl_.identifier_value_.Set("", GetArenaForAllocation());
2166   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2167   _impl_.string_value_.InitDefault();
2168   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2169     _impl_.string_value_.Set("", GetArenaForAllocation());
2170   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2171   _impl_.aggregate_value_.InitDefault();
2172   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2173     _impl_.aggregate_value_.Set("", GetArenaForAllocation());
2174   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2175 }
2176 
~UninterpretedOption()2177 UninterpretedOption::~UninterpretedOption() {
2178   // @@protoc_insertion_point(destructor:perfetto.protos.UninterpretedOption)
2179   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
2180   (void)arena;
2181     return;
2182   }
2183   SharedDtor();
2184 }
2185 
SharedDtor()2186 inline void UninterpretedOption::SharedDtor() {
2187   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
2188   _impl_.name_.~RepeatedPtrField();
2189   _impl_.identifier_value_.Destroy();
2190   _impl_.string_value_.Destroy();
2191   _impl_.aggregate_value_.Destroy();
2192 }
2193 
SetCachedSize(int size) const2194 void UninterpretedOption::SetCachedSize(int size) const {
2195   _impl_._cached_size_.Set(size);
2196 }
2197 
Clear()2198 void UninterpretedOption::Clear() {
2199 // @@protoc_insertion_point(message_clear_start:perfetto.protos.UninterpretedOption)
2200   ::uint32_t cached_has_bits = 0;
2201   // Prevent compiler warnings about cached_has_bits being unused
2202   (void) cached_has_bits;
2203 
2204   _impl_.name_.Clear();
2205   cached_has_bits = _impl_._has_bits_[0];
2206   if (cached_has_bits & 0x00000007u) {
2207     if (cached_has_bits & 0x00000001u) {
2208       _impl_.identifier_value_.ClearNonDefaultToEmpty();
2209     }
2210     if (cached_has_bits & 0x00000002u) {
2211       _impl_.string_value_.ClearNonDefaultToEmpty();
2212     }
2213     if (cached_has_bits & 0x00000004u) {
2214       _impl_.aggregate_value_.ClearNonDefaultToEmpty();
2215     }
2216   }
2217   if (cached_has_bits & 0x00000038u) {
2218     ::memset(&_impl_.positive_int_value_, 0, static_cast<size_t>(
2219         reinterpret_cast<char*>(&_impl_.double_value_) -
2220         reinterpret_cast<char*>(&_impl_.positive_int_value_)) + sizeof(_impl_.double_value_));
2221   }
2222   _impl_._has_bits_.Clear();
2223   _internal_metadata_.Clear<std::string>();
2224 }
2225 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)2226 const char* UninterpretedOption::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
2227 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
2228   _Internal::HasBits has_bits{};
2229   while (!ctx->Done(&ptr)) {
2230     ::uint32_t tag;
2231     ptr = ::_pbi::ReadTag(ptr, &tag);
2232     switch (tag >> 3) {
2233       // repeated .perfetto.protos.UninterpretedOption.NamePart name = 2;
2234       case 2:
2235         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
2236           ptr -= 1;
2237           do {
2238             ptr += 1;
2239             ptr = ctx->ParseMessage(_internal_add_name(), ptr);
2240             CHK_(ptr);
2241             if (!ctx->DataAvailable(ptr)) break;
2242           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
2243         } else {
2244           goto handle_unusual;
2245         }
2246         continue;
2247       // optional string identifier_value = 3;
2248       case 3:
2249         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
2250           auto str = _internal_mutable_identifier_value();
2251           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
2252           CHK_(ptr);
2253         } else {
2254           goto handle_unusual;
2255         }
2256         continue;
2257       // optional uint64 positive_int_value = 4;
2258       case 4:
2259         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
2260           _Internal::set_has_positive_int_value(&has_bits);
2261           _impl_.positive_int_value_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2262           CHK_(ptr);
2263         } else {
2264           goto handle_unusual;
2265         }
2266         continue;
2267       // optional int64 negative_int_value = 5;
2268       case 5:
2269         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
2270           _Internal::set_has_negative_int_value(&has_bits);
2271           _impl_.negative_int_value_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2272           CHK_(ptr);
2273         } else {
2274           goto handle_unusual;
2275         }
2276         continue;
2277       // optional double double_value = 6;
2278       case 6:
2279         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 49)) {
2280           _Internal::set_has_double_value(&has_bits);
2281           _impl_.double_value_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
2282           ptr += sizeof(double);
2283         } else {
2284           goto handle_unusual;
2285         }
2286         continue;
2287       // optional bytes string_value = 7;
2288       case 7:
2289         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 58)) {
2290           auto str = _internal_mutable_string_value();
2291           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
2292           CHK_(ptr);
2293         } else {
2294           goto handle_unusual;
2295         }
2296         continue;
2297       // optional string aggregate_value = 8;
2298       case 8:
2299         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 66)) {
2300           auto str = _internal_mutable_aggregate_value();
2301           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
2302           CHK_(ptr);
2303         } else {
2304           goto handle_unusual;
2305         }
2306         continue;
2307       default:
2308         goto handle_unusual;
2309     }  // switch
2310   handle_unusual:
2311     if ((tag == 0) || ((tag & 7) == 4)) {
2312       CHK_(ptr);
2313       ctx->SetLastTag(tag);
2314       goto message_done;
2315     }
2316     ptr = UnknownFieldParse(
2317         tag,
2318         _internal_metadata_.mutable_unknown_fields<std::string>(),
2319         ptr, ctx);
2320     CHK_(ptr != nullptr);
2321   }  // while
2322 message_done:
2323   _impl_._has_bits_.Or(has_bits);
2324   return ptr;
2325 failure:
2326   ptr = nullptr;
2327   goto message_done;
2328 #undef CHK_
2329 }
2330 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const2331 ::uint8_t* UninterpretedOption::_InternalSerialize(
2332     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
2333   // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.UninterpretedOption)
2334   ::uint32_t cached_has_bits = 0;
2335   (void) cached_has_bits;
2336 
2337   // repeated .perfetto.protos.UninterpretedOption.NamePart name = 2;
2338   for (unsigned i = 0,
2339       n = static_cast<unsigned>(this->_internal_name_size()); i < n; i++) {
2340     const auto& repfield = this->_internal_name(i);
2341     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2342         InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream);
2343   }
2344 
2345   cached_has_bits = _impl_._has_bits_[0];
2346   // optional string identifier_value = 3;
2347   if (cached_has_bits & 0x00000001u) {
2348     target = stream->WriteStringMaybeAliased(
2349         3, this->_internal_identifier_value(), target);
2350   }
2351 
2352   // optional uint64 positive_int_value = 4;
2353   if (cached_has_bits & 0x00000008u) {
2354     target = stream->EnsureSpace(target);
2355     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(4, this->_internal_positive_int_value(), target);
2356   }
2357 
2358   // optional int64 negative_int_value = 5;
2359   if (cached_has_bits & 0x00000010u) {
2360     target = stream->EnsureSpace(target);
2361     target = ::_pbi::WireFormatLite::WriteInt64ToArray(5, this->_internal_negative_int_value(), target);
2362   }
2363 
2364   // optional double double_value = 6;
2365   if (cached_has_bits & 0x00000020u) {
2366     target = stream->EnsureSpace(target);
2367     target = ::_pbi::WireFormatLite::WriteDoubleToArray(6, this->_internal_double_value(), target);
2368   }
2369 
2370   // optional bytes string_value = 7;
2371   if (cached_has_bits & 0x00000002u) {
2372     target = stream->WriteBytesMaybeAliased(
2373         7, this->_internal_string_value(), target);
2374   }
2375 
2376   // optional string aggregate_value = 8;
2377   if (cached_has_bits & 0x00000004u) {
2378     target = stream->WriteStringMaybeAliased(
2379         8, this->_internal_aggregate_value(), target);
2380   }
2381 
2382   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2383     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
2384         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
2385   }
2386   // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.UninterpretedOption)
2387   return target;
2388 }
2389 
ByteSizeLong() const2390 size_t UninterpretedOption::ByteSizeLong() const {
2391 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.UninterpretedOption)
2392   size_t total_size = 0;
2393 
2394   ::uint32_t cached_has_bits = 0;
2395   // Prevent compiler warnings about cached_has_bits being unused
2396   (void) cached_has_bits;
2397 
2398   // repeated .perfetto.protos.UninterpretedOption.NamePart name = 2;
2399   total_size += 1UL * this->_internal_name_size();
2400   for (const auto& msg : this->_impl_.name_) {
2401     total_size +=
2402       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
2403   }
2404 
2405   cached_has_bits = _impl_._has_bits_[0];
2406   if (cached_has_bits & 0x0000003fu) {
2407     // optional string identifier_value = 3;
2408     if (cached_has_bits & 0x00000001u) {
2409       total_size += 1 +
2410         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
2411           this->_internal_identifier_value());
2412     }
2413 
2414     // optional bytes string_value = 7;
2415     if (cached_has_bits & 0x00000002u) {
2416       total_size += 1 +
2417         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
2418           this->_internal_string_value());
2419     }
2420 
2421     // optional string aggregate_value = 8;
2422     if (cached_has_bits & 0x00000004u) {
2423       total_size += 1 +
2424         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
2425           this->_internal_aggregate_value());
2426     }
2427 
2428     // optional uint64 positive_int_value = 4;
2429     if (cached_has_bits & 0x00000008u) {
2430       total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_positive_int_value());
2431     }
2432 
2433     // optional int64 negative_int_value = 5;
2434     if (cached_has_bits & 0x00000010u) {
2435       total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_negative_int_value());
2436     }
2437 
2438     // optional double double_value = 6;
2439     if (cached_has_bits & 0x00000020u) {
2440       total_size += 1 + 8;
2441     }
2442 
2443   }
2444   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2445     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
2446   }
2447   int cached_size = ::_pbi::ToCachedSize(total_size);
2448   SetCachedSize(cached_size);
2449   return total_size;
2450 }
2451 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)2452 void UninterpretedOption::CheckTypeAndMergeFrom(
2453     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
2454   MergeFrom(*::_pbi::DownCast<const UninterpretedOption*>(
2455       &from));
2456 }
2457 
MergeFrom(const UninterpretedOption & from)2458 void UninterpretedOption::MergeFrom(const UninterpretedOption& from) {
2459   UninterpretedOption* const _this = this;
2460   // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.UninterpretedOption)
2461   GOOGLE_DCHECK_NE(&from, _this);
2462   ::uint32_t cached_has_bits = 0;
2463   (void) cached_has_bits;
2464 
2465   _this->_impl_.name_.MergeFrom(from._impl_.name_);
2466   cached_has_bits = from._impl_._has_bits_[0];
2467   if (cached_has_bits & 0x0000003fu) {
2468     if (cached_has_bits & 0x00000001u) {
2469       _this->_internal_set_identifier_value(from._internal_identifier_value());
2470     }
2471     if (cached_has_bits & 0x00000002u) {
2472       _this->_internal_set_string_value(from._internal_string_value());
2473     }
2474     if (cached_has_bits & 0x00000004u) {
2475       _this->_internal_set_aggregate_value(from._internal_aggregate_value());
2476     }
2477     if (cached_has_bits & 0x00000008u) {
2478       _this->_impl_.positive_int_value_ = from._impl_.positive_int_value_;
2479     }
2480     if (cached_has_bits & 0x00000010u) {
2481       _this->_impl_.negative_int_value_ = from._impl_.negative_int_value_;
2482     }
2483     if (cached_has_bits & 0x00000020u) {
2484       _this->_impl_.double_value_ = from._impl_.double_value_;
2485     }
2486     _this->_impl_._has_bits_[0] |= cached_has_bits;
2487   }
2488   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2489 }
2490 
CopyFrom(const UninterpretedOption & from)2491 void UninterpretedOption::CopyFrom(const UninterpretedOption& from) {
2492 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.UninterpretedOption)
2493   if (&from == this) return;
2494   Clear();
2495   MergeFrom(from);
2496 }
2497 
IsInitialized() const2498 bool UninterpretedOption::IsInitialized() const {
2499   return true;
2500 }
2501 
InternalSwap(UninterpretedOption * other)2502 void UninterpretedOption::InternalSwap(UninterpretedOption* other) {
2503   using std::swap;
2504   auto* lhs_arena = GetArenaForAllocation();
2505   auto* rhs_arena = other->GetArenaForAllocation();
2506   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
2507   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
2508   _impl_.name_.InternalSwap(&other->_impl_.name_);
2509   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
2510       &_impl_.identifier_value_, lhs_arena,
2511       &other->_impl_.identifier_value_, rhs_arena
2512   );
2513   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
2514       &_impl_.string_value_, lhs_arena,
2515       &other->_impl_.string_value_, rhs_arena
2516   );
2517   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
2518       &_impl_.aggregate_value_, lhs_arena,
2519       &other->_impl_.aggregate_value_, rhs_arena
2520   );
2521   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
2522       PROTOBUF_FIELD_OFFSET(UninterpretedOption, _impl_.double_value_)
2523       + sizeof(UninterpretedOption::_impl_.double_value_)  // NOLINT
2524       - PROTOBUF_FIELD_OFFSET(UninterpretedOption, _impl_.positive_int_value_)>(
2525           reinterpret_cast<char*>(&_impl_.positive_int_value_),
2526           reinterpret_cast<char*>(&other->_impl_.positive_int_value_));
2527 }
2528 
GetTypeName() const2529 std::string UninterpretedOption::GetTypeName() const {
2530   return "perfetto.protos.UninterpretedOption";
2531 }
2532 
2533 
2534 // ===================================================================
2535 
2536 class FieldOptions::_Internal {
2537  public:
2538   using HasBits = decltype(std::declval<FieldOptions>()._impl_._has_bits_);
set_has_packed(HasBits * has_bits)2539   static void set_has_packed(HasBits* has_bits) {
2540     (*has_bits)[0] |= 1u;
2541   }
2542 };
2543 
FieldOptions(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)2544 FieldOptions::FieldOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena,
2545                          bool is_message_owned)
2546   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
2547   SharedCtor(arena, is_message_owned);
2548   // @@protoc_insertion_point(arena_constructor:perfetto.protos.FieldOptions)
2549 }
FieldOptions(const FieldOptions & from)2550 FieldOptions::FieldOptions(const FieldOptions& from)
2551   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
2552   FieldOptions* const _this = this; (void)_this;
2553   new (&_impl_) Impl_{
2554       decltype(_impl_._has_bits_){from._impl_._has_bits_}
2555     , /*decltype(_impl_._cached_size_)*/{}
2556     , decltype(_impl_.uninterpreted_option_){from._impl_.uninterpreted_option_}
2557     , decltype(_impl_.packed_){}};
2558 
2559   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2560   _this->_impl_.packed_ = from._impl_.packed_;
2561   // @@protoc_insertion_point(copy_constructor:perfetto.protos.FieldOptions)
2562 }
2563 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)2564 inline void FieldOptions::SharedCtor(
2565     ::_pb::Arena* arena, bool is_message_owned) {
2566   (void)arena;
2567   (void)is_message_owned;
2568   new (&_impl_) Impl_{
2569       decltype(_impl_._has_bits_){}
2570     , /*decltype(_impl_._cached_size_)*/{}
2571     , decltype(_impl_.uninterpreted_option_){arena}
2572     , decltype(_impl_.packed_){false}
2573   };
2574 }
2575 
~FieldOptions()2576 FieldOptions::~FieldOptions() {
2577   // @@protoc_insertion_point(destructor:perfetto.protos.FieldOptions)
2578   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
2579   (void)arena;
2580     return;
2581   }
2582   SharedDtor();
2583 }
2584 
SharedDtor()2585 inline void FieldOptions::SharedDtor() {
2586   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
2587   _impl_.uninterpreted_option_.~RepeatedPtrField();
2588 }
2589 
SetCachedSize(int size) const2590 void FieldOptions::SetCachedSize(int size) const {
2591   _impl_._cached_size_.Set(size);
2592 }
2593 
Clear()2594 void FieldOptions::Clear() {
2595 // @@protoc_insertion_point(message_clear_start:perfetto.protos.FieldOptions)
2596   ::uint32_t cached_has_bits = 0;
2597   // Prevent compiler warnings about cached_has_bits being unused
2598   (void) cached_has_bits;
2599 
2600   _impl_.uninterpreted_option_.Clear();
2601   _impl_.packed_ = false;
2602   _impl_._has_bits_.Clear();
2603   _internal_metadata_.Clear<std::string>();
2604 }
2605 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)2606 const char* FieldOptions::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
2607 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
2608   _Internal::HasBits has_bits{};
2609   while (!ctx->Done(&ptr)) {
2610     ::uint32_t tag;
2611     ptr = ::_pbi::ReadTag(ptr, &tag);
2612     switch (tag >> 3) {
2613       // optional bool packed = 2;
2614       case 2:
2615         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
2616           _Internal::set_has_packed(&has_bits);
2617           _impl_.packed_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2618           CHK_(ptr);
2619         } else {
2620           goto handle_unusual;
2621         }
2622         continue;
2623       // repeated .perfetto.protos.UninterpretedOption uninterpreted_option = 999;
2624       case 999:
2625         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 58)) {
2626           ptr -= 2;
2627           do {
2628             ptr += 2;
2629             ptr = ctx->ParseMessage(_internal_add_uninterpreted_option(), ptr);
2630             CHK_(ptr);
2631             if (!ctx->DataAvailable(ptr)) break;
2632           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<7994>(ptr));
2633         } else {
2634           goto handle_unusual;
2635         }
2636         continue;
2637       default:
2638         goto handle_unusual;
2639     }  // switch
2640   handle_unusual:
2641     if ((tag == 0) || ((tag & 7) == 4)) {
2642       CHK_(ptr);
2643       ctx->SetLastTag(tag);
2644       goto message_done;
2645     }
2646     ptr = UnknownFieldParse(
2647         tag,
2648         _internal_metadata_.mutable_unknown_fields<std::string>(),
2649         ptr, ctx);
2650     CHK_(ptr != nullptr);
2651   }  // while
2652 message_done:
2653   _impl_._has_bits_.Or(has_bits);
2654   return ptr;
2655 failure:
2656   ptr = nullptr;
2657   goto message_done;
2658 #undef CHK_
2659 }
2660 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const2661 ::uint8_t* FieldOptions::_InternalSerialize(
2662     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
2663   // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.FieldOptions)
2664   ::uint32_t cached_has_bits = 0;
2665   (void) cached_has_bits;
2666 
2667   cached_has_bits = _impl_._has_bits_[0];
2668   // optional bool packed = 2;
2669   if (cached_has_bits & 0x00000001u) {
2670     target = stream->EnsureSpace(target);
2671     target = ::_pbi::WireFormatLite::WriteBoolToArray(2, this->_internal_packed(), target);
2672   }
2673 
2674   // repeated .perfetto.protos.UninterpretedOption uninterpreted_option = 999;
2675   for (unsigned i = 0,
2676       n = static_cast<unsigned>(this->_internal_uninterpreted_option_size()); i < n; i++) {
2677     const auto& repfield = this->_internal_uninterpreted_option(i);
2678     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2679         InternalWriteMessage(999, repfield, repfield.GetCachedSize(), target, stream);
2680   }
2681 
2682   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2683     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
2684         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
2685   }
2686   // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.FieldOptions)
2687   return target;
2688 }
2689 
ByteSizeLong() const2690 size_t FieldOptions::ByteSizeLong() const {
2691 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.FieldOptions)
2692   size_t total_size = 0;
2693 
2694   ::uint32_t cached_has_bits = 0;
2695   // Prevent compiler warnings about cached_has_bits being unused
2696   (void) cached_has_bits;
2697 
2698   // repeated .perfetto.protos.UninterpretedOption uninterpreted_option = 999;
2699   total_size += 2UL * this->_internal_uninterpreted_option_size();
2700   for (const auto& msg : this->_impl_.uninterpreted_option_) {
2701     total_size +=
2702       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
2703   }
2704 
2705   // optional bool packed = 2;
2706   cached_has_bits = _impl_._has_bits_[0];
2707   if (cached_has_bits & 0x00000001u) {
2708     total_size += 1 + 1;
2709   }
2710 
2711   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2712     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
2713   }
2714   int cached_size = ::_pbi::ToCachedSize(total_size);
2715   SetCachedSize(cached_size);
2716   return total_size;
2717 }
2718 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)2719 void FieldOptions::CheckTypeAndMergeFrom(
2720     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
2721   MergeFrom(*::_pbi::DownCast<const FieldOptions*>(
2722       &from));
2723 }
2724 
MergeFrom(const FieldOptions & from)2725 void FieldOptions::MergeFrom(const FieldOptions& from) {
2726   FieldOptions* const _this = this;
2727   // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.FieldOptions)
2728   GOOGLE_DCHECK_NE(&from, _this);
2729   ::uint32_t cached_has_bits = 0;
2730   (void) cached_has_bits;
2731 
2732   _this->_impl_.uninterpreted_option_.MergeFrom(from._impl_.uninterpreted_option_);
2733   if (from._internal_has_packed()) {
2734     _this->_internal_set_packed(from._internal_packed());
2735   }
2736   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2737 }
2738 
CopyFrom(const FieldOptions & from)2739 void FieldOptions::CopyFrom(const FieldOptions& from) {
2740 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.FieldOptions)
2741   if (&from == this) return;
2742   Clear();
2743   MergeFrom(from);
2744 }
2745 
IsInitialized() const2746 bool FieldOptions::IsInitialized() const {
2747   return true;
2748 }
2749 
InternalSwap(FieldOptions * other)2750 void FieldOptions::InternalSwap(FieldOptions* other) {
2751   using std::swap;
2752   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
2753   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
2754   _impl_.uninterpreted_option_.InternalSwap(&other->_impl_.uninterpreted_option_);
2755   swap(_impl_.packed_, other->_impl_.packed_);
2756 }
2757 
GetTypeName() const2758 std::string FieldOptions::GetTypeName() const {
2759   return "perfetto.protos.FieldOptions";
2760 }
2761 
2762 
2763 // ===================================================================
2764 
2765 class FieldDescriptorProto::_Internal {
2766  public:
2767   using HasBits = decltype(std::declval<FieldDescriptorProto>()._impl_._has_bits_);
set_has_name(HasBits * has_bits)2768   static void set_has_name(HasBits* has_bits) {
2769     (*has_bits)[0] |= 1u;
2770   }
set_has_number(HasBits * has_bits)2771   static void set_has_number(HasBits* has_bits) {
2772     (*has_bits)[0] |= 32u;
2773   }
set_has_label(HasBits * has_bits)2774   static void set_has_label(HasBits* has_bits) {
2775     (*has_bits)[0] |= 128u;
2776   }
set_has_type(HasBits * has_bits)2777   static void set_has_type(HasBits* has_bits) {
2778     (*has_bits)[0] |= 256u;
2779   }
set_has_type_name(HasBits * has_bits)2780   static void set_has_type_name(HasBits* has_bits) {
2781     (*has_bits)[0] |= 4u;
2782   }
set_has_extendee(HasBits * has_bits)2783   static void set_has_extendee(HasBits* has_bits) {
2784     (*has_bits)[0] |= 2u;
2785   }
set_has_default_value(HasBits * has_bits)2786   static void set_has_default_value(HasBits* has_bits) {
2787     (*has_bits)[0] |= 8u;
2788   }
2789   static const ::perfetto::protos::FieldOptions& options(const FieldDescriptorProto* msg);
set_has_options(HasBits * has_bits)2790   static void set_has_options(HasBits* has_bits) {
2791     (*has_bits)[0] |= 16u;
2792   }
set_has_oneof_index(HasBits * has_bits)2793   static void set_has_oneof_index(HasBits* has_bits) {
2794     (*has_bits)[0] |= 64u;
2795   }
2796 };
2797 
2798 const ::perfetto::protos::FieldOptions&
options(const FieldDescriptorProto * msg)2799 FieldDescriptorProto::_Internal::options(const FieldDescriptorProto* msg) {
2800   return *msg->_impl_.options_;
2801 }
FieldDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)2802 FieldDescriptorProto::FieldDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
2803                          bool is_message_owned)
2804   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
2805   SharedCtor(arena, is_message_owned);
2806   // @@protoc_insertion_point(arena_constructor:perfetto.protos.FieldDescriptorProto)
2807 }
FieldDescriptorProto(const FieldDescriptorProto & from)2808 FieldDescriptorProto::FieldDescriptorProto(const FieldDescriptorProto& from)
2809   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
2810   FieldDescriptorProto* const _this = this; (void)_this;
2811   new (&_impl_) Impl_{
2812       decltype(_impl_._has_bits_){from._impl_._has_bits_}
2813     , /*decltype(_impl_._cached_size_)*/{}
2814     , decltype(_impl_.name_){}
2815     , decltype(_impl_.extendee_){}
2816     , decltype(_impl_.type_name_){}
2817     , decltype(_impl_.default_value_){}
2818     , decltype(_impl_.options_){nullptr}
2819     , decltype(_impl_.number_){}
2820     , decltype(_impl_.oneof_index_){}
2821     , decltype(_impl_.label_){}
2822     , decltype(_impl_.type_){}};
2823 
2824   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2825   _impl_.name_.InitDefault();
2826   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2827     _impl_.name_.Set("", GetArenaForAllocation());
2828   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2829   if (from._internal_has_name()) {
2830     _this->_impl_.name_.Set(from._internal_name(),
2831       _this->GetArenaForAllocation());
2832   }
2833   _impl_.extendee_.InitDefault();
2834   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2835     _impl_.extendee_.Set("", GetArenaForAllocation());
2836   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2837   if (from._internal_has_extendee()) {
2838     _this->_impl_.extendee_.Set(from._internal_extendee(),
2839       _this->GetArenaForAllocation());
2840   }
2841   _impl_.type_name_.InitDefault();
2842   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2843     _impl_.type_name_.Set("", GetArenaForAllocation());
2844   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2845   if (from._internal_has_type_name()) {
2846     _this->_impl_.type_name_.Set(from._internal_type_name(),
2847       _this->GetArenaForAllocation());
2848   }
2849   _impl_.default_value_.InitDefault();
2850   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2851     _impl_.default_value_.Set("", GetArenaForAllocation());
2852   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2853   if (from._internal_has_default_value()) {
2854     _this->_impl_.default_value_.Set(from._internal_default_value(),
2855       _this->GetArenaForAllocation());
2856   }
2857   if (from._internal_has_options()) {
2858     _this->_impl_.options_ = new ::perfetto::protos::FieldOptions(*from._impl_.options_);
2859   }
2860   ::memcpy(&_impl_.number_, &from._impl_.number_,
2861     static_cast<size_t>(reinterpret_cast<char*>(&_impl_.type_) -
2862     reinterpret_cast<char*>(&_impl_.number_)) + sizeof(_impl_.type_));
2863   // @@protoc_insertion_point(copy_constructor:perfetto.protos.FieldDescriptorProto)
2864 }
2865 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)2866 inline void FieldDescriptorProto::SharedCtor(
2867     ::_pb::Arena* arena, bool is_message_owned) {
2868   (void)arena;
2869   (void)is_message_owned;
2870   new (&_impl_) Impl_{
2871       decltype(_impl_._has_bits_){}
2872     , /*decltype(_impl_._cached_size_)*/{}
2873     , decltype(_impl_.name_){}
2874     , decltype(_impl_.extendee_){}
2875     , decltype(_impl_.type_name_){}
2876     , decltype(_impl_.default_value_){}
2877     , decltype(_impl_.options_){nullptr}
2878     , decltype(_impl_.number_){0}
2879     , decltype(_impl_.oneof_index_){0}
2880     , decltype(_impl_.label_){1}
2881     , decltype(_impl_.type_){1}
2882   };
2883   _impl_.name_.InitDefault();
2884   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2885     _impl_.name_.Set("", GetArenaForAllocation());
2886   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2887   _impl_.extendee_.InitDefault();
2888   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2889     _impl_.extendee_.Set("", GetArenaForAllocation());
2890   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2891   _impl_.type_name_.InitDefault();
2892   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2893     _impl_.type_name_.Set("", GetArenaForAllocation());
2894   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2895   _impl_.default_value_.InitDefault();
2896   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2897     _impl_.default_value_.Set("", GetArenaForAllocation());
2898   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2899 }
2900 
~FieldDescriptorProto()2901 FieldDescriptorProto::~FieldDescriptorProto() {
2902   // @@protoc_insertion_point(destructor:perfetto.protos.FieldDescriptorProto)
2903   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
2904   (void)arena;
2905     return;
2906   }
2907   SharedDtor();
2908 }
2909 
SharedDtor()2910 inline void FieldDescriptorProto::SharedDtor() {
2911   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
2912   _impl_.name_.Destroy();
2913   _impl_.extendee_.Destroy();
2914   _impl_.type_name_.Destroy();
2915   _impl_.default_value_.Destroy();
2916   if (this != internal_default_instance()) delete _impl_.options_;
2917 }
2918 
SetCachedSize(int size) const2919 void FieldDescriptorProto::SetCachedSize(int size) const {
2920   _impl_._cached_size_.Set(size);
2921 }
2922 
Clear()2923 void FieldDescriptorProto::Clear() {
2924 // @@protoc_insertion_point(message_clear_start:perfetto.protos.FieldDescriptorProto)
2925   ::uint32_t cached_has_bits = 0;
2926   // Prevent compiler warnings about cached_has_bits being unused
2927   (void) cached_has_bits;
2928 
2929   cached_has_bits = _impl_._has_bits_[0];
2930   if (cached_has_bits & 0x0000001fu) {
2931     if (cached_has_bits & 0x00000001u) {
2932       _impl_.name_.ClearNonDefaultToEmpty();
2933     }
2934     if (cached_has_bits & 0x00000002u) {
2935       _impl_.extendee_.ClearNonDefaultToEmpty();
2936     }
2937     if (cached_has_bits & 0x00000004u) {
2938       _impl_.type_name_.ClearNonDefaultToEmpty();
2939     }
2940     if (cached_has_bits & 0x00000008u) {
2941       _impl_.default_value_.ClearNonDefaultToEmpty();
2942     }
2943     if (cached_has_bits & 0x00000010u) {
2944       GOOGLE_DCHECK(_impl_.options_ != nullptr);
2945       _impl_.options_->Clear();
2946     }
2947   }
2948   if (cached_has_bits & 0x000000e0u) {
2949     ::memset(&_impl_.number_, 0, static_cast<size_t>(
2950         reinterpret_cast<char*>(&_impl_.oneof_index_) -
2951         reinterpret_cast<char*>(&_impl_.number_)) + sizeof(_impl_.oneof_index_));
2952     _impl_.label_ = 1;
2953   }
2954   _impl_.type_ = 1;
2955   _impl_._has_bits_.Clear();
2956   _internal_metadata_.Clear<std::string>();
2957 }
2958 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)2959 const char* FieldDescriptorProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
2960 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
2961   _Internal::HasBits has_bits{};
2962   while (!ctx->Done(&ptr)) {
2963     ::uint32_t tag;
2964     ptr = ::_pbi::ReadTag(ptr, &tag);
2965     switch (tag >> 3) {
2966       // optional string name = 1;
2967       case 1:
2968         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
2969           auto str = _internal_mutable_name();
2970           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
2971           CHK_(ptr);
2972         } else {
2973           goto handle_unusual;
2974         }
2975         continue;
2976       // optional string extendee = 2;
2977       case 2:
2978         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
2979           auto str = _internal_mutable_extendee();
2980           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
2981           CHK_(ptr);
2982         } else {
2983           goto handle_unusual;
2984         }
2985         continue;
2986       // optional int32 number = 3;
2987       case 3:
2988         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
2989           _Internal::set_has_number(&has_bits);
2990           _impl_.number_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2991           CHK_(ptr);
2992         } else {
2993           goto handle_unusual;
2994         }
2995         continue;
2996       // optional .perfetto.protos.FieldDescriptorProto.Label label = 4;
2997       case 4:
2998         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
2999           ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
3000           CHK_(ptr);
3001           if (PROTOBUF_PREDICT_TRUE(::perfetto::protos::FieldDescriptorProto_Label_IsValid(val))) {
3002             _internal_set_label(static_cast<::perfetto::protos::FieldDescriptorProto_Label>(val));
3003           } else {
3004             ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(4, val, mutable_unknown_fields());
3005           }
3006         } else {
3007           goto handle_unusual;
3008         }
3009         continue;
3010       // optional .perfetto.protos.FieldDescriptorProto.Type type = 5;
3011       case 5:
3012         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
3013           ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
3014           CHK_(ptr);
3015           if (PROTOBUF_PREDICT_TRUE(::perfetto::protos::FieldDescriptorProto_Type_IsValid(val))) {
3016             _internal_set_type(static_cast<::perfetto::protos::FieldDescriptorProto_Type>(val));
3017           } else {
3018             ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(5, val, mutable_unknown_fields());
3019           }
3020         } else {
3021           goto handle_unusual;
3022         }
3023         continue;
3024       // optional string type_name = 6;
3025       case 6:
3026         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 50)) {
3027           auto str = _internal_mutable_type_name();
3028           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
3029           CHK_(ptr);
3030         } else {
3031           goto handle_unusual;
3032         }
3033         continue;
3034       // optional string default_value = 7;
3035       case 7:
3036         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 58)) {
3037           auto str = _internal_mutable_default_value();
3038           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
3039           CHK_(ptr);
3040         } else {
3041           goto handle_unusual;
3042         }
3043         continue;
3044       // optional .perfetto.protos.FieldOptions options = 8;
3045       case 8:
3046         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 66)) {
3047           ptr = ctx->ParseMessage(_internal_mutable_options(), ptr);
3048           CHK_(ptr);
3049         } else {
3050           goto handle_unusual;
3051         }
3052         continue;
3053       // optional int32 oneof_index = 9;
3054       case 9:
3055         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 72)) {
3056           _Internal::set_has_oneof_index(&has_bits);
3057           _impl_.oneof_index_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
3058           CHK_(ptr);
3059         } else {
3060           goto handle_unusual;
3061         }
3062         continue;
3063       default:
3064         goto handle_unusual;
3065     }  // switch
3066   handle_unusual:
3067     if ((tag == 0) || ((tag & 7) == 4)) {
3068       CHK_(ptr);
3069       ctx->SetLastTag(tag);
3070       goto message_done;
3071     }
3072     ptr = UnknownFieldParse(
3073         tag,
3074         _internal_metadata_.mutable_unknown_fields<std::string>(),
3075         ptr, ctx);
3076     CHK_(ptr != nullptr);
3077   }  // while
3078 message_done:
3079   _impl_._has_bits_.Or(has_bits);
3080   return ptr;
3081 failure:
3082   ptr = nullptr;
3083   goto message_done;
3084 #undef CHK_
3085 }
3086 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const3087 ::uint8_t* FieldDescriptorProto::_InternalSerialize(
3088     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
3089   // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.FieldDescriptorProto)
3090   ::uint32_t cached_has_bits = 0;
3091   (void) cached_has_bits;
3092 
3093   cached_has_bits = _impl_._has_bits_[0];
3094   // optional string name = 1;
3095   if (cached_has_bits & 0x00000001u) {
3096     target = stream->WriteStringMaybeAliased(
3097         1, this->_internal_name(), target);
3098   }
3099 
3100   // optional string extendee = 2;
3101   if (cached_has_bits & 0x00000002u) {
3102     target = stream->WriteStringMaybeAliased(
3103         2, this->_internal_extendee(), target);
3104   }
3105 
3106   // optional int32 number = 3;
3107   if (cached_has_bits & 0x00000020u) {
3108     target = stream->EnsureSpace(target);
3109     target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_number(), target);
3110   }
3111 
3112   // optional .perfetto.protos.FieldDescriptorProto.Label label = 4;
3113   if (cached_has_bits & 0x00000080u) {
3114     target = stream->EnsureSpace(target);
3115     target = ::_pbi::WireFormatLite::WriteEnumToArray(
3116       4, this->_internal_label(), target);
3117   }
3118 
3119   // optional .perfetto.protos.FieldDescriptorProto.Type type = 5;
3120   if (cached_has_bits & 0x00000100u) {
3121     target = stream->EnsureSpace(target);
3122     target = ::_pbi::WireFormatLite::WriteEnumToArray(
3123       5, this->_internal_type(), target);
3124   }
3125 
3126   // optional string type_name = 6;
3127   if (cached_has_bits & 0x00000004u) {
3128     target = stream->WriteStringMaybeAliased(
3129         6, this->_internal_type_name(), target);
3130   }
3131 
3132   // optional string default_value = 7;
3133   if (cached_has_bits & 0x00000008u) {
3134     target = stream->WriteStringMaybeAliased(
3135         7, this->_internal_default_value(), target);
3136   }
3137 
3138   // optional .perfetto.protos.FieldOptions options = 8;
3139   if (cached_has_bits & 0x00000010u) {
3140     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
3141       InternalWriteMessage(8, _Internal::options(this),
3142         _Internal::options(this).GetCachedSize(), target, stream);
3143   }
3144 
3145   // optional int32 oneof_index = 9;
3146   if (cached_has_bits & 0x00000040u) {
3147     target = stream->EnsureSpace(target);
3148     target = ::_pbi::WireFormatLite::WriteInt32ToArray(9, this->_internal_oneof_index(), target);
3149   }
3150 
3151   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3152     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
3153         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
3154   }
3155   // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.FieldDescriptorProto)
3156   return target;
3157 }
3158 
ByteSizeLong() const3159 size_t FieldDescriptorProto::ByteSizeLong() const {
3160 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.FieldDescriptorProto)
3161   size_t total_size = 0;
3162 
3163   ::uint32_t cached_has_bits = 0;
3164   // Prevent compiler warnings about cached_has_bits being unused
3165   (void) cached_has_bits;
3166 
3167   cached_has_bits = _impl_._has_bits_[0];
3168   if (cached_has_bits & 0x000000ffu) {
3169     // optional string name = 1;
3170     if (cached_has_bits & 0x00000001u) {
3171       total_size += 1 +
3172         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
3173           this->_internal_name());
3174     }
3175 
3176     // optional string extendee = 2;
3177     if (cached_has_bits & 0x00000002u) {
3178       total_size += 1 +
3179         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
3180           this->_internal_extendee());
3181     }
3182 
3183     // optional string type_name = 6;
3184     if (cached_has_bits & 0x00000004u) {
3185       total_size += 1 +
3186         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
3187           this->_internal_type_name());
3188     }
3189 
3190     // optional string default_value = 7;
3191     if (cached_has_bits & 0x00000008u) {
3192       total_size += 1 +
3193         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
3194           this->_internal_default_value());
3195     }
3196 
3197     // optional .perfetto.protos.FieldOptions options = 8;
3198     if (cached_has_bits & 0x00000010u) {
3199       total_size += 1 +
3200         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
3201           *_impl_.options_);
3202     }
3203 
3204     // optional int32 number = 3;
3205     if (cached_has_bits & 0x00000020u) {
3206       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_number());
3207     }
3208 
3209     // optional int32 oneof_index = 9;
3210     if (cached_has_bits & 0x00000040u) {
3211       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_oneof_index());
3212     }
3213 
3214     // optional .perfetto.protos.FieldDescriptorProto.Label label = 4;
3215     if (cached_has_bits & 0x00000080u) {
3216       total_size += 1 +
3217         ::_pbi::WireFormatLite::EnumSize(this->_internal_label());
3218     }
3219 
3220   }
3221   // optional .perfetto.protos.FieldDescriptorProto.Type type = 5;
3222   if (cached_has_bits & 0x00000100u) {
3223     total_size += 1 +
3224       ::_pbi::WireFormatLite::EnumSize(this->_internal_type());
3225   }
3226 
3227   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3228     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
3229   }
3230   int cached_size = ::_pbi::ToCachedSize(total_size);
3231   SetCachedSize(cached_size);
3232   return total_size;
3233 }
3234 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)3235 void FieldDescriptorProto::CheckTypeAndMergeFrom(
3236     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
3237   MergeFrom(*::_pbi::DownCast<const FieldDescriptorProto*>(
3238       &from));
3239 }
3240 
MergeFrom(const FieldDescriptorProto & from)3241 void FieldDescriptorProto::MergeFrom(const FieldDescriptorProto& from) {
3242   FieldDescriptorProto* const _this = this;
3243   // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.FieldDescriptorProto)
3244   GOOGLE_DCHECK_NE(&from, _this);
3245   ::uint32_t cached_has_bits = 0;
3246   (void) cached_has_bits;
3247 
3248   cached_has_bits = from._impl_._has_bits_[0];
3249   if (cached_has_bits & 0x000000ffu) {
3250     if (cached_has_bits & 0x00000001u) {
3251       _this->_internal_set_name(from._internal_name());
3252     }
3253     if (cached_has_bits & 0x00000002u) {
3254       _this->_internal_set_extendee(from._internal_extendee());
3255     }
3256     if (cached_has_bits & 0x00000004u) {
3257       _this->_internal_set_type_name(from._internal_type_name());
3258     }
3259     if (cached_has_bits & 0x00000008u) {
3260       _this->_internal_set_default_value(from._internal_default_value());
3261     }
3262     if (cached_has_bits & 0x00000010u) {
3263       _this->_internal_mutable_options()->::perfetto::protos::FieldOptions::MergeFrom(
3264           from._internal_options());
3265     }
3266     if (cached_has_bits & 0x00000020u) {
3267       _this->_impl_.number_ = from._impl_.number_;
3268     }
3269     if (cached_has_bits & 0x00000040u) {
3270       _this->_impl_.oneof_index_ = from._impl_.oneof_index_;
3271     }
3272     if (cached_has_bits & 0x00000080u) {
3273       _this->_impl_.label_ = from._impl_.label_;
3274     }
3275     _this->_impl_._has_bits_[0] |= cached_has_bits;
3276   }
3277   if (cached_has_bits & 0x00000100u) {
3278     _this->_internal_set_type(from._internal_type());
3279   }
3280   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3281 }
3282 
CopyFrom(const FieldDescriptorProto & from)3283 void FieldDescriptorProto::CopyFrom(const FieldDescriptorProto& from) {
3284 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.FieldDescriptorProto)
3285   if (&from == this) return;
3286   Clear();
3287   MergeFrom(from);
3288 }
3289 
IsInitialized() const3290 bool FieldDescriptorProto::IsInitialized() const {
3291   return true;
3292 }
3293 
InternalSwap(FieldDescriptorProto * other)3294 void FieldDescriptorProto::InternalSwap(FieldDescriptorProto* other) {
3295   using std::swap;
3296   auto* lhs_arena = GetArenaForAllocation();
3297   auto* rhs_arena = other->GetArenaForAllocation();
3298   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
3299   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
3300   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
3301       &_impl_.name_, lhs_arena,
3302       &other->_impl_.name_, rhs_arena
3303   );
3304   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
3305       &_impl_.extendee_, lhs_arena,
3306       &other->_impl_.extendee_, rhs_arena
3307   );
3308   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
3309       &_impl_.type_name_, lhs_arena,
3310       &other->_impl_.type_name_, rhs_arena
3311   );
3312   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
3313       &_impl_.default_value_, lhs_arena,
3314       &other->_impl_.default_value_, rhs_arena
3315   );
3316   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
3317       PROTOBUF_FIELD_OFFSET(FieldDescriptorProto, _impl_.oneof_index_)
3318       + sizeof(FieldDescriptorProto::_impl_.oneof_index_)  // NOLINT
3319       - PROTOBUF_FIELD_OFFSET(FieldDescriptorProto, _impl_.options_)>(
3320           reinterpret_cast<char*>(&_impl_.options_),
3321           reinterpret_cast<char*>(&other->_impl_.options_));
3322   swap(_impl_.label_, other->_impl_.label_);
3323   swap(_impl_.type_, other->_impl_.type_);
3324 }
3325 
GetTypeName() const3326 std::string FieldDescriptorProto::GetTypeName() const {
3327   return "perfetto.protos.FieldDescriptorProto";
3328 }
3329 
3330 
3331 // ===================================================================
3332 
3333 class OneofDescriptorProto::_Internal {
3334  public:
3335   using HasBits = decltype(std::declval<OneofDescriptorProto>()._impl_._has_bits_);
set_has_name(HasBits * has_bits)3336   static void set_has_name(HasBits* has_bits) {
3337     (*has_bits)[0] |= 1u;
3338   }
3339   static const ::perfetto::protos::OneofOptions& options(const OneofDescriptorProto* msg);
set_has_options(HasBits * has_bits)3340   static void set_has_options(HasBits* has_bits) {
3341     (*has_bits)[0] |= 2u;
3342   }
3343 };
3344 
3345 const ::perfetto::protos::OneofOptions&
options(const OneofDescriptorProto * msg)3346 OneofDescriptorProto::_Internal::options(const OneofDescriptorProto* msg) {
3347   return *msg->_impl_.options_;
3348 }
OneofDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)3349 OneofDescriptorProto::OneofDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
3350                          bool is_message_owned)
3351   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
3352   SharedCtor(arena, is_message_owned);
3353   // @@protoc_insertion_point(arena_constructor:perfetto.protos.OneofDescriptorProto)
3354 }
OneofDescriptorProto(const OneofDescriptorProto & from)3355 OneofDescriptorProto::OneofDescriptorProto(const OneofDescriptorProto& from)
3356   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
3357   OneofDescriptorProto* const _this = this; (void)_this;
3358   new (&_impl_) Impl_{
3359       decltype(_impl_._has_bits_){from._impl_._has_bits_}
3360     , /*decltype(_impl_._cached_size_)*/{}
3361     , decltype(_impl_.name_){}
3362     , decltype(_impl_.options_){nullptr}};
3363 
3364   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3365   _impl_.name_.InitDefault();
3366   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
3367     _impl_.name_.Set("", GetArenaForAllocation());
3368   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
3369   if (from._internal_has_name()) {
3370     _this->_impl_.name_.Set(from._internal_name(),
3371       _this->GetArenaForAllocation());
3372   }
3373   if (from._internal_has_options()) {
3374     _this->_impl_.options_ = new ::perfetto::protos::OneofOptions(*from._impl_.options_);
3375   }
3376   // @@protoc_insertion_point(copy_constructor:perfetto.protos.OneofDescriptorProto)
3377 }
3378 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)3379 inline void OneofDescriptorProto::SharedCtor(
3380     ::_pb::Arena* arena, bool is_message_owned) {
3381   (void)arena;
3382   (void)is_message_owned;
3383   new (&_impl_) Impl_{
3384       decltype(_impl_._has_bits_){}
3385     , /*decltype(_impl_._cached_size_)*/{}
3386     , decltype(_impl_.name_){}
3387     , decltype(_impl_.options_){nullptr}
3388   };
3389   _impl_.name_.InitDefault();
3390   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
3391     _impl_.name_.Set("", GetArenaForAllocation());
3392   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
3393 }
3394 
~OneofDescriptorProto()3395 OneofDescriptorProto::~OneofDescriptorProto() {
3396   // @@protoc_insertion_point(destructor:perfetto.protos.OneofDescriptorProto)
3397   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
3398   (void)arena;
3399     return;
3400   }
3401   SharedDtor();
3402 }
3403 
SharedDtor()3404 inline void OneofDescriptorProto::SharedDtor() {
3405   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
3406   _impl_.name_.Destroy();
3407   if (this != internal_default_instance()) delete _impl_.options_;
3408 }
3409 
SetCachedSize(int size) const3410 void OneofDescriptorProto::SetCachedSize(int size) const {
3411   _impl_._cached_size_.Set(size);
3412 }
3413 
Clear()3414 void OneofDescriptorProto::Clear() {
3415 // @@protoc_insertion_point(message_clear_start:perfetto.protos.OneofDescriptorProto)
3416   ::uint32_t cached_has_bits = 0;
3417   // Prevent compiler warnings about cached_has_bits being unused
3418   (void) cached_has_bits;
3419 
3420   cached_has_bits = _impl_._has_bits_[0];
3421   if (cached_has_bits & 0x00000003u) {
3422     if (cached_has_bits & 0x00000001u) {
3423       _impl_.name_.ClearNonDefaultToEmpty();
3424     }
3425     if (cached_has_bits & 0x00000002u) {
3426       GOOGLE_DCHECK(_impl_.options_ != nullptr);
3427       _impl_.options_->Clear();
3428     }
3429   }
3430   _impl_._has_bits_.Clear();
3431   _internal_metadata_.Clear<std::string>();
3432 }
3433 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)3434 const char* OneofDescriptorProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
3435 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
3436   _Internal::HasBits has_bits{};
3437   while (!ctx->Done(&ptr)) {
3438     ::uint32_t tag;
3439     ptr = ::_pbi::ReadTag(ptr, &tag);
3440     switch (tag >> 3) {
3441       // optional string name = 1;
3442       case 1:
3443         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
3444           auto str = _internal_mutable_name();
3445           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
3446           CHK_(ptr);
3447         } else {
3448           goto handle_unusual;
3449         }
3450         continue;
3451       // optional .perfetto.protos.OneofOptions options = 2;
3452       case 2:
3453         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
3454           ptr = ctx->ParseMessage(_internal_mutable_options(), ptr);
3455           CHK_(ptr);
3456         } else {
3457           goto handle_unusual;
3458         }
3459         continue;
3460       default:
3461         goto handle_unusual;
3462     }  // switch
3463   handle_unusual:
3464     if ((tag == 0) || ((tag & 7) == 4)) {
3465       CHK_(ptr);
3466       ctx->SetLastTag(tag);
3467       goto message_done;
3468     }
3469     ptr = UnknownFieldParse(
3470         tag,
3471         _internal_metadata_.mutable_unknown_fields<std::string>(),
3472         ptr, ctx);
3473     CHK_(ptr != nullptr);
3474   }  // while
3475 message_done:
3476   _impl_._has_bits_.Or(has_bits);
3477   return ptr;
3478 failure:
3479   ptr = nullptr;
3480   goto message_done;
3481 #undef CHK_
3482 }
3483 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const3484 ::uint8_t* OneofDescriptorProto::_InternalSerialize(
3485     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
3486   // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.OneofDescriptorProto)
3487   ::uint32_t cached_has_bits = 0;
3488   (void) cached_has_bits;
3489 
3490   cached_has_bits = _impl_._has_bits_[0];
3491   // optional string name = 1;
3492   if (cached_has_bits & 0x00000001u) {
3493     target = stream->WriteStringMaybeAliased(
3494         1, this->_internal_name(), target);
3495   }
3496 
3497   // optional .perfetto.protos.OneofOptions options = 2;
3498   if (cached_has_bits & 0x00000002u) {
3499     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
3500       InternalWriteMessage(2, _Internal::options(this),
3501         _Internal::options(this).GetCachedSize(), target, stream);
3502   }
3503 
3504   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3505     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
3506         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
3507   }
3508   // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.OneofDescriptorProto)
3509   return target;
3510 }
3511 
ByteSizeLong() const3512 size_t OneofDescriptorProto::ByteSizeLong() const {
3513 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.OneofDescriptorProto)
3514   size_t total_size = 0;
3515 
3516   ::uint32_t cached_has_bits = 0;
3517   // Prevent compiler warnings about cached_has_bits being unused
3518   (void) cached_has_bits;
3519 
3520   cached_has_bits = _impl_._has_bits_[0];
3521   if (cached_has_bits & 0x00000003u) {
3522     // optional string name = 1;
3523     if (cached_has_bits & 0x00000001u) {
3524       total_size += 1 +
3525         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
3526           this->_internal_name());
3527     }
3528 
3529     // optional .perfetto.protos.OneofOptions options = 2;
3530     if (cached_has_bits & 0x00000002u) {
3531       total_size += 1 +
3532         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
3533           *_impl_.options_);
3534     }
3535 
3536   }
3537   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3538     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
3539   }
3540   int cached_size = ::_pbi::ToCachedSize(total_size);
3541   SetCachedSize(cached_size);
3542   return total_size;
3543 }
3544 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)3545 void OneofDescriptorProto::CheckTypeAndMergeFrom(
3546     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
3547   MergeFrom(*::_pbi::DownCast<const OneofDescriptorProto*>(
3548       &from));
3549 }
3550 
MergeFrom(const OneofDescriptorProto & from)3551 void OneofDescriptorProto::MergeFrom(const OneofDescriptorProto& from) {
3552   OneofDescriptorProto* const _this = this;
3553   // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.OneofDescriptorProto)
3554   GOOGLE_DCHECK_NE(&from, _this);
3555   ::uint32_t cached_has_bits = 0;
3556   (void) cached_has_bits;
3557 
3558   cached_has_bits = from._impl_._has_bits_[0];
3559   if (cached_has_bits & 0x00000003u) {
3560     if (cached_has_bits & 0x00000001u) {
3561       _this->_internal_set_name(from._internal_name());
3562     }
3563     if (cached_has_bits & 0x00000002u) {
3564       _this->_internal_mutable_options()->::perfetto::protos::OneofOptions::MergeFrom(
3565           from._internal_options());
3566     }
3567   }
3568   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3569 }
3570 
CopyFrom(const OneofDescriptorProto & from)3571 void OneofDescriptorProto::CopyFrom(const OneofDescriptorProto& from) {
3572 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.OneofDescriptorProto)
3573   if (&from == this) return;
3574   Clear();
3575   MergeFrom(from);
3576 }
3577 
IsInitialized() const3578 bool OneofDescriptorProto::IsInitialized() const {
3579   if (_internal_has_options()) {
3580     if (!_impl_.options_->IsInitialized()) return false;
3581   }
3582   return true;
3583 }
3584 
InternalSwap(OneofDescriptorProto * other)3585 void OneofDescriptorProto::InternalSwap(OneofDescriptorProto* other) {
3586   using std::swap;
3587   auto* lhs_arena = GetArenaForAllocation();
3588   auto* rhs_arena = other->GetArenaForAllocation();
3589   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
3590   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
3591   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
3592       &_impl_.name_, lhs_arena,
3593       &other->_impl_.name_, rhs_arena
3594   );
3595   swap(_impl_.options_, other->_impl_.options_);
3596 }
3597 
GetTypeName() const3598 std::string OneofDescriptorProto::GetTypeName() const {
3599   return "perfetto.protos.OneofDescriptorProto";
3600 }
3601 
3602 
3603 // ===================================================================
3604 
3605 class EnumDescriptorProto::_Internal {
3606  public:
3607   using HasBits = decltype(std::declval<EnumDescriptorProto>()._impl_._has_bits_);
set_has_name(HasBits * has_bits)3608   static void set_has_name(HasBits* has_bits) {
3609     (*has_bits)[0] |= 1u;
3610   }
3611 };
3612 
EnumDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)3613 EnumDescriptorProto::EnumDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
3614                          bool is_message_owned)
3615   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
3616   SharedCtor(arena, is_message_owned);
3617   // @@protoc_insertion_point(arena_constructor:perfetto.protos.EnumDescriptorProto)
3618 }
EnumDescriptorProto(const EnumDescriptorProto & from)3619 EnumDescriptorProto::EnumDescriptorProto(const EnumDescriptorProto& from)
3620   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
3621   EnumDescriptorProto* const _this = this; (void)_this;
3622   new (&_impl_) Impl_{
3623       decltype(_impl_._has_bits_){from._impl_._has_bits_}
3624     , /*decltype(_impl_._cached_size_)*/{}
3625     , decltype(_impl_.value_){from._impl_.value_}
3626     , decltype(_impl_.reserved_name_){from._impl_.reserved_name_}
3627     , decltype(_impl_.name_){}};
3628 
3629   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3630   _impl_.name_.InitDefault();
3631   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
3632     _impl_.name_.Set("", GetArenaForAllocation());
3633   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
3634   if (from._internal_has_name()) {
3635     _this->_impl_.name_.Set(from._internal_name(),
3636       _this->GetArenaForAllocation());
3637   }
3638   // @@protoc_insertion_point(copy_constructor:perfetto.protos.EnumDescriptorProto)
3639 }
3640 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)3641 inline void EnumDescriptorProto::SharedCtor(
3642     ::_pb::Arena* arena, bool is_message_owned) {
3643   (void)arena;
3644   (void)is_message_owned;
3645   new (&_impl_) Impl_{
3646       decltype(_impl_._has_bits_){}
3647     , /*decltype(_impl_._cached_size_)*/{}
3648     , decltype(_impl_.value_){arena}
3649     , decltype(_impl_.reserved_name_){arena}
3650     , decltype(_impl_.name_){}
3651   };
3652   _impl_.name_.InitDefault();
3653   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
3654     _impl_.name_.Set("", GetArenaForAllocation());
3655   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
3656 }
3657 
~EnumDescriptorProto()3658 EnumDescriptorProto::~EnumDescriptorProto() {
3659   // @@protoc_insertion_point(destructor:perfetto.protos.EnumDescriptorProto)
3660   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
3661   (void)arena;
3662     return;
3663   }
3664   SharedDtor();
3665 }
3666 
SharedDtor()3667 inline void EnumDescriptorProto::SharedDtor() {
3668   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
3669   _impl_.value_.~RepeatedPtrField();
3670   _impl_.reserved_name_.~RepeatedPtrField();
3671   _impl_.name_.Destroy();
3672 }
3673 
SetCachedSize(int size) const3674 void EnumDescriptorProto::SetCachedSize(int size) const {
3675   _impl_._cached_size_.Set(size);
3676 }
3677 
Clear()3678 void EnumDescriptorProto::Clear() {
3679 // @@protoc_insertion_point(message_clear_start:perfetto.protos.EnumDescriptorProto)
3680   ::uint32_t cached_has_bits = 0;
3681   // Prevent compiler warnings about cached_has_bits being unused
3682   (void) cached_has_bits;
3683 
3684   _impl_.value_.Clear();
3685   _impl_.reserved_name_.Clear();
3686   cached_has_bits = _impl_._has_bits_[0];
3687   if (cached_has_bits & 0x00000001u) {
3688     _impl_.name_.ClearNonDefaultToEmpty();
3689   }
3690   _impl_._has_bits_.Clear();
3691   _internal_metadata_.Clear<std::string>();
3692 }
3693 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)3694 const char* EnumDescriptorProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
3695 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
3696   _Internal::HasBits has_bits{};
3697   while (!ctx->Done(&ptr)) {
3698     ::uint32_t tag;
3699     ptr = ::_pbi::ReadTag(ptr, &tag);
3700     switch (tag >> 3) {
3701       // optional string name = 1;
3702       case 1:
3703         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
3704           auto str = _internal_mutable_name();
3705           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
3706           CHK_(ptr);
3707         } else {
3708           goto handle_unusual;
3709         }
3710         continue;
3711       // repeated .perfetto.protos.EnumValueDescriptorProto value = 2;
3712       case 2:
3713         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
3714           ptr -= 1;
3715           do {
3716             ptr += 1;
3717             ptr = ctx->ParseMessage(_internal_add_value(), ptr);
3718             CHK_(ptr);
3719             if (!ctx->DataAvailable(ptr)) break;
3720           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
3721         } else {
3722           goto handle_unusual;
3723         }
3724         continue;
3725       // repeated string reserved_name = 5;
3726       case 5:
3727         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
3728           ptr -= 1;
3729           do {
3730             ptr += 1;
3731             auto str = _internal_add_reserved_name();
3732             ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
3733             CHK_(ptr);
3734             if (!ctx->DataAvailable(ptr)) break;
3735           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<42>(ptr));
3736         } else {
3737           goto handle_unusual;
3738         }
3739         continue;
3740       default:
3741         goto handle_unusual;
3742     }  // switch
3743   handle_unusual:
3744     if ((tag == 0) || ((tag & 7) == 4)) {
3745       CHK_(ptr);
3746       ctx->SetLastTag(tag);
3747       goto message_done;
3748     }
3749     ptr = UnknownFieldParse(
3750         tag,
3751         _internal_metadata_.mutable_unknown_fields<std::string>(),
3752         ptr, ctx);
3753     CHK_(ptr != nullptr);
3754   }  // while
3755 message_done:
3756   _impl_._has_bits_.Or(has_bits);
3757   return ptr;
3758 failure:
3759   ptr = nullptr;
3760   goto message_done;
3761 #undef CHK_
3762 }
3763 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const3764 ::uint8_t* EnumDescriptorProto::_InternalSerialize(
3765     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
3766   // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.EnumDescriptorProto)
3767   ::uint32_t cached_has_bits = 0;
3768   (void) cached_has_bits;
3769 
3770   cached_has_bits = _impl_._has_bits_[0];
3771   // optional string name = 1;
3772   if (cached_has_bits & 0x00000001u) {
3773     target = stream->WriteStringMaybeAliased(
3774         1, this->_internal_name(), target);
3775   }
3776 
3777   // repeated .perfetto.protos.EnumValueDescriptorProto value = 2;
3778   for (unsigned i = 0,
3779       n = static_cast<unsigned>(this->_internal_value_size()); i < n; i++) {
3780     const auto& repfield = this->_internal_value(i);
3781     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
3782         InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream);
3783   }
3784 
3785   // repeated string reserved_name = 5;
3786   for (int i = 0, n = this->_internal_reserved_name_size(); i < n; i++) {
3787     const auto& s = this->_internal_reserved_name(i);
3788     target = stream->WriteString(5, s, target);
3789   }
3790 
3791   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3792     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
3793         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
3794   }
3795   // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.EnumDescriptorProto)
3796   return target;
3797 }
3798 
ByteSizeLong() const3799 size_t EnumDescriptorProto::ByteSizeLong() const {
3800 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.EnumDescriptorProto)
3801   size_t total_size = 0;
3802 
3803   ::uint32_t cached_has_bits = 0;
3804   // Prevent compiler warnings about cached_has_bits being unused
3805   (void) cached_has_bits;
3806 
3807   // repeated .perfetto.protos.EnumValueDescriptorProto value = 2;
3808   total_size += 1UL * this->_internal_value_size();
3809   for (const auto& msg : this->_impl_.value_) {
3810     total_size +=
3811       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
3812   }
3813 
3814   // repeated string reserved_name = 5;
3815   total_size += 1 *
3816       ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.reserved_name_.size());
3817   for (int i = 0, n = _impl_.reserved_name_.size(); i < n; i++) {
3818     total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
3819       _impl_.reserved_name_.Get(i));
3820   }
3821 
3822   // optional string name = 1;
3823   cached_has_bits = _impl_._has_bits_[0];
3824   if (cached_has_bits & 0x00000001u) {
3825     total_size += 1 +
3826       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
3827         this->_internal_name());
3828   }
3829 
3830   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3831     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
3832   }
3833   int cached_size = ::_pbi::ToCachedSize(total_size);
3834   SetCachedSize(cached_size);
3835   return total_size;
3836 }
3837 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)3838 void EnumDescriptorProto::CheckTypeAndMergeFrom(
3839     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
3840   MergeFrom(*::_pbi::DownCast<const EnumDescriptorProto*>(
3841       &from));
3842 }
3843 
MergeFrom(const EnumDescriptorProto & from)3844 void EnumDescriptorProto::MergeFrom(const EnumDescriptorProto& from) {
3845   EnumDescriptorProto* const _this = this;
3846   // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.EnumDescriptorProto)
3847   GOOGLE_DCHECK_NE(&from, _this);
3848   ::uint32_t cached_has_bits = 0;
3849   (void) cached_has_bits;
3850 
3851   _this->_impl_.value_.MergeFrom(from._impl_.value_);
3852   _this->_impl_.reserved_name_.MergeFrom(from._impl_.reserved_name_);
3853   if (from._internal_has_name()) {
3854     _this->_internal_set_name(from._internal_name());
3855   }
3856   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3857 }
3858 
CopyFrom(const EnumDescriptorProto & from)3859 void EnumDescriptorProto::CopyFrom(const EnumDescriptorProto& from) {
3860 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.EnumDescriptorProto)
3861   if (&from == this) return;
3862   Clear();
3863   MergeFrom(from);
3864 }
3865 
IsInitialized() const3866 bool EnumDescriptorProto::IsInitialized() const {
3867   return true;
3868 }
3869 
InternalSwap(EnumDescriptorProto * other)3870 void EnumDescriptorProto::InternalSwap(EnumDescriptorProto* other) {
3871   using std::swap;
3872   auto* lhs_arena = GetArenaForAllocation();
3873   auto* rhs_arena = other->GetArenaForAllocation();
3874   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
3875   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
3876   _impl_.value_.InternalSwap(&other->_impl_.value_);
3877   _impl_.reserved_name_.InternalSwap(&other->_impl_.reserved_name_);
3878   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
3879       &_impl_.name_, lhs_arena,
3880       &other->_impl_.name_, rhs_arena
3881   );
3882 }
3883 
GetTypeName() const3884 std::string EnumDescriptorProto::GetTypeName() const {
3885   return "perfetto.protos.EnumDescriptorProto";
3886 }
3887 
3888 
3889 // ===================================================================
3890 
3891 class EnumValueDescriptorProto::_Internal {
3892  public:
3893   using HasBits = decltype(std::declval<EnumValueDescriptorProto>()._impl_._has_bits_);
set_has_name(HasBits * has_bits)3894   static void set_has_name(HasBits* has_bits) {
3895     (*has_bits)[0] |= 1u;
3896   }
set_has_number(HasBits * has_bits)3897   static void set_has_number(HasBits* has_bits) {
3898     (*has_bits)[0] |= 2u;
3899   }
3900 };
3901 
EnumValueDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)3902 EnumValueDescriptorProto::EnumValueDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
3903                          bool is_message_owned)
3904   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
3905   SharedCtor(arena, is_message_owned);
3906   // @@protoc_insertion_point(arena_constructor:perfetto.protos.EnumValueDescriptorProto)
3907 }
EnumValueDescriptorProto(const EnumValueDescriptorProto & from)3908 EnumValueDescriptorProto::EnumValueDescriptorProto(const EnumValueDescriptorProto& from)
3909   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
3910   EnumValueDescriptorProto* const _this = this; (void)_this;
3911   new (&_impl_) Impl_{
3912       decltype(_impl_._has_bits_){from._impl_._has_bits_}
3913     , /*decltype(_impl_._cached_size_)*/{}
3914     , decltype(_impl_.name_){}
3915     , decltype(_impl_.number_){}};
3916 
3917   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3918   _impl_.name_.InitDefault();
3919   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
3920     _impl_.name_.Set("", GetArenaForAllocation());
3921   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
3922   if (from._internal_has_name()) {
3923     _this->_impl_.name_.Set(from._internal_name(),
3924       _this->GetArenaForAllocation());
3925   }
3926   _this->_impl_.number_ = from._impl_.number_;
3927   // @@protoc_insertion_point(copy_constructor:perfetto.protos.EnumValueDescriptorProto)
3928 }
3929 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)3930 inline void EnumValueDescriptorProto::SharedCtor(
3931     ::_pb::Arena* arena, bool is_message_owned) {
3932   (void)arena;
3933   (void)is_message_owned;
3934   new (&_impl_) Impl_{
3935       decltype(_impl_._has_bits_){}
3936     , /*decltype(_impl_._cached_size_)*/{}
3937     , decltype(_impl_.name_){}
3938     , decltype(_impl_.number_){0}
3939   };
3940   _impl_.name_.InitDefault();
3941   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
3942     _impl_.name_.Set("", GetArenaForAllocation());
3943   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
3944 }
3945 
~EnumValueDescriptorProto()3946 EnumValueDescriptorProto::~EnumValueDescriptorProto() {
3947   // @@protoc_insertion_point(destructor:perfetto.protos.EnumValueDescriptorProto)
3948   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
3949   (void)arena;
3950     return;
3951   }
3952   SharedDtor();
3953 }
3954 
SharedDtor()3955 inline void EnumValueDescriptorProto::SharedDtor() {
3956   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
3957   _impl_.name_.Destroy();
3958 }
3959 
SetCachedSize(int size) const3960 void EnumValueDescriptorProto::SetCachedSize(int size) const {
3961   _impl_._cached_size_.Set(size);
3962 }
3963 
Clear()3964 void EnumValueDescriptorProto::Clear() {
3965 // @@protoc_insertion_point(message_clear_start:perfetto.protos.EnumValueDescriptorProto)
3966   ::uint32_t cached_has_bits = 0;
3967   // Prevent compiler warnings about cached_has_bits being unused
3968   (void) cached_has_bits;
3969 
3970   cached_has_bits = _impl_._has_bits_[0];
3971   if (cached_has_bits & 0x00000001u) {
3972     _impl_.name_.ClearNonDefaultToEmpty();
3973   }
3974   _impl_.number_ = 0;
3975   _impl_._has_bits_.Clear();
3976   _internal_metadata_.Clear<std::string>();
3977 }
3978 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)3979 const char* EnumValueDescriptorProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
3980 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
3981   _Internal::HasBits has_bits{};
3982   while (!ctx->Done(&ptr)) {
3983     ::uint32_t tag;
3984     ptr = ::_pbi::ReadTag(ptr, &tag);
3985     switch (tag >> 3) {
3986       // optional string name = 1;
3987       case 1:
3988         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
3989           auto str = _internal_mutable_name();
3990           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
3991           CHK_(ptr);
3992         } else {
3993           goto handle_unusual;
3994         }
3995         continue;
3996       // optional int32 number = 2;
3997       case 2:
3998         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
3999           _Internal::set_has_number(&has_bits);
4000           _impl_.number_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
4001           CHK_(ptr);
4002         } else {
4003           goto handle_unusual;
4004         }
4005         continue;
4006       default:
4007         goto handle_unusual;
4008     }  // switch
4009   handle_unusual:
4010     if ((tag == 0) || ((tag & 7) == 4)) {
4011       CHK_(ptr);
4012       ctx->SetLastTag(tag);
4013       goto message_done;
4014     }
4015     ptr = UnknownFieldParse(
4016         tag,
4017         _internal_metadata_.mutable_unknown_fields<std::string>(),
4018         ptr, ctx);
4019     CHK_(ptr != nullptr);
4020   }  // while
4021 message_done:
4022   _impl_._has_bits_.Or(has_bits);
4023   return ptr;
4024 failure:
4025   ptr = nullptr;
4026   goto message_done;
4027 #undef CHK_
4028 }
4029 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const4030 ::uint8_t* EnumValueDescriptorProto::_InternalSerialize(
4031     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
4032   // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.EnumValueDescriptorProto)
4033   ::uint32_t cached_has_bits = 0;
4034   (void) cached_has_bits;
4035 
4036   cached_has_bits = _impl_._has_bits_[0];
4037   // optional string name = 1;
4038   if (cached_has_bits & 0x00000001u) {
4039     target = stream->WriteStringMaybeAliased(
4040         1, this->_internal_name(), target);
4041   }
4042 
4043   // optional int32 number = 2;
4044   if (cached_has_bits & 0x00000002u) {
4045     target = stream->EnsureSpace(target);
4046     target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_number(), target);
4047   }
4048 
4049   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
4050     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
4051         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
4052   }
4053   // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.EnumValueDescriptorProto)
4054   return target;
4055 }
4056 
ByteSizeLong() const4057 size_t EnumValueDescriptorProto::ByteSizeLong() const {
4058 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.EnumValueDescriptorProto)
4059   size_t total_size = 0;
4060 
4061   ::uint32_t cached_has_bits = 0;
4062   // Prevent compiler warnings about cached_has_bits being unused
4063   (void) cached_has_bits;
4064 
4065   cached_has_bits = _impl_._has_bits_[0];
4066   if (cached_has_bits & 0x00000003u) {
4067     // optional string name = 1;
4068     if (cached_has_bits & 0x00000001u) {
4069       total_size += 1 +
4070         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
4071           this->_internal_name());
4072     }
4073 
4074     // optional int32 number = 2;
4075     if (cached_has_bits & 0x00000002u) {
4076       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_number());
4077     }
4078 
4079   }
4080   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
4081     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
4082   }
4083   int cached_size = ::_pbi::ToCachedSize(total_size);
4084   SetCachedSize(cached_size);
4085   return total_size;
4086 }
4087 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)4088 void EnumValueDescriptorProto::CheckTypeAndMergeFrom(
4089     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
4090   MergeFrom(*::_pbi::DownCast<const EnumValueDescriptorProto*>(
4091       &from));
4092 }
4093 
MergeFrom(const EnumValueDescriptorProto & from)4094 void EnumValueDescriptorProto::MergeFrom(const EnumValueDescriptorProto& from) {
4095   EnumValueDescriptorProto* const _this = this;
4096   // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.EnumValueDescriptorProto)
4097   GOOGLE_DCHECK_NE(&from, _this);
4098   ::uint32_t cached_has_bits = 0;
4099   (void) cached_has_bits;
4100 
4101   cached_has_bits = from._impl_._has_bits_[0];
4102   if (cached_has_bits & 0x00000003u) {
4103     if (cached_has_bits & 0x00000001u) {
4104       _this->_internal_set_name(from._internal_name());
4105     }
4106     if (cached_has_bits & 0x00000002u) {
4107       _this->_impl_.number_ = from._impl_.number_;
4108     }
4109     _this->_impl_._has_bits_[0] |= cached_has_bits;
4110   }
4111   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
4112 }
4113 
CopyFrom(const EnumValueDescriptorProto & from)4114 void EnumValueDescriptorProto::CopyFrom(const EnumValueDescriptorProto& from) {
4115 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.EnumValueDescriptorProto)
4116   if (&from == this) return;
4117   Clear();
4118   MergeFrom(from);
4119 }
4120 
IsInitialized() const4121 bool EnumValueDescriptorProto::IsInitialized() const {
4122   return true;
4123 }
4124 
InternalSwap(EnumValueDescriptorProto * other)4125 void EnumValueDescriptorProto::InternalSwap(EnumValueDescriptorProto* other) {
4126   using std::swap;
4127   auto* lhs_arena = GetArenaForAllocation();
4128   auto* rhs_arena = other->GetArenaForAllocation();
4129   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
4130   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
4131   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
4132       &_impl_.name_, lhs_arena,
4133       &other->_impl_.name_, rhs_arena
4134   );
4135   swap(_impl_.number_, other->_impl_.number_);
4136 }
4137 
GetTypeName() const4138 std::string EnumValueDescriptorProto::GetTypeName() const {
4139   return "perfetto.protos.EnumValueDescriptorProto";
4140 }
4141 
4142 
4143 // ===================================================================
4144 
4145 class OneofOptions::_Internal {
4146  public:
4147 };
4148 
OneofOptions(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)4149 OneofOptions::OneofOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena,
4150                          bool is_message_owned)
4151   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
4152   SharedCtor(arena, is_message_owned);
4153   // @@protoc_insertion_point(arena_constructor:perfetto.protos.OneofOptions)
4154 }
OneofOptions(const OneofOptions & from)4155 OneofOptions::OneofOptions(const OneofOptions& from)
4156   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
4157   OneofOptions* const _this = this; (void)_this;
4158   new (&_impl_) Impl_{
4159       /*decltype(_impl_._extensions_)*/{}
4160     , /*decltype(_impl_._cached_size_)*/{}};
4161 
4162   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
4163   _impl_._extensions_.MergeFrom(internal_default_instance(), from._impl_._extensions_);
4164   // @@protoc_insertion_point(copy_constructor:perfetto.protos.OneofOptions)
4165 }
4166 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)4167 inline void OneofOptions::SharedCtor(
4168     ::_pb::Arena* arena, bool is_message_owned) {
4169   (void)arena;
4170   (void)is_message_owned;
4171   new (&_impl_) Impl_{
4172       /*decltype(_impl_._extensions_)*/{::_pbi::ArenaInitialized(), arena}
4173     , /*decltype(_impl_._cached_size_)*/{}
4174   };
4175 }
4176 
~OneofOptions()4177 OneofOptions::~OneofOptions() {
4178   // @@protoc_insertion_point(destructor:perfetto.protos.OneofOptions)
4179   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
4180   (void)arena;
4181     return;
4182   }
4183   SharedDtor();
4184 }
4185 
SharedDtor()4186 inline void OneofOptions::SharedDtor() {
4187   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
4188   _impl_._extensions_.~ExtensionSet();
4189 }
4190 
SetCachedSize(int size) const4191 void OneofOptions::SetCachedSize(int size) const {
4192   _impl_._cached_size_.Set(size);
4193 }
4194 
Clear()4195 void OneofOptions::Clear() {
4196 // @@protoc_insertion_point(message_clear_start:perfetto.protos.OneofOptions)
4197   ::uint32_t cached_has_bits = 0;
4198   // Prevent compiler warnings about cached_has_bits being unused
4199   (void) cached_has_bits;
4200 
4201   _impl_._extensions_.Clear();
4202   _internal_metadata_.Clear<std::string>();
4203 }
4204 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)4205 const char* OneofOptions::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
4206 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
4207   while (!ctx->Done(&ptr)) {
4208     ::uint32_t tag;
4209     ptr = ::_pbi::ReadTag(ptr, &tag);
4210     if ((tag == 0) || ((tag & 7) == 4)) {
4211       CHK_(ptr);
4212       ctx->SetLastTag(tag);
4213       goto message_done;
4214     }
4215     if ((8000u <= tag)) {
4216       ptr = _impl_._extensions_.ParseField(tag, ptr, internal_default_instance(), &_internal_metadata_, ctx);
4217       CHK_(ptr != nullptr);
4218       continue;
4219     }
4220     ptr = UnknownFieldParse(
4221         tag,
4222         _internal_metadata_.mutable_unknown_fields<std::string>(),
4223         ptr, ctx);
4224     CHK_(ptr != nullptr);
4225   }  // while
4226 message_done:
4227   return ptr;
4228 failure:
4229   ptr = nullptr;
4230   goto message_done;
4231 #undef CHK_
4232 }
4233 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const4234 ::uint8_t* OneofOptions::_InternalSerialize(
4235     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
4236   // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.OneofOptions)
4237   ::uint32_t cached_has_bits = 0;
4238   (void) cached_has_bits;
4239 
4240   // Extension range [1000, 536870912)
4241   target = _impl_._extensions_._InternalSerialize(
4242   internal_default_instance(), 1000, 536870912, target, stream);
4243 
4244   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
4245     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
4246         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
4247   }
4248   // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.OneofOptions)
4249   return target;
4250 }
4251 
ByteSizeLong() const4252 size_t OneofOptions::ByteSizeLong() const {
4253 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.OneofOptions)
4254   size_t total_size = 0;
4255 
4256   total_size += _impl_._extensions_.ByteSize();
4257 
4258   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
4259     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
4260   }
4261   int cached_size = ::_pbi::ToCachedSize(total_size);
4262   SetCachedSize(cached_size);
4263   return total_size;
4264 }
4265 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)4266 void OneofOptions::CheckTypeAndMergeFrom(
4267     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
4268   MergeFrom(*::_pbi::DownCast<const OneofOptions*>(
4269       &from));
4270 }
4271 
MergeFrom(const OneofOptions & from)4272 void OneofOptions::MergeFrom(const OneofOptions& from) {
4273   OneofOptions* const _this = this;
4274   // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.OneofOptions)
4275   GOOGLE_DCHECK_NE(&from, _this);
4276   ::uint32_t cached_has_bits = 0;
4277   (void) cached_has_bits;
4278 
4279   _this->_impl_._extensions_.MergeFrom(internal_default_instance(), from._impl_._extensions_);
4280   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
4281 }
4282 
CopyFrom(const OneofOptions & from)4283 void OneofOptions::CopyFrom(const OneofOptions& from) {
4284 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.OneofOptions)
4285   if (&from == this) return;
4286   Clear();
4287   MergeFrom(from);
4288 }
4289 
IsInitialized() const4290 bool OneofOptions::IsInitialized() const {
4291   if (!_impl_._extensions_.IsInitialized()) {
4292     return false;
4293   }
4294 
4295   return true;
4296 }
4297 
InternalSwap(OneofOptions * other)4298 void OneofOptions::InternalSwap(OneofOptions* other) {
4299   using std::swap;
4300   _impl_._extensions_.InternalSwap(&other->_impl_._extensions_);
4301   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
4302 }
4303 
GetTypeName() const4304 std::string OneofOptions::GetTypeName() const {
4305   return "perfetto.protos.OneofOptions";
4306 }
4307 
4308 
4309 // @@protoc_insertion_point(namespace_scope)
4310 }  // namespace protos
4311 }  // namespace perfetto
4312 PROTOBUF_NAMESPACE_OPEN
4313 template<> PROTOBUF_NOINLINE ::perfetto::protos::FileDescriptorSet*
CreateMaybeMessage(Arena * arena)4314 Arena::CreateMaybeMessage< ::perfetto::protos::FileDescriptorSet >(Arena* arena) {
4315   return Arena::CreateMessageInternal< ::perfetto::protos::FileDescriptorSet >(arena);
4316 }
4317 template<> PROTOBUF_NOINLINE ::perfetto::protos::FileDescriptorProto*
CreateMaybeMessage(Arena * arena)4318 Arena::CreateMaybeMessage< ::perfetto::protos::FileDescriptorProto >(Arena* arena) {
4319   return Arena::CreateMessageInternal< ::perfetto::protos::FileDescriptorProto >(arena);
4320 }
4321 template<> PROTOBUF_NOINLINE ::perfetto::protos::DescriptorProto_ReservedRange*
CreateMaybeMessage(Arena * arena)4322 Arena::CreateMaybeMessage< ::perfetto::protos::DescriptorProto_ReservedRange >(Arena* arena) {
4323   return Arena::CreateMessageInternal< ::perfetto::protos::DescriptorProto_ReservedRange >(arena);
4324 }
4325 template<> PROTOBUF_NOINLINE ::perfetto::protos::DescriptorProto*
CreateMaybeMessage(Arena * arena)4326 Arena::CreateMaybeMessage< ::perfetto::protos::DescriptorProto >(Arena* arena) {
4327   return Arena::CreateMessageInternal< ::perfetto::protos::DescriptorProto >(arena);
4328 }
4329 template<> PROTOBUF_NOINLINE ::perfetto::protos::UninterpretedOption_NamePart*
CreateMaybeMessage(Arena * arena)4330 Arena::CreateMaybeMessage< ::perfetto::protos::UninterpretedOption_NamePart >(Arena* arena) {
4331   return Arena::CreateMessageInternal< ::perfetto::protos::UninterpretedOption_NamePart >(arena);
4332 }
4333 template<> PROTOBUF_NOINLINE ::perfetto::protos::UninterpretedOption*
CreateMaybeMessage(Arena * arena)4334 Arena::CreateMaybeMessage< ::perfetto::protos::UninterpretedOption >(Arena* arena) {
4335   return Arena::CreateMessageInternal< ::perfetto::protos::UninterpretedOption >(arena);
4336 }
4337 template<> PROTOBUF_NOINLINE ::perfetto::protos::FieldOptions*
CreateMaybeMessage(Arena * arena)4338 Arena::CreateMaybeMessage< ::perfetto::protos::FieldOptions >(Arena* arena) {
4339   return Arena::CreateMessageInternal< ::perfetto::protos::FieldOptions >(arena);
4340 }
4341 template<> PROTOBUF_NOINLINE ::perfetto::protos::FieldDescriptorProto*
CreateMaybeMessage(Arena * arena)4342 Arena::CreateMaybeMessage< ::perfetto::protos::FieldDescriptorProto >(Arena* arena) {
4343   return Arena::CreateMessageInternal< ::perfetto::protos::FieldDescriptorProto >(arena);
4344 }
4345 template<> PROTOBUF_NOINLINE ::perfetto::protos::OneofDescriptorProto*
CreateMaybeMessage(Arena * arena)4346 Arena::CreateMaybeMessage< ::perfetto::protos::OneofDescriptorProto >(Arena* arena) {
4347   return Arena::CreateMessageInternal< ::perfetto::protos::OneofDescriptorProto >(arena);
4348 }
4349 template<> PROTOBUF_NOINLINE ::perfetto::protos::EnumDescriptorProto*
CreateMaybeMessage(Arena * arena)4350 Arena::CreateMaybeMessage< ::perfetto::protos::EnumDescriptorProto >(Arena* arena) {
4351   return Arena::CreateMessageInternal< ::perfetto::protos::EnumDescriptorProto >(arena);
4352 }
4353 template<> PROTOBUF_NOINLINE ::perfetto::protos::EnumValueDescriptorProto*
CreateMaybeMessage(Arena * arena)4354 Arena::CreateMaybeMessage< ::perfetto::protos::EnumValueDescriptorProto >(Arena* arena) {
4355   return Arena::CreateMessageInternal< ::perfetto::protos::EnumValueDescriptorProto >(arena);
4356 }
4357 template<> PROTOBUF_NOINLINE ::perfetto::protos::OneofOptions*
CreateMaybeMessage(Arena * arena)4358 Arena::CreateMaybeMessage< ::perfetto::protos::OneofOptions >(Arena* arena) {
4359   return Arena::CreateMessageInternal< ::perfetto::protos::OneofOptions >(arena);
4360 }
4361 PROTOBUF_NAMESPACE_CLOSE
4362 
4363 // @@protoc_insertion_point(global_scope)
4364 #include <google/protobuf/port_undef.inc>
4365