YugabyteDB (2.13.0.0-b42, bfc6a6643e7399ac8a0e81d06a3ee6d6571b33ab)

Coverage Report

Created: 2022-03-09 17:30

/Users/deen/code/yugabyte-db/build/debugcov-clang-dynamic-arm64-ninja/src/yb/util/opid.pb.cc
Line
Count
Source (jump to first uncovered line)
1
// Generated by the protocol buffer compiler.  DO NOT EDIT!
2
// source: yb/util/opid.proto
3
4
#include "yb/util/opid.pb.h"
5
6
#include <algorithm>
7
8
#include <google/protobuf/stubs/common.h>
9
#include <google/protobuf/stubs/port.h>
10
#include <google/protobuf/stubs/once.h>
11
#include <google/protobuf/io/coded_stream.h>
12
#include <google/protobuf/wire_format_lite_inl.h>
13
#include <google/protobuf/descriptor.h>
14
#include <google/protobuf/generated_message_reflection.h>
15
#include <google/protobuf/reflection_ops.h>
16
#include <google/protobuf/wire_format.h>
17
// This is a temporary google only hack
18
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
19
#include "third_party/protobuf/version.h"
20
#endif
21
#include "yb/util/protobuf-annotations.h"
22
// @@protoc_insertion_point(includes)
23
namespace yb {
24
class OpIdPBDefaultTypeInternal {
25
 public:
26
  ::google::protobuf::internal::ExplicitlyConstructed<OpIdPB>
27
      _instance;
28
} _OpIdPB_default_instance_;
29
}  // namespace yb
30
namespace protobuf_yb_2futil_2fopid_2eproto {
31
17.1k
void InitDefaultsOpIdPBImpl() {
32
17.1k
  GOOGLE_PROTOBUF_VERIFY_VERSION;
33
34
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
35
  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
36
#else
37
17.1k
  ::google::protobuf::internal::InitProtobufDefaults();
38
17.1k
#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
39
17.1k
  {
40
17.1k
    void* ptr = &::yb::_OpIdPB_default_instance_;
41
17.1k
    new (ptr) ::yb::OpIdPB();
42
17.1k
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
43
17.1k
  }
44
17.1k
  ::yb::OpIdPB::InitAsDefaultInstance();
45
17.1k
}
46
47
145M
void InitDefaultsOpIdPB() {
48
145M
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
49
145M
  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsOpIdPBImpl);
50
145M
}
51
52
::google::protobuf::Metadata file_level_metadata[1];
53
54
const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
55
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::OpIdPB, _has_bits_),
56
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::OpIdPB, _internal_metadata_),
57
  ~0u,  // no _extensions_
58
  ~0u,  // no _oneof_case_
59
  ~0u,  // no _weak_field_map_
60
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::OpIdPB, term_),
61
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::OpIdPB, index_),
62
  0,
63
  1,
64
};
65
static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
66
  { 0, 7, sizeof(::yb::OpIdPB)},
67
};
68
69
static ::google::protobuf::Message const * const file_default_instances[] = {
70
  reinterpret_cast<const ::google::protobuf::Message*>(&::yb::_OpIdPB_default_instance_),
71
};
72
73
9.55k
void protobuf_AssignDescriptors() {
74
9.55k
  AddDescriptors();
75
9.55k
  ::google::protobuf::MessageFactory* factory = NULL;
76
9.55k
  AssignDescriptors(
77
9.55k
      "yb/util/opid.proto", schemas, file_default_instances, TableStruct::offsets, factory,
78
9.55k
      file_level_metadata, NULL, NULL);
79
9.55k
}
80
81
57.8M
void protobuf_AssignDescriptorsOnce() {
82
57.8M
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
83
57.8M
  ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors);
84
57.8M
}
85
86
void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
87
0
void protobuf_RegisterTypes(const ::std::string&) {
88
0
  protobuf_AssignDescriptorsOnce();
89
0
  ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 1);
90
0
}
91
92
17.1k
void AddDescriptorsImpl() {
93
17.1k
  InitDefaults();
94
17.1k
  static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
95
17.1k
      "\n\022yb/util/opid.proto\022\002yb\"%\n\006OpIdPB\022\014\n\004te"
96
17.1k
      "rm\030\001 \002(\003\022\r\n\005index\030\002 \002(\003B\010\n\006org.yb"
97
17.1k
  };
98
17.1k
  ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
99
17.1k
      descriptor, 73);
100
17.1k
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
101
17.1k
    "yb/util/opid.proto", &protobuf_RegisterTypes);
102
17.1k
}
103
104
115k
void AddDescriptors() {
105
115k
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
106
115k
  ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);
