Line | Count | Source (jump to first uncovered line) |
1 | | // Generated by the protocol buffer compiler. DO NOT EDIT! |
2 | | // source: bloaty.proto |
3 | | |
4 | | #include "bloaty.pb.h" |
5 | | |
6 | | #include <algorithm> |
7 | | |
8 | | #include <google/protobuf/io/coded_stream.h> |
9 | | #include <google/protobuf/extension_set.h> |
10 | | #include <google/protobuf/wire_format_lite.h> |
11 | | #include <google/protobuf/descriptor.h> |
12 | | #include <google/protobuf/generated_message_reflection.h> |
13 | | #include <google/protobuf/reflection_ops.h> |
14 | | #include <google/protobuf/wire_format.h> |
15 | | // @@protoc_insertion_point(includes) |
16 | | #include <google/protobuf/port_def.inc> |
17 | | extern PROTOBUF_INTERNAL_EXPORT_bloaty_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_CustomDataSource_bloaty_2eproto; |
18 | | extern PROTOBUF_INTERNAL_EXPORT_bloaty_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Regex_bloaty_2eproto; |
19 | | namespace bloaty { |
20 | | class OptionsDefaultTypeInternal { |
21 | | public: |
22 | | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Options> _instance; |
23 | | } _Options_default_instance_; |
24 | | class CustomDataSourceDefaultTypeInternal { |
25 | | public: |
26 | | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<CustomDataSource> _instance; |
27 | | } _CustomDataSource_default_instance_; |
28 | | class RegexDefaultTypeInternal { |
29 | | public: |
30 | | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Regex> _instance; |
31 | | } _Regex_default_instance_; |
32 | | } // namespace bloaty |
33 | 4.20k | static void InitDefaultsscc_info_CustomDataSource_bloaty_2eproto() { |
34 | 4.20k | GOOGLE_PROTOBUF_VERIFY_VERSION; |
35 | | |
36 | 4.20k | { |
37 | 4.20k | void* ptr = &::bloaty::_CustomDataSource_default_instance_; |
38 | 4.20k | new (ptr) ::bloaty::CustomDataSource(); |
39 | 4.20k | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
40 | 4.20k | } |
41 | 4.20k | ::bloaty::CustomDataSource::InitAsDefaultInstance(); |
42 | 4.20k | } |
43 | | |
44 | | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_CustomDataSource_bloaty_2eproto = |
45 | | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_CustomDataSource_bloaty_2eproto}, { |
46 | | &scc_info_Regex_bloaty_2eproto.base,}}; |
47 | | |
48 | 4.20k | static void InitDefaultsscc_info_Options_bloaty_2eproto() { |
49 | 4.20k | GOOGLE_PROTOBUF_VERIFY_VERSION; |
50 | | |
51 | 4.20k | { |
52 | 4.20k | void* ptr = &::bloaty::_Options_default_instance_; |
53 | 4.20k | new (ptr) ::bloaty::Options(); |
54 | 4.20k | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
55 | 4.20k | } |
56 | 4.20k | ::bloaty::Options::InitAsDefaultInstance(); |
57 | 4.20k | } |
58 | | |
59 | | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Options_bloaty_2eproto = |
60 | | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_Options_bloaty_2eproto}, { |
61 | | &scc_info_CustomDataSource_bloaty_2eproto.base,}}; |
62 | | |
63 | 4.20k | static void InitDefaultsscc_info_Regex_bloaty_2eproto() { |
64 | 4.20k | GOOGLE_PROTOBUF_VERIFY_VERSION; |
65 | | |
66 | 4.20k | { |
67 | 4.20k | void* ptr = &::bloaty::_Regex_default_instance_; |
68 | 4.20k | new (ptr) ::bloaty::Regex(); |
69 | 4.20k | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
70 | 4.20k | } |
71 | 4.20k | ::bloaty::Regex::InitAsDefaultInstance(); |
72 | 4.20k | } |
73 | | |
74 | | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Regex_bloaty_2eproto = |
75 | | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Regex_bloaty_2eproto}, {}}; |
76 | | |
77 | | static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_bloaty_2eproto[3]; |
78 | | static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_bloaty_2eproto[2]; |
79 | | static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_bloaty_2eproto = nullptr; |
80 | | |
81 | | const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_bloaty_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { |
82 | | PROTOBUF_FIELD_OFFSET(::bloaty::Options, _has_bits_), |
83 | | PROTOBUF_FIELD_OFFSET(::bloaty::Options, _internal_metadata_), |
84 | | ~0u, // no _extensions_ |
85 | | ~0u, // no _oneof_case_ |
86 | | ~0u, // no _weak_field_map_ |
87 | | PROTOBUF_FIELD_OFFSET(::bloaty::Options, filename_), |
88 | | PROTOBUF_FIELD_OFFSET(::bloaty::Options, base_filename_), |
89 | | PROTOBUF_FIELD_OFFSET(::bloaty::Options, debug_filename_), |
90 | | PROTOBUF_FIELD_OFFSET(::bloaty::Options, data_source_), |
91 | | PROTOBUF_FIELD_OFFSET(::bloaty::Options, max_rows_per_level_), |
92 | | PROTOBUF_FIELD_OFFSET(::bloaty::Options, demangle_), |
93 | | PROTOBUF_FIELD_OFFSET(::bloaty::Options, sort_by_), |
94 | | PROTOBUF_FIELD_OFFSET(::bloaty::Options, verbose_level_), |
95 | | PROTOBUF_FIELD_OFFSET(::bloaty::Options, debug_vmaddr_), |
96 | | PROTOBUF_FIELD_OFFSET(::bloaty::Options, debug_fileoff_), |
97 | | PROTOBUF_FIELD_OFFSET(::bloaty::Options, custom_data_source_), |
98 | | PROTOBUF_FIELD_OFFSET(::bloaty::Options, disassemble_function_), |
99 | | PROTOBUF_FIELD_OFFSET(::bloaty::Options, source_filter_), |
100 | | PROTOBUF_FIELD_OFFSET(::bloaty::Options, dump_raw_map_), |
101 | | ~0u, |
102 | | ~0u, |
103 | | ~0u, |
104 | | ~0u, |
105 | | 8, |
106 | | 2, |
107 | | 3, |
108 | | 4, |
109 | | 6, |
110 | | 7, |
111 | | ~0u, |
112 | | 0, |
113 | | 1, |
114 | | 5, |
115 | | PROTOBUF_FIELD_OFFSET(::bloaty::CustomDataSource, _has_bits_), |
116 | | PROTOBUF_FIELD_OFFSET(::bloaty::CustomDataSource, _internal_metadata_), |
117 | | ~0u, // no _extensions_ |
118 | | ~0u, // no _oneof_case_ |
119 | | ~0u, // no _weak_field_map_ |
120 | | PROTOBUF_FIELD_OFFSET(::bloaty::CustomDataSource, name_), |
121 | | PROTOBUF_FIELD_OFFSET(::bloaty::CustomDataSource, base_data_source_), |
122 | | PROTOBUF_FIELD_OFFSET(::bloaty::CustomDataSource, rewrite_), |
123 | | 0, |
124 | | 1, |
125 | | ~0u, |
126 | | PROTOBUF_FIELD_OFFSET(::bloaty::Regex, _has_bits_), |
127 | | PROTOBUF_FIELD_OFFSET(::bloaty::Regex, _internal_metadata_), |
128 | | ~0u, // no _extensions_ |
129 | | ~0u, // no _oneof_case_ |
130 | | ~0u, // no _weak_field_map_ |
131 | | PROTOBUF_FIELD_OFFSET(::bloaty::Regex, pattern_), |
132 | | PROTOBUF_FIELD_OFFSET(::bloaty::Regex, replacement_), |
133 | | 0, |
134 | | 1, |
135 | | }; |
136 | | static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { |
137 | | { 0, 19, sizeof(::bloaty::Options)}, |
138 | | { 33, 41, sizeof(::bloaty::CustomDataSource)}, |
139 | | { 44, 51, sizeof(::bloaty::Regex)}, |
140 | | }; |
141 | | |
142 | | static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { |
143 | | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::bloaty::_Options_default_instance_), |
144 | | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::bloaty::_CustomDataSource_default_instance_), |
145 | | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::bloaty::_Regex_default_instance_), |
146 | | }; |
147 | | |
148 | | const char descriptor_table_protodef_bloaty_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = |
149 | | "\n\014bloaty.proto\022\006bloaty\"\277\004\n\007Options\022\020\n\010fi" |
150 | | "lename\030\001 \003(\t\022\025\n\rbase_filename\030\002 \003(\t\022\026\n\016d" |
151 | | "ebug_filename\030\n \003(\t\022\023\n\013data_source\030\003 \003(\t" |
152 | | "\022\036\n\022max_rows_per_level\030\004 \001(\003:\00220\022:\n\010dema" |
153 | | "ngle\030\005 \001(\0162\030.bloaty.Options.Demangle:\016DE" |
154 | | "MANGLE_SHORT\0224\n\007sort_by\030\006 \001(\0162\026.bloaty.O" |
155 | | "ptions.SortBy:\013SORTBY_BOTH\022\025\n\rverbose_le" |
156 | | "vel\030\007 \001(\005\022\024\n\014debug_vmaddr\030\013 \001(\004\022\025\n\rdebug" |
157 | | "_fileoff\030\014 \001(\004\0224\n\022custom_data_source\030\010 \003" |
158 | | "(\0132\030.bloaty.CustomDataSource\022\034\n\024disassem" |
159 | | "ble_function\030\t \001(\t\022\025\n\rsource_filter\030\r \001(" |
160 | | "\t\022\024\n\014dump_raw_map\030\016 \001(\010\"D\n\010Demangle\022\022\n\016D" |
161 | | "EMANGLE_SHORT\020\000\022\021\n\rDEMANGLE_FULL\020\001\022\021\n\rDE" |
162 | | "MANGLE_NONE\020\002\"A\n\006SortBy\022\017\n\013SORTBY_BOTH\020\000" |
163 | | "\022\021\n\rSORTBY_VMSIZE\020\001\022\023\n\017SORTBY_FILESIZE\020\002" |
164 | | "\"Z\n\020CustomDataSource\022\014\n\004name\030\001 \001(\t\022\030\n\020ba" |
165 | | "se_data_source\030\002 \001(\t\022\036\n\007rewrite\030\003 \003(\0132\r." |
166 | | "bloaty.Regex\"-\n\005Regex\022\017\n\007pattern\030\001 \001(\t\022\023" |
167 | | "\n\013replacement\030\002 \001(\t" |
168 | | ; |
169 | | static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_bloaty_2eproto_deps[1] = { |
170 | | }; |
171 | | static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_bloaty_2eproto_sccs[3] = { |
172 | | &scc_info_CustomDataSource_bloaty_2eproto.base, |
173 | | &scc_info_Options_bloaty_2eproto.base, |
174 | | &scc_info_Regex_bloaty_2eproto.base, |
175 | | }; |
176 | | static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_bloaty_2eproto_once; |
177 | | static bool descriptor_table_bloaty_2eproto_initialized = false; |
178 | | const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_bloaty_2eproto = { |
179 | | &descriptor_table_bloaty_2eproto_initialized, descriptor_table_protodef_bloaty_2eproto, "bloaty.proto", 739, |
180 | | &descriptor_table_bloaty_2eproto_once, descriptor_table_bloaty_2eproto_sccs, descriptor_table_bloaty_2eproto_deps, 3, 0, |
181 | | schemas, file_default_instances, TableStruct_bloaty_2eproto::offsets, |
182 | | file_level_metadata_bloaty_2eproto, 3, file_level_enum_descriptors_bloaty_2eproto, file_level_service_descriptors_bloaty_2eproto, |
183 | | }; |
184 | | |
185 | | // Force running AddDescriptors() at dynamic initialization time. |
186 | | static bool dynamic_init_dummy_bloaty_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_bloaty_2eproto), true); |
187 | | namespace bloaty { |
188 | 0 | const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* Options_Demangle_descriptor() { |
189 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_bloaty_2eproto); |
190 | 0 | return file_level_enum_descriptors_bloaty_2eproto[0]; |
191 | 0 | } |
192 | 0 | bool Options_Demangle_IsValid(int value) { |
193 | 0 | switch (value) { |
194 | 0 | case 0: |
195 | 0 | case 1: |
196 | 0 | case 2: |
197 | 0 | return true; |
198 | 0 | default: |
199 | 0 | return false; |
200 | 0 | } |
201 | 0 | } |
202 | | |
203 | | #if (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900) |
204 | | constexpr Options_Demangle Options::DEMANGLE_SHORT; |
205 | | constexpr Options_Demangle Options::DEMANGLE_FULL; |
206 | | constexpr Options_Demangle Options::DEMANGLE_NONE; |
207 | | constexpr Options_Demangle Options::Demangle_MIN; |
208 | | constexpr Options_Demangle Options::Demangle_MAX; |
209 | | constexpr int Options::Demangle_ARRAYSIZE; |
210 | | #endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900) |
211 | 0 | const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* Options_SortBy_descriptor() { |
212 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_bloaty_2eproto); |
213 | 0 | return file_level_enum_descriptors_bloaty_2eproto[1]; |
214 | 0 | } |
215 | 0 | bool Options_SortBy_IsValid(int value) { |
216 | 0 | switch (value) { |
217 | 0 | case 0: |
218 | 0 | case 1: |
219 | 0 | case 2: |
220 | 0 | return true; |
221 | 0 | default: |
222 | 0 | return false; |
223 | 0 | } |
224 | 0 | } |
225 | | |
226 | | #if (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900) |
227 | | constexpr Options_SortBy Options::SORTBY_BOTH; |
228 | | constexpr Options_SortBy Options::SORTBY_VMSIZE; |
229 | | constexpr Options_SortBy Options::SORTBY_FILESIZE; |
230 | | constexpr Options_SortBy Options::SortBy_MIN; |
231 | | constexpr Options_SortBy Options::SortBy_MAX; |
232 | | constexpr int Options::SortBy_ARRAYSIZE; |
233 | | #endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900) |
234 | | |
235 | | // =================================================================== |
236 | | |
237 | 4.20k | void Options::InitAsDefaultInstance() { |
238 | 4.20k | } |
239 | | class Options::_Internal { |
240 | | public: |
241 | | using HasBits = decltype(std::declval<Options>()._has_bits_); |
242 | 0 | static void set_has_max_rows_per_level(HasBits* has_bits) { |
243 | 0 | (*has_bits)[0] |= 256u; |
244 | 0 | } |
245 | 0 | static void set_has_demangle(HasBits* has_bits) { |
246 | 0 | (*has_bits)[0] |= 4u; |
247 | 0 | } |
248 | 0 | static void set_has_sort_by(HasBits* has_bits) { |
249 | 0 | (*has_bits)[0] |= 8u; |
250 | 0 | } |
251 | 0 | static void set_has_verbose_level(HasBits* has_bits) { |
252 | 0 | (*has_bits)[0] |= 16u; |
253 | 0 | } |
254 | 0 | static void set_has_debug_vmaddr(HasBits* has_bits) { |
255 | 0 | (*has_bits)[0] |= 64u; |
256 | 0 | } |
257 | 0 | static void set_has_debug_fileoff(HasBits* has_bits) { |
258 | 0 | (*has_bits)[0] |= 128u; |
259 | 0 | } |
260 | 0 | static void set_has_disassemble_function(HasBits* has_bits) { |
261 | 0 | (*has_bits)[0] |= 1u; |
262 | 0 | } |
263 | 0 | static void set_has_source_filter(HasBits* has_bits) { |
264 | 0 | (*has_bits)[0] |= 2u; |
265 | 0 | } |
266 | 0 | static void set_has_dump_raw_map(HasBits* has_bits) { |
267 | 0 | (*has_bits)[0] |= 32u; |
268 | 0 | } |
269 | | }; |
270 | | |
271 | | Options::Options() |
272 | 655k | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
273 | 655k | SharedCtor(); |
274 | | // @@protoc_insertion_point(constructor:bloaty.Options) |
275 | 655k | } |
276 | | Options::Options(const Options& from) |
277 | | : ::PROTOBUF_NAMESPACE_ID::Message(), |
278 | | _internal_metadata_(nullptr), |
279 | | _has_bits_(from._has_bits_), |
280 | | filename_(from.filename_), |
281 | | base_filename_(from.base_filename_), |
282 | | data_source_(from.data_source_), |
283 | | custom_data_source_(from.custom_data_source_), |
284 | 2.01M | debug_filename_(from.debug_filename_) { |
285 | 2.01M | _internal_metadata_.MergeFrom(from._internal_metadata_); |
286 | 2.01M | disassemble_function_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
287 | 2.01M | if (from._internal_has_disassemble_function()) { |
288 | 0 | disassemble_function_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.disassemble_function_); |
289 | 0 | } |
290 | 2.01M | source_filter_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
291 | 2.01M | if (from._internal_has_source_filter()) { |
292 | 0 | source_filter_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.source_filter_); |
293 | 0 | } |
294 | 2.01M | ::memcpy(&demangle_, &from.demangle_, |
295 | 2.01M | static_cast<size_t>(reinterpret_cast<char*>(&max_rows_per_level_) - |
296 | 2.01M | reinterpret_cast<char*>(&demangle_)) + sizeof(max_rows_per_level_)); |
297 | | // @@protoc_insertion_point(copy_constructor:bloaty.Options) |
298 | 2.01M | } |
299 | | |
300 | 655k | void Options::SharedCtor() { |
301 | 655k | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Options_bloaty_2eproto.base); |
302 | 655k | disassemble_function_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
303 | 655k | source_filter_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
304 | 655k | ::memset(&demangle_, 0, static_cast<size_t>( |
305 | 655k | reinterpret_cast<char*>(&debug_fileoff_) - |
306 | 655k | reinterpret_cast<char*>(&demangle_)) + sizeof(debug_fileoff_)); |
307 | 655k | max_rows_per_level_ = PROTOBUF_LONGLONG(20); |
308 | 655k | } |
309 | | |
310 | 2.66M | Options::~Options() { |
311 | | // @@protoc_insertion_point(destructor:bloaty.Options) |
312 | 2.66M | SharedDtor(); |
313 | 2.66M | } |
314 | | |
315 | 2.66M | void Options::SharedDtor() { |
316 | 2.66M | disassemble_function_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
317 | 2.66M | source_filter_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
318 | 2.66M | } |
319 | | |
320 | 0 | void Options::SetCachedSize(int size) const { |
321 | 0 | _cached_size_.Set(size); |
322 | 0 | } |
323 | 0 | const Options& Options::default_instance() { |
324 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Options_bloaty_2eproto.base); |
325 | 0 | return *internal_default_instance(); |
326 | 0 | } |
327 | | |
328 | | |
329 | 0 | void Options::Clear() { |
330 | | // @@protoc_insertion_point(message_clear_start:bloaty.Options) |
331 | 0 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
332 | | // Prevent compiler warnings about cached_has_bits being unused |
333 | 0 | (void) cached_has_bits; |
334 | |
|
335 | 0 | filename_.Clear(); |
336 | 0 | base_filename_.Clear(); |
337 | 0 | data_source_.Clear(); |
338 | 0 | custom_data_source_.Clear(); |
339 | 0 | debug_filename_.Clear(); |
340 | 0 | cached_has_bits = _has_bits_[0]; |
341 | 0 | if (cached_has_bits & 0x00000003u) { |
342 | 0 | if (cached_has_bits & 0x00000001u) { |
343 | 0 | disassemble_function_.ClearNonDefaultToEmptyNoArena(); |
344 | 0 | } |
345 | 0 | if (cached_has_bits & 0x00000002u) { |
346 | 0 | source_filter_.ClearNonDefaultToEmptyNoArena(); |
347 | 0 | } |
348 | 0 | } |
349 | 0 | if (cached_has_bits & 0x000000fcu) { |
350 | 0 | ::memset(&demangle_, 0, static_cast<size_t>( |
351 | 0 | reinterpret_cast<char*>(&debug_fileoff_) - |
352 | 0 | reinterpret_cast<char*>(&demangle_)) + sizeof(debug_fileoff_)); |
353 | 0 | } |
354 | 0 | max_rows_per_level_ = PROTOBUF_LONGLONG(20); |
355 | 0 | _has_bits_.Clear(); |
356 | 0 | _internal_metadata_.Clear(); |
357 | 0 | } |
358 | | |
359 | 0 | const char* Options::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
360 | 0 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
361 | 0 | _Internal::HasBits has_bits{}; |
362 | 0 | while (!ctx->Done(&ptr)) { |
363 | 0 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
364 | 0 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
365 | 0 | CHK_(ptr); |
366 | 0 | switch (tag >> 3) { |
367 | | // repeated string filename = 1; |
368 | 0 | case 1: |
369 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { |
370 | 0 | ptr -= 1; |
371 | 0 | do { |
372 | 0 | ptr += 1; |
373 | 0 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(_internal_add_filename(), ptr, ctx, "bloaty.Options.filename"); |
374 | 0 | CHK_(ptr); |
375 | 0 | if (!ctx->DataAvailable(ptr)) break; |
376 | 0 | } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr)); |
377 | 0 | } else goto handle_unusual; |
378 | 0 | continue; |
379 | | // repeated string base_filename = 2; |
380 | 0 | case 2: |
381 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { |
382 | 0 | ptr -= 1; |
383 | 0 | do { |
384 | 0 | ptr += 1; |
385 | 0 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(_internal_add_base_filename(), ptr, ctx, "bloaty.Options.base_filename"); |
386 | 0 | CHK_(ptr); |
387 | 0 | if (!ctx->DataAvailable(ptr)) break; |
388 | 0 | } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr)); |
389 | 0 | } else goto handle_unusual; |
390 | 0 | continue; |
391 | | // repeated string data_source = 3; |
392 | 0 | case 3: |
393 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { |
394 | 0 | ptr -= 1; |
395 | 0 | do { |
396 | 0 | ptr += 1; |
397 | 0 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(_internal_add_data_source(), ptr, ctx, "bloaty.Options.data_source"); |
398 | 0 | CHK_(ptr); |
399 | 0 | if (!ctx->DataAvailable(ptr)) break; |
400 | 0 | } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr)); |
401 | 0 | } else goto handle_unusual; |
402 | 0 | continue; |
403 | | // optional int64 max_rows_per_level = 4 [default = 20]; |
404 | 0 | case 4: |
405 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { |
406 | 0 | _Internal::set_has_max_rows_per_level(&has_bits); |
407 | 0 | max_rows_per_level_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
408 | 0 | CHK_(ptr); |
409 | 0 | } else goto handle_unusual; |
410 | 0 | continue; |
411 | | // optional .bloaty.Options.Demangle demangle = 5 [default = DEMANGLE_SHORT]; |
412 | 0 | case 5: |
413 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) { |
414 | 0 | ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
415 | 0 | CHK_(ptr); |
416 | 0 | if (PROTOBUF_PREDICT_TRUE(::bloaty::Options_Demangle_IsValid(val))) { |
417 | 0 | _internal_set_demangle(static_cast<::bloaty::Options_Demangle>(val)); |
418 | 0 | } else { |
419 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(5, val, mutable_unknown_fields()); |
420 | 0 | } |
421 | 0 | } else goto handle_unusual; |
422 | 0 | continue; |
423 | | // optional .bloaty.Options.SortBy sort_by = 6 [default = SORTBY_BOTH]; |
424 | 0 | case 6: |
425 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) { |
426 | 0 | ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
427 | 0 | CHK_(ptr); |
428 | 0 | if (PROTOBUF_PREDICT_TRUE(::bloaty::Options_SortBy_IsValid(val))) { |
429 | 0 | _internal_set_sort_by(static_cast<::bloaty::Options_SortBy>(val)); |
430 | 0 | } else { |
431 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(6, val, mutable_unknown_fields()); |
432 | 0 | } |
433 | 0 | } else goto handle_unusual; |
434 | 0 | continue; |
435 | | // optional int32 verbose_level = 7; |
436 | 0 | case 7: |
437 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) { |
438 | 0 | _Internal::set_has_verbose_level(&has_bits); |
439 | 0 | verbose_level_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
440 | 0 | CHK_(ptr); |
441 | 0 | } else goto handle_unusual; |
442 | 0 | continue; |
443 | | // repeated .bloaty.CustomDataSource custom_data_source = 8; |
444 | 0 | case 8: |
445 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 66)) { |
446 | 0 | ptr -= 1; |
447 | 0 | do { |
448 | 0 | ptr += 1; |
449 | 0 | ptr = ctx->ParseMessage(_internal_add_custom_data_source(), ptr); |
450 | 0 | CHK_(ptr); |
451 | 0 | if (!ctx->DataAvailable(ptr)) break; |
452 | 0 | } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<66>(ptr)); |
453 | 0 | } else goto handle_unusual; |
454 | 0 | continue; |
455 | | // optional string disassemble_function = 9; |
456 | 0 | case 9: |
457 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 74)) { |
458 | 0 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(_internal_mutable_disassemble_function(), ptr, ctx, "bloaty.Options.disassemble_function"); |
459 | 0 | CHK_(ptr); |
460 | 0 | } else goto handle_unusual; |
461 | 0 | continue; |
462 | | // repeated string debug_filename = 10; |
463 | 0 | case 10: |
464 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 82)) { |
465 | 0 | ptr -= 1; |
466 | 0 | do { |
467 | 0 | ptr += 1; |
468 | 0 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(_internal_add_debug_filename(), ptr, ctx, "bloaty.Options.debug_filename"); |
469 | 0 | CHK_(ptr); |
470 | 0 | if (!ctx->DataAvailable(ptr)) break; |
471 | 0 | } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<82>(ptr)); |
472 | 0 | } else goto handle_unusual; |
473 | 0 | continue; |
474 | | // optional uint64 debug_vmaddr = 11; |
475 | 0 | case 11: |
476 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 88)) { |
477 | 0 | _Internal::set_has_debug_vmaddr(&has_bits); |
478 | 0 | debug_vmaddr_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
479 | 0 | CHK_(ptr); |
480 | 0 | } else goto handle_unusual; |
481 | 0 | continue; |
482 | | // optional uint64 debug_fileoff = 12; |
483 | 0 | case 12: |
484 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 96)) { |
485 | 0 | _Internal::set_has_debug_fileoff(&has_bits); |
486 | 0 | debug_fileoff_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
487 | 0 | CHK_(ptr); |
488 | 0 | } else goto handle_unusual; |
489 | 0 | continue; |
490 | | // optional string source_filter = 13; |
491 | 0 | case 13: |
492 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 106)) { |
493 | 0 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(_internal_mutable_source_filter(), ptr, ctx, "bloaty.Options.source_filter"); |
494 | 0 | CHK_(ptr); |
495 | 0 | } else goto handle_unusual; |
496 | 0 | continue; |
497 | | // optional bool dump_raw_map = 14; |
498 | 0 | case 14: |
499 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 112)) { |
500 | 0 | _Internal::set_has_dump_raw_map(&has_bits); |
501 | 0 | dump_raw_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
502 | 0 | CHK_(ptr); |
503 | 0 | } else goto handle_unusual; |
504 | 0 | continue; |
505 | 0 | default: { |
506 | 0 | handle_unusual: |
507 | 0 | if ((tag & 7) == 4 || tag == 0) { |
508 | 0 | ctx->SetLastTag(tag); |
509 | 0 | goto success; |
510 | 0 | } |
511 | 0 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
512 | 0 | CHK_(ptr != nullptr); |
513 | 0 | continue; |
514 | 0 | } |
515 | 0 | } // switch |
516 | 0 | } // while |
517 | 0 | success: |
518 | 0 | _has_bits_.Or(has_bits); |
519 | 0 | return ptr; |
520 | 0 | failure: |
521 | 0 | ptr = nullptr; |
522 | 0 | goto success; |
523 | 0 | #undef CHK_ |
524 | 0 | } |
525 | | |
526 | | ::PROTOBUF_NAMESPACE_ID::uint8* Options::InternalSerializeWithCachedSizesToArray( |
527 | 0 | ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { |
528 | | // @@protoc_insertion_point(serialize_to_array_start:bloaty.Options) |
529 | 0 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
530 | 0 | (void) cached_has_bits; |
531 | | |
532 | | // repeated string filename = 1; |
533 | 0 | for (int i = 0, n = this->_internal_filename_size(); i < n; i++) { |
534 | 0 | const auto& s = this->_internal_filename(i); |
535 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( |
536 | 0 | s.data(), static_cast<int>(s.length()), |
537 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, |
538 | 0 | "bloaty.Options.filename"); |
539 | 0 | target = stream->WriteString(1, s, target); |
540 | 0 | } |
541 | | |
542 | | // repeated string base_filename = 2; |
543 | 0 | for (int i = 0, n = this->_internal_base_filename_size(); i < n; i++) { |
544 | 0 | const auto& s = this->_internal_base_filename(i); |
545 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( |
546 | 0 | s.data(), static_cast<int>(s.length()), |
547 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, |
548 | 0 | "bloaty.Options.base_filename"); |
549 | 0 | target = stream->WriteString(2, s, target); |
550 | 0 | } |
551 | | |
552 | | // repeated string data_source = 3; |
553 | 0 | for (int i = 0, n = this->_internal_data_source_size(); i < n; i++) { |
554 | 0 | const auto& s = this->_internal_data_source(i); |
555 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( |
556 | 0 | s.data(), static_cast<int>(s.length()), |
557 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, |
558 | 0 | "bloaty.Options.data_source"); |
559 | 0 | target = stream->WriteString(3, s, target); |
560 | 0 | } |
561 | |
|
562 | 0 | cached_has_bits = _has_bits_[0]; |
563 | | // optional int64 max_rows_per_level = 4 [default = 20]; |
564 | 0 | if (cached_has_bits & 0x00000100u) { |
565 | 0 | stream->EnsureSpace(&target); |
566 | 0 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(4, this->_internal_max_rows_per_level(), target); |
567 | 0 | } |
568 | | |
569 | | // optional .bloaty.Options.Demangle demangle = 5 [default = DEMANGLE_SHORT]; |
570 | 0 | if (cached_has_bits & 0x00000004u) { |
571 | 0 | stream->EnsureSpace(&target); |
572 | 0 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( |
573 | 0 | 5, this->_internal_demangle(), target); |
574 | 0 | } |
575 | | |
576 | | // optional .bloaty.Options.SortBy sort_by = 6 [default = SORTBY_BOTH]; |
577 | 0 | if (cached_has_bits & 0x00000008u) { |
578 | 0 | stream->EnsureSpace(&target); |
579 | 0 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( |
580 | 0 | 6, this->_internal_sort_by(), target); |
581 | 0 | } |
582 | | |
583 | | // optional int32 verbose_level = 7; |
584 | 0 | if (cached_has_bits & 0x00000010u) { |
585 | 0 | stream->EnsureSpace(&target); |
586 | 0 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(7, this->_internal_verbose_level(), target); |
587 | 0 | } |
588 | | |
589 | | // repeated .bloaty.CustomDataSource custom_data_source = 8; |
590 | 0 | for (unsigned int i = 0, |
591 | 0 | n = static_cast<unsigned int>(this->_internal_custom_data_source_size()); i < n; i++) { |
592 | 0 | stream->EnsureSpace(&target); |
593 | 0 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
594 | 0 | InternalWriteMessageToArray(8, this->_internal_custom_data_source(i), target, stream); |
595 | 0 | } |
596 | | |
597 | | // optional string disassemble_function = 9; |
598 | 0 | if (cached_has_bits & 0x00000001u) { |
599 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( |
600 | 0 | this->_internal_disassemble_function().data(), static_cast<int>(this->_internal_disassemble_function().length()), |
601 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, |
602 | 0 | "bloaty.Options.disassemble_function"); |
603 | 0 | target = stream->WriteStringMaybeAliased( |
604 | 0 | 9, this->_internal_disassemble_function(), target); |
605 | 0 | } |
606 | | |
607 | | // repeated string debug_filename = 10; |
608 | 0 | for (int i = 0, n = this->_internal_debug_filename_size(); i < n; i++) { |
609 | 0 | const auto& s = this->_internal_debug_filename(i); |
610 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( |
611 | 0 | s.data(), static_cast<int>(s.length()), |
612 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, |
613 | 0 | "bloaty.Options.debug_filename"); |
614 | 0 | target = stream->WriteString(10, s, target); |
615 | 0 | } |
616 | | |
617 | | // optional uint64 debug_vmaddr = 11; |
618 | 0 | if (cached_has_bits & 0x00000040u) { |
619 | 0 | stream->EnsureSpace(&target); |
620 | 0 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(11, this->_internal_debug_vmaddr(), target); |
621 | 0 | } |
622 | | |
623 | | // optional uint64 debug_fileoff = 12; |
624 | 0 | if (cached_has_bits & 0x00000080u) { |
625 | 0 | stream->EnsureSpace(&target); |
626 | 0 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(12, this->_internal_debug_fileoff(), target); |
627 | 0 | } |
628 | | |
629 | | // optional string source_filter = 13; |
630 | 0 | if (cached_has_bits & 0x00000002u) { |
631 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( |
632 | 0 | this->_internal_source_filter().data(), static_cast<int>(this->_internal_source_filter().length()), |
633 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, |
634 | 0 | "bloaty.Options.source_filter"); |
635 | 0 | target = stream->WriteStringMaybeAliased( |
636 | 0 | 13, this->_internal_source_filter(), target); |
637 | 0 | } |
638 | | |
639 | | // optional bool dump_raw_map = 14; |
640 | 0 | if (cached_has_bits & 0x00000020u) { |
641 | 0 | stream->EnsureSpace(&target); |
642 | 0 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(14, this->_internal_dump_raw_map(), target); |
643 | 0 | } |
644 | |
|
645 | 0 | if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { |
646 | 0 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( |
647 | 0 | _internal_metadata_.unknown_fields(), target, stream); |
648 | 0 | } |
649 | | // @@protoc_insertion_point(serialize_to_array_end:bloaty.Options) |
650 | 0 | return target; |
651 | 0 | } |
652 | | |
653 | 0 | size_t Options::ByteSizeLong() const { |
654 | | // @@protoc_insertion_point(message_byte_size_start:bloaty.Options) |
655 | 0 | size_t total_size = 0; |
656 | |
|
657 | 0 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
658 | | // Prevent compiler warnings about cached_has_bits being unused |
659 | 0 | (void) cached_has_bits; |
660 | | |
661 | | // repeated string filename = 1; |
662 | 0 | total_size += 1 * |
663 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(filename_.size()); |
664 | 0 | for (int i = 0, n = filename_.size(); i < n; i++) { |
665 | 0 | total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
666 | 0 | filename_.Get(i)); |
667 | 0 | } |
668 | | |
669 | | // repeated string base_filename = 2; |
670 | 0 | total_size += 1 * |
671 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(base_filename_.size()); |
672 | 0 | for (int i = 0, n = base_filename_.size(); i < n; i++) { |
673 | 0 | total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
674 | 0 | base_filename_.Get(i)); |
675 | 0 | } |
676 | | |
677 | | // repeated string data_source = 3; |
678 | 0 | total_size += 1 * |
679 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(data_source_.size()); |
680 | 0 | for (int i = 0, n = data_source_.size(); i < n; i++) { |
681 | 0 | total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
682 | 0 | data_source_.Get(i)); |
683 | 0 | } |
684 | | |
685 | | // repeated .bloaty.CustomDataSource custom_data_source = 8; |
686 | 0 | total_size += 1UL * this->_internal_custom_data_source_size(); |
687 | 0 | for (const auto& msg : this->custom_data_source_) { |
688 | 0 | total_size += |
689 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); |
690 | 0 | } |
691 | | |
692 | | // repeated string debug_filename = 10; |
693 | 0 | total_size += 1 * |
694 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(debug_filename_.size()); |
695 | 0 | for (int i = 0, n = debug_filename_.size(); i < n; i++) { |
696 | 0 | total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
697 | 0 | debug_filename_.Get(i)); |
698 | 0 | } |
699 | |
|
700 | 0 | cached_has_bits = _has_bits_[0]; |
701 | 0 | if (cached_has_bits & 0x000000ffu) { |
702 | | // optional string disassemble_function = 9; |
703 | 0 | if (cached_has_bits & 0x00000001u) { |
704 | 0 | total_size += 1 + |
705 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
706 | 0 | this->_internal_disassemble_function()); |
707 | 0 | } |
708 | | |
709 | | // optional string source_filter = 13; |
710 | 0 | if (cached_has_bits & 0x00000002u) { |
711 | 0 | total_size += 1 + |
712 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
713 | 0 | this->_internal_source_filter()); |
714 | 0 | } |
715 | | |
716 | | // optional .bloaty.Options.Demangle demangle = 5 [default = DEMANGLE_SHORT]; |
717 | 0 | if (cached_has_bits & 0x00000004u) { |
718 | 0 | total_size += 1 + |
719 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_demangle()); |
720 | 0 | } |
721 | | |
722 | | // optional .bloaty.Options.SortBy sort_by = 6 [default = SORTBY_BOTH]; |
723 | 0 | if (cached_has_bits & 0x00000008u) { |
724 | 0 | total_size += 1 + |
725 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_sort_by()); |
726 | 0 | } |
727 | | |
728 | | // optional int32 verbose_level = 7; |
729 | 0 | if (cached_has_bits & 0x00000010u) { |
730 | 0 | total_size += 1 + |
731 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( |
732 | 0 | this->_internal_verbose_level()); |
733 | 0 | } |
734 | | |
735 | | // optional bool dump_raw_map = 14; |
736 | 0 | if (cached_has_bits & 0x00000020u) { |
737 | 0 | total_size += 1 + 1; |
738 | 0 | } |
739 | | |
740 | | // optional uint64 debug_vmaddr = 11; |
741 | 0 | if (cached_has_bits & 0x00000040u) { |
742 | 0 | total_size += 1 + |
743 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64Size( |
744 | 0 | this->_internal_debug_vmaddr()); |
745 | 0 | } |
746 | | |
747 | | // optional uint64 debug_fileoff = 12; |
748 | 0 | if (cached_has_bits & 0x00000080u) { |
749 | 0 | total_size += 1 + |
750 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64Size( |
751 | 0 | this->_internal_debug_fileoff()); |
752 | 0 | } |
753 | |
|
754 | 0 | } |
755 | | // optional int64 max_rows_per_level = 4 [default = 20]; |
756 | 0 | if (cached_has_bits & 0x00000100u) { |
757 | 0 | total_size += 1 + |
758 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
759 | 0 | this->_internal_max_rows_per_level()); |
760 | 0 | } |
761 | |
|
762 | 0 | if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { |
763 | 0 | return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( |
764 | 0 | _internal_metadata_, total_size, &_cached_size_); |
765 | 0 | } |
766 | 0 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
767 | 0 | SetCachedSize(cached_size); |
768 | 0 | return total_size; |
769 | 0 | } |
770 | | |
771 | 0 | void Options::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
772 | | // @@protoc_insertion_point(generalized_merge_from_start:bloaty.Options) |
773 | 0 | GOOGLE_DCHECK_NE(&from, this); |
774 | 0 | const Options* source = |
775 | 0 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<Options>( |
776 | 0 | &from); |
777 | 0 | if (source == nullptr) { |
778 | | // @@protoc_insertion_point(generalized_merge_from_cast_fail:bloaty.Options) |
779 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
780 | 0 | } else { |
781 | | // @@protoc_insertion_point(generalized_merge_from_cast_success:bloaty.Options) |
782 | 0 | MergeFrom(*source); |
783 | 0 | } |
784 | 0 | } |
785 | | |
786 | 0 | void Options::MergeFrom(const Options& from) { |
787 | | // @@protoc_insertion_point(class_specific_merge_from_start:bloaty.Options) |
788 | 0 | GOOGLE_DCHECK_NE(&from, this); |
789 | 0 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
790 | 0 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
791 | 0 | (void) cached_has_bits; |
792 | |
|
793 | 0 | filename_.MergeFrom(from.filename_); |
794 | 0 | base_filename_.MergeFrom(from.base_filename_); |
795 | 0 | data_source_.MergeFrom(from.data_source_); |
796 | 0 | custom_data_source_.MergeFrom(from.custom_data_source_); |
797 | 0 | debug_filename_.MergeFrom(from.debug_filename_); |
798 | 0 | cached_has_bits = from._has_bits_[0]; |
799 | 0 | if (cached_has_bits & 0x000000ffu) { |
800 | 0 | if (cached_has_bits & 0x00000001u) { |
801 | 0 | _has_bits_[0] |= 0x00000001u; |
802 | 0 | disassemble_function_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.disassemble_function_); |
803 | 0 | } |
804 | 0 | if (cached_has_bits & 0x00000002u) { |
805 | 0 | _has_bits_[0] |= 0x00000002u; |
806 | 0 | source_filter_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.source_filter_); |
807 | 0 | } |
808 | 0 | if (cached_has_bits & 0x00000004u) { |
809 | 0 | demangle_ = from.demangle_; |
810 | 0 | } |
811 | 0 | if (cached_has_bits & 0x00000008u) { |
812 | 0 | sort_by_ = from.sort_by_; |
813 | 0 | } |
814 | 0 | if (cached_has_bits & 0x00000010u) { |
815 | 0 | verbose_level_ = from.verbose_level_; |
816 | 0 | } |
817 | 0 | if (cached_has_bits & 0x00000020u) { |
818 | 0 | dump_raw_map_ = from.dump_raw_map_; |
819 | 0 | } |
820 | 0 | if (cached_has_bits & 0x00000040u) { |
821 | 0 | debug_vmaddr_ = from.debug_vmaddr_; |
822 | 0 | } |
823 | 0 | if (cached_has_bits & 0x00000080u) { |
824 | 0 | debug_fileoff_ = from.debug_fileoff_; |
825 | 0 | } |
826 | 0 | _has_bits_[0] |= cached_has_bits; |
827 | 0 | } |
828 | 0 | if (cached_has_bits & 0x00000100u) { |
829 | 0 | _internal_set_max_rows_per_level(from._internal_max_rows_per_level()); |
830 | 0 | } |
831 | 0 | } |
832 | | |
833 | 0 | void Options::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
834 | | // @@protoc_insertion_point(generalized_copy_from_start:bloaty.Options) |
835 | 0 | if (&from == this) return; |
836 | 0 | Clear(); |
837 | 0 | MergeFrom(from); |
838 | 0 | } |
839 | | |
840 | 0 | void Options::CopyFrom(const Options& from) { |
841 | | // @@protoc_insertion_point(class_specific_copy_from_start:bloaty.Options) |
842 | 0 | if (&from == this) return; |
843 | 0 | Clear(); |
844 | 0 | MergeFrom(from); |
845 | 0 | } |
846 | | |
847 | 0 | bool Options::IsInitialized() const { |
848 | 0 | return true; |
849 | 0 | } |
850 | | |
851 | 0 | void Options::InternalSwap(Options* other) { |
852 | 0 | using std::swap; |
853 | 0 | _internal_metadata_.Swap(&other->_internal_metadata_); |
854 | 0 | swap(_has_bits_[0], other->_has_bits_[0]); |
855 | 0 | filename_.InternalSwap(&other->filename_); |
856 | 0 | base_filename_.InternalSwap(&other->base_filename_); |
857 | 0 | data_source_.InternalSwap(&other->data_source_); |
858 | 0 | custom_data_source_.InternalSwap(&other->custom_data_source_); |
859 | 0 | debug_filename_.InternalSwap(&other->debug_filename_); |
860 | 0 | disassemble_function_.Swap(&other->disassemble_function_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
861 | 0 | GetArenaNoVirtual()); |
862 | 0 | source_filter_.Swap(&other->source_filter_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
863 | 0 | GetArenaNoVirtual()); |
864 | 0 | swap(demangle_, other->demangle_); |
865 | 0 | swap(sort_by_, other->sort_by_); |
866 | 0 | swap(verbose_level_, other->verbose_level_); |
867 | 0 | swap(dump_raw_map_, other->dump_raw_map_); |
868 | 0 | swap(debug_vmaddr_, other->debug_vmaddr_); |
869 | 0 | swap(debug_fileoff_, other->debug_fileoff_); |
870 | 0 | swap(max_rows_per_level_, other->max_rows_per_level_); |
871 | 0 | } |
872 | | |
873 | 0 | ::PROTOBUF_NAMESPACE_ID::Metadata Options::GetMetadata() const { |
874 | 0 | return GetMetadataStatic(); |
875 | 0 | } |
876 | | |
877 | | |
878 | | // =================================================================== |
879 | | |
880 | 4.20k | void CustomDataSource::InitAsDefaultInstance() { |
881 | 4.20k | } |
882 | | class CustomDataSource::_Internal { |
883 | | public: |
884 | | using HasBits = decltype(std::declval<CustomDataSource>()._has_bits_); |
885 | 0 | static void set_has_name(HasBits* has_bits) { |
886 | 0 | (*has_bits)[0] |= 1u; |
887 | 0 | } |
888 | 0 | static void set_has_base_data_source(HasBits* has_bits) { |
889 | 0 | (*has_bits)[0] |= 2u; |
890 | 0 | } |
891 | | }; |
892 | | |
893 | | CustomDataSource::CustomDataSource() |
894 | 4.20k | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
895 | 4.20k | SharedCtor(); |
896 | | // @@protoc_insertion_point(constructor:bloaty.CustomDataSource) |
897 | 4.20k | } |
898 | | CustomDataSource::CustomDataSource(const CustomDataSource& from) |
899 | | : ::PROTOBUF_NAMESPACE_ID::Message(), |
900 | | _internal_metadata_(nullptr), |
901 | | _has_bits_(from._has_bits_), |
902 | 0 | rewrite_(from.rewrite_) { |
903 | 0 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
904 | 0 | name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
905 | 0 | if (from._internal_has_name()) { |
906 | 0 | name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_); |
907 | 0 | } |
908 | 0 | base_data_source_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
909 | 0 | if (from._internal_has_base_data_source()) { |
910 | 0 | base_data_source_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.base_data_source_); |
911 | 0 | } |
912 | | // @@protoc_insertion_point(copy_constructor:bloaty.CustomDataSource) |
913 | 0 | } |
914 | | |
915 | 4.20k | void CustomDataSource::SharedCtor() { |
916 | 4.20k | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_CustomDataSource_bloaty_2eproto.base); |
917 | 4.20k | name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
918 | 4.20k | base_data_source_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
919 | 4.20k | } |
920 | | |
921 | 0 | CustomDataSource::~CustomDataSource() { |
922 | | // @@protoc_insertion_point(destructor:bloaty.CustomDataSource) |
923 | 0 | SharedDtor(); |
924 | 0 | } |
925 | | |
926 | 0 | void CustomDataSource::SharedDtor() { |
927 | 0 | name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
928 | 0 | base_data_source_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
929 | 0 | } |
930 | | |
931 | 0 | void CustomDataSource::SetCachedSize(int size) const { |
932 | 0 | _cached_size_.Set(size); |
933 | 0 | } |
934 | 0 | const CustomDataSource& CustomDataSource::default_instance() { |
935 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_CustomDataSource_bloaty_2eproto.base); |
936 | 0 | return *internal_default_instance(); |
937 | 0 | } |
938 | | |
939 | | |
940 | 0 | void CustomDataSource::Clear() { |
941 | | // @@protoc_insertion_point(message_clear_start:bloaty.CustomDataSource) |
942 | 0 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
943 | | // Prevent compiler warnings about cached_has_bits being unused |
944 | 0 | (void) cached_has_bits; |
945 | |
|
946 | 0 | rewrite_.Clear(); |
947 | 0 | cached_has_bits = _has_bits_[0]; |
948 | 0 | if (cached_has_bits & 0x00000003u) { |
949 | 0 | if (cached_has_bits & 0x00000001u) { |
950 | 0 | name_.ClearNonDefaultToEmptyNoArena(); |
951 | 0 | } |
952 | 0 | if (cached_has_bits & 0x00000002u) { |
953 | 0 | base_data_source_.ClearNonDefaultToEmptyNoArena(); |
954 | 0 | } |
955 | 0 | } |
956 | 0 | _has_bits_.Clear(); |
957 | 0 | _internal_metadata_.Clear(); |
958 | 0 | } |
959 | | |
960 | 0 | const char* CustomDataSource::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
961 | 0 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
962 | 0 | _Internal::HasBits has_bits{}; |
963 | 0 | while (!ctx->Done(&ptr)) { |
964 | 0 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
965 | 0 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
966 | 0 | CHK_(ptr); |
967 | 0 | switch (tag >> 3) { |
968 | | // optional string name = 1; |
969 | 0 | case 1: |
970 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { |
971 | 0 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(_internal_mutable_name(), ptr, ctx, "bloaty.CustomDataSource.name"); |
972 | 0 | CHK_(ptr); |
973 | 0 | } else goto handle_unusual; |
974 | 0 | continue; |
975 | | // optional string base_data_source = 2; |
976 | 0 | case 2: |
977 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { |
978 | 0 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(_internal_mutable_base_data_source(), ptr, ctx, "bloaty.CustomDataSource.base_data_source"); |
979 | 0 | CHK_(ptr); |
980 | 0 | } else goto handle_unusual; |
981 | 0 | continue; |
982 | | // repeated .bloaty.Regex rewrite = 3; |
983 | 0 | case 3: |
984 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { |
985 | 0 | ptr -= 1; |
986 | 0 | do { |
987 | 0 | ptr += 1; |
988 | 0 | ptr = ctx->ParseMessage(_internal_add_rewrite(), ptr); |
989 | 0 | CHK_(ptr); |
990 | 0 | if (!ctx->DataAvailable(ptr)) break; |
991 | 0 | } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr)); |
992 | 0 | } else goto handle_unusual; |
993 | 0 | continue; |
994 | 0 | default: { |
995 | 0 | handle_unusual: |
996 | 0 | if ((tag & 7) == 4 || tag == 0) { |
997 | 0 | ctx->SetLastTag(tag); |
998 | 0 | goto success; |
999 | 0 | } |
1000 | 0 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
1001 | 0 | CHK_(ptr != nullptr); |
1002 | 0 | continue; |
1003 | 0 | } |
1004 | 0 | } // switch |
1005 | 0 | } // while |
1006 | 0 | success: |
1007 | 0 | _has_bits_.Or(has_bits); |
1008 | 0 | return ptr; |
1009 | 0 | failure: |
1010 | 0 | ptr = nullptr; |
1011 | 0 | goto success; |
1012 | 0 | #undef CHK_ |
1013 | 0 | } |
1014 | | |
1015 | | ::PROTOBUF_NAMESPACE_ID::uint8* CustomDataSource::InternalSerializeWithCachedSizesToArray( |
1016 | 0 | ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { |
1017 | | // @@protoc_insertion_point(serialize_to_array_start:bloaty.CustomDataSource) |
1018 | 0 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1019 | 0 | (void) cached_has_bits; |
1020 | |
|
1021 | 0 | cached_has_bits = _has_bits_[0]; |
1022 | | // optional string name = 1; |
1023 | 0 | if (cached_has_bits & 0x00000001u) { |
1024 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( |
1025 | 0 | this->_internal_name().data(), static_cast<int>(this->_internal_name().length()), |
1026 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, |
1027 | 0 | "bloaty.CustomDataSource.name"); |
1028 | 0 | target = stream->WriteStringMaybeAliased( |
1029 | 0 | 1, this->_internal_name(), target); |
1030 | 0 | } |
1031 | | |
1032 | | // optional string base_data_source = 2; |
1033 | 0 | if (cached_has_bits & 0x00000002u) { |
1034 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( |
1035 | 0 | this->_internal_base_data_source().data(), static_cast<int>(this->_internal_base_data_source().length()), |
1036 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, |
1037 | 0 | "bloaty.CustomDataSource.base_data_source"); |
1038 | 0 | target = stream->WriteStringMaybeAliased( |
1039 | 0 | 2, this->_internal_base_data_source(), target); |
1040 | 0 | } |
1041 | | |
1042 | | // repeated .bloaty.Regex rewrite = 3; |
1043 | 0 | for (unsigned int i = 0, |
1044 | 0 | n = static_cast<unsigned int>(this->_internal_rewrite_size()); i < n; i++) { |
1045 | 0 | stream->EnsureSpace(&target); |
1046 | 0 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
1047 | 0 | InternalWriteMessageToArray(3, this->_internal_rewrite(i), target, stream); |
1048 | 0 | } |
1049 | |
|
1050 | 0 | if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { |
1051 | 0 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( |
1052 | 0 | _internal_metadata_.unknown_fields(), target, stream); |
1053 | 0 | } |
1054 | | // @@protoc_insertion_point(serialize_to_array_end:bloaty.CustomDataSource) |
1055 | 0 | return target; |
1056 | 0 | } |
1057 | | |
1058 | 0 | size_t CustomDataSource::ByteSizeLong() const { |
1059 | | // @@protoc_insertion_point(message_byte_size_start:bloaty.CustomDataSource) |
1060 | 0 | size_t total_size = 0; |
1061 | |
|
1062 | 0 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1063 | | // Prevent compiler warnings about cached_has_bits being unused |
1064 | 0 | (void) cached_has_bits; |
1065 | | |
1066 | | // repeated .bloaty.Regex rewrite = 3; |
1067 | 0 | total_size += 1UL * this->_internal_rewrite_size(); |
1068 | 0 | for (const auto& msg : this->rewrite_) { |
1069 | 0 | total_size += |
1070 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); |
1071 | 0 | } |
1072 | |
|
1073 | 0 | cached_has_bits = _has_bits_[0]; |
1074 | 0 | if (cached_has_bits & 0x00000003u) { |
1075 | | // optional string name = 1; |
1076 | 0 | if (cached_has_bits & 0x00000001u) { |
1077 | 0 | total_size += 1 + |
1078 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
1079 | 0 | this->_internal_name()); |
1080 | 0 | } |
1081 | | |
1082 | | // optional string base_data_source = 2; |
1083 | 0 | if (cached_has_bits & 0x00000002u) { |
1084 | 0 | total_size += 1 + |
1085 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
1086 | 0 | this->_internal_base_data_source()); |
1087 | 0 | } |
1088 | |
|
1089 | 0 | } |
1090 | 0 | if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { |
1091 | 0 | return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( |
1092 | 0 | _internal_metadata_, total_size, &_cached_size_); |
1093 | 0 | } |
1094 | 0 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
1095 | 0 | SetCachedSize(cached_size); |
1096 | 0 | return total_size; |
1097 | 0 | } |
1098 | | |
1099 | 0 | void CustomDataSource::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
1100 | | // @@protoc_insertion_point(generalized_merge_from_start:bloaty.CustomDataSource) |
1101 | 0 | GOOGLE_DCHECK_NE(&from, this); |
1102 | 0 | const CustomDataSource* source = |
1103 | 0 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<CustomDataSource>( |
1104 | 0 | &from); |
1105 | 0 | if (source == nullptr) { |
1106 | | // @@protoc_insertion_point(generalized_merge_from_cast_fail:bloaty.CustomDataSource) |
1107 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
1108 | 0 | } else { |
1109 | | // @@protoc_insertion_point(generalized_merge_from_cast_success:bloaty.CustomDataSource) |
1110 | 0 | MergeFrom(*source); |
1111 | 0 | } |
1112 | 0 | } |
1113 | | |
1114 | 0 | void CustomDataSource::MergeFrom(const CustomDataSource& from) { |
1115 | | // @@protoc_insertion_point(class_specific_merge_from_start:bloaty.CustomDataSource) |
1116 | 0 | GOOGLE_DCHECK_NE(&from, this); |
1117 | 0 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
1118 | 0 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1119 | 0 | (void) cached_has_bits; |
1120 | |
|
1121 | 0 | rewrite_.MergeFrom(from.rewrite_); |
1122 | 0 | cached_has_bits = from._has_bits_[0]; |
1123 | 0 | if (cached_has_bits & 0x00000003u) { |
1124 | 0 | if (cached_has_bits & 0x00000001u) { |
1125 | 0 | _has_bits_[0] |= 0x00000001u; |
1126 | 0 | name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_); |
1127 | 0 | } |
1128 | 0 | if (cached_has_bits & 0x00000002u) { |
1129 | 0 | _has_bits_[0] |= 0x00000002u; |
1130 | 0 | base_data_source_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.base_data_source_); |
1131 | 0 | } |
1132 | 0 | } |
1133 | 0 | } |
1134 | | |
1135 | 0 | void CustomDataSource::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
1136 | | // @@protoc_insertion_point(generalized_copy_from_start:bloaty.CustomDataSource) |
1137 | 0 | if (&from == this) return; |
1138 | 0 | Clear(); |
1139 | 0 | MergeFrom(from); |
1140 | 0 | } |
1141 | | |
1142 | 0 | void CustomDataSource::CopyFrom(const CustomDataSource& from) { |
1143 | | // @@protoc_insertion_point(class_specific_copy_from_start:bloaty.CustomDataSource) |
1144 | 0 | if (&from == this) return; |
1145 | 0 | Clear(); |
1146 | 0 | MergeFrom(from); |
1147 | 0 | } |
1148 | | |
1149 | 0 | bool CustomDataSource::IsInitialized() const { |
1150 | 0 | return true; |
1151 | 0 | } |
1152 | | |
1153 | 0 | void CustomDataSource::InternalSwap(CustomDataSource* other) { |
1154 | 0 | using std::swap; |
1155 | 0 | _internal_metadata_.Swap(&other->_internal_metadata_); |
1156 | 0 | swap(_has_bits_[0], other->_has_bits_[0]); |
1157 | 0 | rewrite_.InternalSwap(&other->rewrite_); |
1158 | 0 | name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
1159 | 0 | GetArenaNoVirtual()); |
1160 | 0 | base_data_source_.Swap(&other->base_data_source_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
1161 | 0 | GetArenaNoVirtual()); |
1162 | 0 | } |
1163 | | |
1164 | 0 | ::PROTOBUF_NAMESPACE_ID::Metadata CustomDataSource::GetMetadata() const { |
1165 | 0 | return GetMetadataStatic(); |
1166 | 0 | } |
1167 | | |
1168 | | |
1169 | | // =================================================================== |
1170 | | |
1171 | 4.20k | void Regex::InitAsDefaultInstance() { |
1172 | 4.20k | } |
1173 | | class Regex::_Internal { |
1174 | | public: |
1175 | | using HasBits = decltype(std::declval<Regex>()._has_bits_); |
1176 | 0 | static void set_has_pattern(HasBits* has_bits) { |
1177 | 0 | (*has_bits)[0] |= 1u; |
1178 | 0 | } |
1179 | 0 | static void set_has_replacement(HasBits* has_bits) { |
1180 | 0 | (*has_bits)[0] |= 2u; |
1181 | 0 | } |
1182 | | }; |
1183 | | |
1184 | | Regex::Regex() |
1185 | 4.20k | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
1186 | 4.20k | SharedCtor(); |
1187 | | // @@protoc_insertion_point(constructor:bloaty.Regex) |
1188 | 4.20k | } |
1189 | | Regex::Regex(const Regex& from) |
1190 | | : ::PROTOBUF_NAMESPACE_ID::Message(), |
1191 | | _internal_metadata_(nullptr), |
1192 | 0 | _has_bits_(from._has_bits_) { |
1193 | 0 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
1194 | 0 | pattern_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
1195 | 0 | if (from._internal_has_pattern()) { |
1196 | 0 | pattern_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.pattern_); |
1197 | 0 | } |
1198 | 0 | replacement_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
1199 | 0 | if (from._internal_has_replacement()) { |
1200 | 0 | replacement_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.replacement_); |
1201 | 0 | } |
1202 | | // @@protoc_insertion_point(copy_constructor:bloaty.Regex) |
1203 | 0 | } |
1204 | | |
1205 | 4.20k | void Regex::SharedCtor() { |
1206 | 4.20k | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Regex_bloaty_2eproto.base); |
1207 | 4.20k | pattern_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
1208 | 4.20k | replacement_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
1209 | 4.20k | } |
1210 | | |
1211 | 0 | Regex::~Regex() { |
1212 | | // @@protoc_insertion_point(destructor:bloaty.Regex) |
1213 | 0 | SharedDtor(); |
1214 | 0 | } |
1215 | | |
1216 | 0 | void Regex::SharedDtor() { |
1217 | 0 | pattern_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
1218 | 0 | replacement_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
1219 | 0 | } |
1220 | | |
1221 | 0 | void Regex::SetCachedSize(int size) const { |
1222 | 0 | _cached_size_.Set(size); |
1223 | 0 | } |
1224 | 0 | const Regex& Regex::default_instance() { |
1225 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Regex_bloaty_2eproto.base); |
1226 | 0 | return *internal_default_instance(); |
1227 | 0 | } |
1228 | | |
1229 | | |
1230 | 0 | void Regex::Clear() { |
1231 | | // @@protoc_insertion_point(message_clear_start:bloaty.Regex) |
1232 | 0 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1233 | | // Prevent compiler warnings about cached_has_bits being unused |
1234 | 0 | (void) cached_has_bits; |
1235 | |
|
1236 | 0 | cached_has_bits = _has_bits_[0]; |
1237 | 0 | if (cached_has_bits & 0x00000003u) { |
1238 | 0 | if (cached_has_bits & 0x00000001u) { |
1239 | 0 | pattern_.ClearNonDefaultToEmptyNoArena(); |
1240 | 0 | } |
1241 | 0 | if (cached_has_bits & 0x00000002u) { |
1242 | 0 | replacement_.ClearNonDefaultToEmptyNoArena(); |
1243 | 0 | } |
1244 | 0 | } |
1245 | 0 | _has_bits_.Clear(); |
1246 | 0 | _internal_metadata_.Clear(); |
1247 | 0 | } |
1248 | | |
1249 | 0 | const char* Regex::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
1250 | 0 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
1251 | 0 | _Internal::HasBits has_bits{}; |
1252 | 0 | while (!ctx->Done(&ptr)) { |
1253 | 0 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
1254 | 0 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
1255 | 0 | CHK_(ptr); |
1256 | 0 | switch (tag >> 3) { |
1257 | | // optional string pattern = 1; |
1258 | 0 | case 1: |
1259 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { |
1260 | 0 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(_internal_mutable_pattern(), ptr, ctx, "bloaty.Regex.pattern"); |
1261 | 0 | CHK_(ptr); |
1262 | 0 | } else goto handle_unusual; |
1263 | 0 | continue; |
1264 | | // optional string replacement = 2; |
1265 | 0 | case 2: |
1266 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { |
1267 | 0 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(_internal_mutable_replacement(), ptr, ctx, "bloaty.Regex.replacement"); |
1268 | 0 | CHK_(ptr); |
1269 | 0 | } else goto handle_unusual; |
1270 | 0 | continue; |
1271 | 0 | default: { |
1272 | 0 | handle_unusual: |
1273 | 0 | if ((tag & 7) == 4 || tag == 0) { |
1274 | 0 | ctx->SetLastTag(tag); |
1275 | 0 | goto success; |
1276 | 0 | } |
1277 | 0 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
1278 | 0 | CHK_(ptr != nullptr); |
1279 | 0 | continue; |
1280 | 0 | } |
1281 | 0 | } // switch |
1282 | 0 | } // while |
1283 | 0 | success: |
1284 | 0 | _has_bits_.Or(has_bits); |
1285 | 0 | return ptr; |
1286 | 0 | failure: |
1287 | 0 | ptr = nullptr; |
1288 | 0 | goto success; |
1289 | 0 | #undef CHK_ |
1290 | 0 | } |
1291 | | |
1292 | | ::PROTOBUF_NAMESPACE_ID::uint8* Regex::InternalSerializeWithCachedSizesToArray( |
1293 | 0 | ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { |
1294 | | // @@protoc_insertion_point(serialize_to_array_start:bloaty.Regex) |
1295 | 0 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1296 | 0 | (void) cached_has_bits; |
1297 | |
|
1298 | 0 | cached_has_bits = _has_bits_[0]; |
1299 | | // optional string pattern = 1; |
1300 | 0 | if (cached_has_bits & 0x00000001u) { |
1301 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( |
1302 | 0 | this->_internal_pattern().data(), static_cast<int>(this->_internal_pattern().length()), |
1303 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, |
1304 | 0 | "bloaty.Regex.pattern"); |
1305 | 0 | target = stream->WriteStringMaybeAliased( |
1306 | 0 | 1, this->_internal_pattern(), target); |
1307 | 0 | } |
1308 | | |
1309 | | // optional string replacement = 2; |
1310 | 0 | if (cached_has_bits & 0x00000002u) { |
1311 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( |
1312 | 0 | this->_internal_replacement().data(), static_cast<int>(this->_internal_replacement().length()), |
1313 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, |
1314 | 0 | "bloaty.Regex.replacement"); |
1315 | 0 | target = stream->WriteStringMaybeAliased( |
1316 | 0 | 2, this->_internal_replacement(), target); |
1317 | 0 | } |
1318 | |
|
1319 | 0 | if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { |
1320 | 0 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( |
1321 | 0 | _internal_metadata_.unknown_fields(), target, stream); |
1322 | 0 | } |
1323 | | // @@protoc_insertion_point(serialize_to_array_end:bloaty.Regex) |
1324 | 0 | return target; |
1325 | 0 | } |
1326 | | |
1327 | 0 | size_t Regex::ByteSizeLong() const { |
1328 | | // @@protoc_insertion_point(message_byte_size_start:bloaty.Regex) |
1329 | 0 | size_t total_size = 0; |
1330 | |
|
1331 | 0 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1332 | | // Prevent compiler warnings about cached_has_bits being unused |
1333 | 0 | (void) cached_has_bits; |
1334 | |
|
1335 | 0 | cached_has_bits = _has_bits_[0]; |
1336 | 0 | if (cached_has_bits & 0x00000003u) { |
1337 | | // optional string pattern = 1; |
1338 | 0 | if (cached_has_bits & 0x00000001u) { |
1339 | 0 | total_size += 1 + |
1340 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
1341 | 0 | this->_internal_pattern()); |
1342 | 0 | } |
1343 | | |
1344 | | // optional string replacement = 2; |
1345 | 0 | if (cached_has_bits & 0x00000002u) { |
1346 | 0 | total_size += 1 + |
1347 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
1348 | 0 | this->_internal_replacement()); |
1349 | 0 | } |
1350 | |
|
1351 | 0 | } |
1352 | 0 | if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { |
1353 | 0 | return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( |
1354 | 0 | _internal_metadata_, total_size, &_cached_size_); |
1355 | 0 | } |
1356 | 0 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
1357 | 0 | SetCachedSize(cached_size); |
1358 | 0 | return total_size; |
1359 | 0 | } |
1360 | | |
1361 | 0 | void Regex::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
1362 | | // @@protoc_insertion_point(generalized_merge_from_start:bloaty.Regex) |
1363 | 0 | GOOGLE_DCHECK_NE(&from, this); |
1364 | 0 | const Regex* source = |
1365 | 0 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<Regex>( |
1366 | 0 | &from); |
1367 | 0 | if (source == nullptr) { |
1368 | | // @@protoc_insertion_point(generalized_merge_from_cast_fail:bloaty.Regex) |
1369 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
1370 | 0 | } else { |
1371 | | // @@protoc_insertion_point(generalized_merge_from_cast_success:bloaty.Regex) |
1372 | 0 | MergeFrom(*source); |
1373 | 0 | } |
1374 | 0 | } |
1375 | | |
1376 | 0 | void Regex::MergeFrom(const Regex& from) { |
1377 | | // @@protoc_insertion_point(class_specific_merge_from_start:bloaty.Regex) |
1378 | 0 | GOOGLE_DCHECK_NE(&from, this); |
1379 | 0 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
1380 | 0 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1381 | 0 | (void) cached_has_bits; |
1382 | |
|
1383 | 0 | cached_has_bits = from._has_bits_[0]; |
1384 | 0 | if (cached_has_bits & 0x00000003u) { |
1385 | 0 | if (cached_has_bits & 0x00000001u) { |
1386 | 0 | _has_bits_[0] |= 0x00000001u; |
1387 | 0 | pattern_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.pattern_); |
1388 | 0 | } |
1389 | 0 | if (cached_has_bits & 0x00000002u) { |
1390 | 0 | _has_bits_[0] |= 0x00000002u; |
1391 | 0 | replacement_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.replacement_); |
1392 | 0 | } |
1393 | 0 | } |
1394 | 0 | } |
1395 | | |
1396 | 0 | void Regex::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
1397 | | // @@protoc_insertion_point(generalized_copy_from_start:bloaty.Regex) |
1398 | 0 | if (&from == this) return; |
1399 | 0 | Clear(); |
1400 | 0 | MergeFrom(from); |
1401 | 0 | } |
1402 | | |
1403 | 0 | void Regex::CopyFrom(const Regex& from) { |
1404 | | // @@protoc_insertion_point(class_specific_copy_from_start:bloaty.Regex) |
1405 | 0 | if (&from == this) return; |
1406 | 0 | Clear(); |
1407 | 0 | MergeFrom(from); |
1408 | 0 | } |
1409 | | |
1410 | 0 | bool Regex::IsInitialized() const { |
1411 | 0 | return true; |
1412 | 0 | } |
1413 | | |
1414 | 0 | void Regex::InternalSwap(Regex* other) { |
1415 | 0 | using std::swap; |
1416 | 0 | _internal_metadata_.Swap(&other->_internal_metadata_); |
1417 | 0 | swap(_has_bits_[0], other->_has_bits_[0]); |
1418 | 0 | pattern_.Swap(&other->pattern_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
1419 | 0 | GetArenaNoVirtual()); |
1420 | 0 | replacement_.Swap(&other->replacement_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
1421 | 0 | GetArenaNoVirtual()); |
1422 | 0 | } |
1423 | | |
1424 | 0 | ::PROTOBUF_NAMESPACE_ID::Metadata Regex::GetMetadata() const { |
1425 | 0 | return GetMetadataStatic(); |
1426 | 0 | } |
1427 | | |
1428 | | |
1429 | | // @@protoc_insertion_point(namespace_scope) |
1430 | | } // namespace bloaty |
1431 | | PROTOBUF_NAMESPACE_OPEN |
1432 | 0 | template<> PROTOBUF_NOINLINE ::bloaty::Options* Arena::CreateMaybeMessage< ::bloaty::Options >(Arena* arena) { |
1433 | 0 | return Arena::CreateInternal< ::bloaty::Options >(arena); |
1434 | 0 | } |
1435 | 0 | template<> PROTOBUF_NOINLINE ::bloaty::CustomDataSource* Arena::CreateMaybeMessage< ::bloaty::CustomDataSource >(Arena* arena) { |
1436 | 0 | return Arena::CreateInternal< ::bloaty::CustomDataSource >(arena); |
1437 | 0 | } |
1438 | 0 | template<> PROTOBUF_NOINLINE ::bloaty::Regex* Arena::CreateMaybeMessage< ::bloaty::Regex >(Arena* arena) { |
1439 | 0 | return Arena::CreateInternal< ::bloaty::Regex >(arena); |
1440 | 0 | } |
1441 | | PROTOBUF_NAMESPACE_CLOSE |
1442 | | |
1443 | | // @@protoc_insertion_point(global_scope) |
1444 | | #include <google/protobuf/port_undef.inc> |