107
115k
}
108
// Force AddDescriptors() to be called at dynamic initialization time.
109
struct StaticDescriptorInitializer {
110
17.1k
  StaticDescriptorInitializer() {
111
17.1k
    AddDescriptors();
112
17.1k
  }
113
} static_descriptor_initializer;
114
}  // namespace protobuf_yb_2futil_2fopid_2eproto
115
namespace yb {
116
117
// ===================================================================
118
119
17.1k
void OpIdPB::InitAsDefaultInstance() {
120
17.1k
}
121
#if !defined(_MSC_VER) || _MSC_VER >= 1900
122
const int OpIdPB::kTermFieldNumber;
123
const int OpIdPB::kIndexFieldNumber;
124
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
125
126
OpIdPB::OpIdPB()
127
145M
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
128
145M
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
129
145M
    ::protobuf_yb_2futil_2fopid_2eproto::InitDefaultsOpIdPB();
130
145M
  }
131
145M
  SharedCtor();
132
  // @@protoc_insertion_point(constructor:yb.OpIdPB)
133
145M
}
134
OpIdPB::OpIdPB(const OpIdPB& from)
135
  : ::google::protobuf::Message(),
136
      _internal_metadata_(NULL),
137
      _has_bits_(from._has_bits_),
138
5.49M
      _cached_size_(0) {
139
5.49M
  _internal_metadata_.MergeFrom(from._internal_metadata_);
140
5.49M
  ::memcpy(&term_, &from.term_,
141
5.49M
    static_cast<size_t>(reinterpret_cast<char*>(&index_) -
142
5.49M
    reinterpret_cast<char*>(&term_)) + sizeof(index_));
143
  // @@protoc_insertion_point(copy_constructor:yb.OpIdPB)
144
5.49M
}
145
146
145M
void OpIdPB::SharedCtor() {
147
145M
  _cached_size_ = 0;
148
145M
  ::memset(&term_, 0, static_cast<size_t>(
149
145M
      reinterpret_cast<char*>(&index_) -
150
145M
      reinterpret_cast<char*>(&term_)) + sizeof(index_));
151
145M
}
152
153
150M
OpIdPB::~OpIdPB() {
154
  // @@protoc_insertion_point(destructor:yb.OpIdPB)
155
150M
  SharedDtor();
156
150M
}
157
158
150M
void OpIdPB::SharedDtor() {
159
150M
}
160
161
0
void OpIdPB::SetCachedSize(int size) const {
162
0
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
163
0
  _cached_size_ = size;
164
0
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
165
0
}
166
0
const ::google::protobuf::Descriptor* OpIdPB::descriptor() {
167
0
  ::protobuf_yb_2futil_2fopid_2eproto::protobuf_AssignDescriptorsOnce();
168
0
  return ::protobuf_yb_2futil_2fopid_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
169
0
}
170
171
0
const OpIdPB& OpIdPB::default_instance() {
172
0
  ::protobuf_yb_2futil_2fopid_2eproto::InitDefaultsOpIdPB();
173
0
  return *internal_default_instance();
174
0
}
175
176
0
OpIdPB* OpIdPB::New(::google::protobuf::Arena* arena) const {
177
0
  OpIdPB* n = new OpIdPB;
178
0
  if (arena != NULL) {
179
0
    arena->Own(n);
180
0
  }
181
0
  return n;
182
0
}
183
184
31.8M
void OpIdPB::Clear() {
185
// @@protoc_insertion_point(message_clear_start:yb.OpIdPB)
186
31.8M
  ::google::protobuf::uint32 cached_has_bits = 0;
187
  // Prevent compiler warnings about cached_has_bits being unused
188
31.8M
  (void) cached_has_bits;
189
190
31.8M
  cached_has_bits = _has_bits_[0];
191
31.8M
  if (cached_has_bits & 3u) {
192
30.4M
    ::memset(&term_, 0, static_cast<size_t>(
193
30.4M
        reinterpret_cast<char*>(&index_) -
194
30.4M
        reinterpret_cast<char*>(&term_)) + sizeof(index_));
195
30.4M
  }
196
31.8M
  _has_bits_.Clear();
197
31.8M
  _internal_metadata_.Clear();
198
31.8M
}
199
200
bool OpIdPB::MergePartialFromCodedStream(
201
67.1M
    ::google::protobuf::io::CodedInputStream* input) {
202
134M
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
203
67.1M
  ::google::protobuf::uint32 tag;
204
  // @@protoc_insertion_point(parse_start:yb.OpIdPB)
205
200M
  for (;;) {
206
200M
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
207
200M
    tag = p.first;
208
200M
    if (!p.second) goto handle_unusual;
209
133M
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
210
      // required int64 term = 1;
211
67.1M
      case 1: {
212
67.1M
        if (static_cast< ::google::protobuf::uint8>(tag) ==
213
67.1M
            static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
214
67.1M
          set_has_term();
215
67.1M
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
216
67.1M
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
217
67.1M
                 input, &term_)));
218
18.4E
        } else {
219
18.4E
          goto handle_unusual;
220
18.4E
        }
221
67.1M
        break;
222
67.1M
      }
223
224
      // required int64 index = 2;
225
67.1M
      case 2: {
226
67.1M
        if (static_cast< ::google::protobuf::uint8>(tag) ==
227
67.1M
            static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
228
67.1M
          set_has_index();
229
67.1M
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
230
67.1M
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
231
67.1M
                 input, &index_)));
232
18.4E
        } else {
233
18.4E
          goto handle_unusual;
234
18.4E
        }
235
67.1M
        break;
236
67.1M
      }
237
238
0
      default: {
239
67.1M
      handle_unusual:
240
67.1M
        if (tag == 0) {
241
67.1M
          goto success;
242
67.1M
        }
243
18.4E
        DO_(::google::protobuf::internal::WireFormat::SkipField(
244
18.4E
              input, tag, _internal_metadata_.mutable_unknown_fields()));
245
18.4E
        break;
246
18.4E
      }
247
133M
    }
248
133M
  }
249
67.1M
success:
250
  // @@protoc_insertion_point(parse_success:yb.OpIdPB)
251
67.1M
  return true;
252
0
failure:
253
  // @@protoc_insertion_point(parse_failure:yb.OpIdPB)
254
0
  return false;
255
67.1M
#undef DO_
256
67.1M
}
257
258
void OpIdPB::SerializeWithCachedSizes(
259
0
    ::google::protobuf::io::CodedOutputStream* output) const {
260
  // @@protoc_insertion_point(serialize_start:yb.OpIdPB)
261
0
  ::google::protobuf::uint32 cached_has_bits = 0;
262
0
  (void) cached_has_bits;
263
264
0
  cached_has_bits = _has_bits_[0];
265
  // required int64 term = 1;
266
0
  if (cached_has_bits & 0x00000001u) {
267
0
    ::google::protobuf::internal::WireFormatLite::WriteInt64(1, this->term(), output);
268
0
  }
269
270
  // required int64 index = 2;
271
0
  if (cached_has_bits & 0x00000002u) {
272
0
    ::google::protobuf::internal::WireFormatLite::WriteInt64(2, this->index(), output);
273
0
  }
274
275
0
  if (_internal_metadata_.have_unknown_fields()) {
276
0
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
277
0
        _internal_metadata_.unknown_fields(), output);
278
0
  }
279
  // @@protoc_insertion_point(serialize_end:yb.OpIdPB)
280
0
}
281
282
::google::protobuf::uint8* OpIdPB::InternalSerializeWithCachedSizesToArray(
283
93.1M
    bool deterministic, ::google::protobuf::uint8* target) const {
284
93.1M
  (void)deterministic; // Unused
285
  // @@protoc_insertion_point(serialize_to_array_start:yb.OpIdPB)
286
93.1M
  ::google::protobuf::uint32 cached_has_bits = 0;
287
93.1M
  (void) cached_has_bits;
288
289
93.1M
  cached_has_bits = _has_bits_[0];
290
  // required int64 term = 1;
291
93.1M
  if (cached_has_bits & 0x00000001u) {
292
93.1M
    target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(1, this->term(), target);
293
93.1M
  }
294
295
  // required int64 index = 2;
296
93.1M
  if (cached_has_bits & 0x00000002u) {
297
93.0M
    target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(2, this->index(), target);
298
93.0M
  }
299
300
93.1M
  if (_internal_metadata_.have_unknown_fields()) {
301
0
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
302
0
        _internal_metadata_.unknown_fields(), target);
303
0
  }
304
  // @@protoc_insertion_point(serialize_to_array_end:yb.OpIdPB)
305
93.1M
  return target;
306
93.1M
}
307
308
0
size_t OpIdPB::RequiredFieldsByteSizeFallback() const {
309
// @@protoc_insertion_point(required_fields_byte_size_fallback_start:yb.OpIdPB)
310
0
  size_t total_size = 0;
311
312
0
  if (has_term()) {
313
    // required int64 term = 1;
314
0
    total_size += 1 +
315
0
      ::google::protobuf::internal::WireFormatLite::Int64Size(
316
0
        this->term());
317
0
  }
318
319
0
  if (has_index()) {
320
    // required int64 index = 2;
321
0
    total_size += 1 +
322
0
      ::google::protobuf::internal::WireFormatLite::Int64Size(
323
0
        this->index());
324
0
  }
325
326
0
  return total_size;
327
0
}
328
216M
size_t OpIdPB::ByteSizeLong() const {
329
// @@protoc_insertion_point(message_byte_size_start:yb.OpIdPB)
330
216M
  size_t total_size = 0;
331
332
216M
  if (_internal_metadata_.have_unknown_fields()) {
333
0
    total_size +=
334
0
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
335
0
        _internal_metadata_.unknown_fields());
336
0
  }
337
216M
  if (((_has_bits_[0] & 0x00000003) ^ 0x00000003) == 0) {  // All required fields are present.
338
    // required int64 term = 1;
339
216M
    total_size += 1 +
340
216M
      ::google::protobuf::internal::WireFormatLite::Int64Size(
341
216M
        this->term());
342
343
    // required int64 index = 2;
344
216M
    total_size += 1 +
345
216M
      ::google::protobuf::internal::WireFormatLite::Int64Size(
346
216M
        this->index());
347
348
41.8k
  } else {
349
41.8k
    total_size += RequiredFieldsByteSizeFallback();
350
41.8k
  }
351
216M
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
352
216M
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
353
216M
  _cached_size_ = cached_size;
354
216M
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
355
216M
  return total_size;
356
216M
}
357
358
0
void OpIdPB::MergeFrom(const ::google::protobuf::Message& from) {
359
// @@protoc_insertion_point(generalized_merge_from_start:yb.OpIdPB)
360
0
  GOOGLE_DCHECK_NE(&from, this);
361
0
  const OpIdPB* source =
362
0
      ::google::protobuf::internal::DynamicCastToGenerated<const OpIdPB>(
363
0
          &from);
364
0
  if (source == NULL) {
365
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:yb.OpIdPB)
366
0
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
367
0
  } else {
368
  // @@protoc_insertion_point(generalized_merge_from_cast_success:yb.OpIdPB)
369
0
    MergeFrom(*source);
370
0
  }
371
0
}
372
373
1.51M
void OpIdPB::MergeFrom(const OpIdPB& from) {
374
// @@protoc_insertion_point(class_specific_merge_from_start:yb.OpIdPB)
375
1.51M
  GOOGLE_DCHECK_NE(&from, this);
376
1.51M
  _internal_metadata_.MergeFrom(from._internal_metadata_);
377
1.51M
  ::google::protobuf::uint32 cached_has_bits = 0;
378
1.51M
  (void) cached_has_bits;
379
380
1.51M
  cached_has_bits = from._has_bits_[0];
381
1.51M
  if (cached_has_bits & 3u) {
382
1.51M
    if (cached_has_bits & 0x00000001u) {
383
1.51M
      term_ = from.term_;
384
1.51M
    }
385
1.51M
    if (cached_has_bits & 0x00000002u) {
386
1.51M
      index_ = from.index_;
387
1.51M
    }
388
1.51M
    _has_bits_[0] |= cached_has_bits;
389
1.51M
  }
390
1.51M
}
391
392
0
void OpIdPB::CopyFrom(const ::google::protobuf::Message& from) {
393
// @@protoc_insertion_point(generalized_copy_from_start:yb.OpIdPB)
394
0
  if (&from == this) return;
395
0
  Clear();
396
0
  MergeFrom(from);
397
0
}
398
399
1.36M
void OpIdPB::CopyFrom(const OpIdPB& from) {
400
// @@protoc_insertion_point(class_specific_copy_from_start:yb.OpIdPB)
401
1.36M
  if (&from == this) return;
402
1.36M
  Clear();
403
1.36M
  MergeFrom(from);
404
1.36M
}
405
406
284M
bool OpIdPB::IsInitialized() const {
407
284M
  if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false;
408
284M
  return true;
409
284M
}
410
411
0
void OpIdPB::Swap(OpIdPB* other) {
412
0
  if (other == this) return;
413
0
  InternalSwap(other);
414
0
}
415
267k
void OpIdPB::InternalSwap(OpIdPB* other) {
416
267k
  using std::swap;
417
267k
  swap(term_, other->term_);
418
267k
  swap(index_, other->index_);
419
267k
  swap(_has_bits_[0], other->_has_bits_[0]);
420
267k
  _internal_metadata_.Swap(&other->_internal_metadata_);
421
267k
  swap(_cached_size_, other->_cached_size_);
422
267k
}
423
424
57.8M
::google::protobuf::Metadata OpIdPB::GetMetadata() const {
425
57.8M
  protobuf_yb_2futil_2fopid_2eproto::protobuf_AssignDescriptorsOnce();
426
57.8M
  return ::protobuf_yb_2futil_2fopid_2eproto::file_level_metadata[kIndexInFileMessages];
427
57.8M
}
428
429
430
// @@protoc_insertion_point(namespace_scope)
431
}  // namespace yb
432
433
// @@protoc_insertion_point(global_scope)