YugabyteDB (2.13.1.0-b60, 21121d69985fbf76aa6958d8f04a9bfa936293b5)

Coverage Report

Created: 2022-03-22 16:43

/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
28.1k
void InitDefaultsOpIdPBImpl() {
32
28.1k
  GOOGLE_PROTOBUF_VERIFY_VERSION;
33
34
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
35
  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
36
#else
37
28.1k
  ::google::protobuf::internal::InitProtobufDefaults();
38
28.1k
#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
39
28.1k
  {
40
28.1k
    void* ptr = &::yb::_OpIdPB_default_instance_;
41
28.1k
    new (ptr) ::yb::OpIdPB();
42
28.1k
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
43
28.1k
  }
44
28.1k
  ::yb::OpIdPB::InitAsDefaultInstance();
45
28.1k
}
46
47
306M
void InitDefaultsOpIdPB() {
48
306M
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
49
306M
  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsOpIdPBImpl);
50
306M
}
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
14.3k
void protobuf_AssignDescriptors() {
74
14.3k
  AddDescriptors();
75
14.3k
  ::google::protobuf::MessageFactory* factory = NULL;
76
14.3k
  AssignDescriptors(
77
14.3k
      "yb/util/opid.proto", schemas, file_default_instances, TableStruct::offsets, factory,
78
14.3k
      file_level_metadata, NULL, NULL);
79
14.3k
}
80
81
120M
void protobuf_AssignDescriptorsOnce() {
82
120M
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
83
120M
  ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors);
84
120M
}
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
28.1k
void AddDescriptorsImpl() {
93
28.1k
  InitDefaults();
94
28.1k
  static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
95
28.1k
      "\n\022yb/util/opid.proto\022\002yb\"%\n\006OpIdPB\022\014\n\004te"
96
28.1k
      "rm\030\001 \002(\003\022\r\n\005index\030\002 \002(\003B\010\n\006org.yb"
97
28.1k
  };
98
28.1k
  ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
99
28.1k
      descriptor, 73);
100
28.1k
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
101
28.1k
    "yb/util/opid.proto", &protobuf_RegisterTypes);
102
28.1k
}
103
104
185k
void AddDescriptors() {
105
185k
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
106
185k
  ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);
107
185k
}
108
// Force AddDescriptors() to be called at dynamic initialization time.
109
struct StaticDescriptorInitializer {
110
28.1k
  StaticDescriptorInitializer() {
111
28.1k
    AddDescriptors();
112
28.1k
  }
113
} static_descriptor_initializer;
114
}  // namespace protobuf_yb_2futil_2fopid_2eproto
115
namespace yb {
116
117
// ===================================================================
118
119
28.1k
void OpIdPB::InitAsDefaultInstance() {
120
28.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
306M
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
128
306M
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
129
306M
    ::protobuf_yb_2futil_2fopid_2eproto::InitDefaultsOpIdPB();
130
306M
  }
131
306M
  SharedCtor();
132
  // @@protoc_insertion_point(constructor:yb.OpIdPB)
133
306M
}
134
OpIdPB::OpIdPB(const OpIdPB& from)
135
  : ::google::protobuf::Message(),
136
      _internal_metadata_(NULL),
137
      _has_bits_(from._has_bits_),
138
10.3M
      _cached_size_(0) {
139
10.3M
  _internal_metadata_.MergeFrom(from._internal_metadata_);
140
10.3M
  ::memcpy(&term_, &from.term_,
141
10.3M
    static_cast<size_t>(reinterpret_cast<char*>(&index_) -
142
10.3M
    reinterpret_cast<char*>(&term_)) + sizeof(index_));
143
  // @@protoc_insertion_point(copy_constructor:yb.OpIdPB)
144
10.3M
}
145
146
306M
void OpIdPB::SharedCtor() {
147
306M
  _cached_size_ = 0;
148
306M
  ::memset(&term_, 0, static_cast<size_t>(
149
306M
      reinterpret_cast<char*>(&index_) -
150
306M
      reinterpret_cast<char*>(&term_)) + sizeof(index_));
151
306M
}
152
153
316M
OpIdPB::~OpIdPB() {
154
  // @@protoc_insertion_point(destructor:yb.OpIdPB)
155
316M
  SharedDtor();
156
316M
}
157
158
316M
void OpIdPB::SharedDtor() {
159
316M
}
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
77.3M
void OpIdPB::Clear() {
185
// @@protoc_insertion_point(message_clear_start:yb.OpIdPB)
186
77.3M
  ::google::protobuf::uint32 cached_has_bits = 0;
187
  // Prevent compiler warnings about cached_has_bits being unused
188
77.3M
  (void) cached_has_bits;
189
190
77.3M
  cached_has_bits = _has_bits_[0];
191
77.3M
  if (cached_has_bits & 3u) {
192
75.8M
    ::memset(&term_, 0, static_cast<size_t>(
193
75.8M
        reinterpret_cast<char*>(&index_) -
194
75.8M
        reinterpret_cast<char*>(&term_)) + sizeof(index_));
195
75.8M
  }
196
77.3M
  _has_bits_.Clear();
197
77.3M
  _internal_metadata_.Clear();
198
77.3M
}
199
200
bool OpIdPB::MergePartialFromCodedStream(
201
155M
    ::google::protobuf::io::CodedInputStream* input) {
202
311M
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) 
goto failure0
203
155M
  ::google::protobuf::uint32 tag;
204
  // @@protoc_insertion_point(parse_start:yb.OpIdPB)
205
466M
  for (;;) {
206
466M
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
207
466M
    tag = p.first;
208
466M
    if (!p.second) 
goto handle_unusual155M
;
209
310M
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
210
      // required int64 term = 1;
211
155M
      case 1: {
212
155M
        if (static_cast< ::google::protobuf::uint8>(tag) ==
213
155M
            static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
214
155M
          set_has_term();
215
155M
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
216
155M
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
217
155M
                 input, &term_)));
218
18.4E
        } else {
219
18.4E
          goto handle_unusual;
220
18.4E
        }
221
155M
        break;
222
155M
      }
223
224
      // required int64 index = 2;
225
155M
      case 2: {
226
155M
        if (static_cast< ::google::protobuf::uint8>(tag) ==
227
155M
            static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
228
155M
          set_has_index();
229
155M
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
230
155M
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
231
155M
                 input, &index_)));
232
18.4E
        } else {
233
18.4E
          goto handle_unusual;
234
18.4E
        }
235
155M
        break;
236
155M
      }
237
238
155M
      default: {
239
155M
      handle_unusual:
240
155M
        if (
tag == 0155M
) {
241
155M
          goto success;
242
155M
        }
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
310M
    }
248
310M
  }
249
155M
success:
250
  // @@protoc_insertion_point(parse_success:yb.OpIdPB)
251
155M
  return true;
252
0
failure:
253
  // @@protoc_insertion_point(parse_failure:yb.OpIdPB)
254
0
  return false;
255
155M
#undef DO_
256
155M
}
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
204M
    bool deterministic, ::google::protobuf::uint8* target) const {
284
204M
  (void)deterministic; // Unused
285
  // @@protoc_insertion_point(serialize_to_array_start:yb.OpIdPB)
286
204M
  ::google::protobuf::uint32 cached_has_bits = 0;
287
204M
  (void) cached_has_bits;
288
289
204M
  cached_has_bits = _has_bits_[0];
290
  // required int64 term = 1;
291
204M
  if (
cached_has_bits & 0x00000001u204M
) {
292
204M
    target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(1, this->term(), target);
293
204M
  }
294
295
  // required int64 index = 2;
296
204M
  if (
cached_has_bits & 0x00000002u204M
) {
297
204M
    target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(2, this->index(), target);
298
204M
  }
299
300
204M
  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
204M
  return target;
306
204M
}
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
477M
size_t OpIdPB::ByteSizeLong() const {
329
// @@protoc_insertion_point(message_byte_size_start:yb.OpIdPB)
330
477M
  size_t total_size = 0;
331
332
477M
  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
477M
  if (((_has_bits_[0] & 0x00000003) ^ 0x00000003) == 0) {  // All required fields are present.
338
    // required int64 term = 1;
339
476M
    total_size += 1 +
340
476M
      ::google::protobuf::internal::WireFormatLite::Int64Size(
341
476M
        this->term());
342
343
    // required int64 index = 2;
344
476M
    total_size += 1 +
345
476M
      ::google::protobuf::internal::WireFormatLite::Int64Size(
346
476M
        this->index());
347
348
476M
  } else {
349
95.3k
    total_size += RequiredFieldsByteSizeFallback();
350
95.3k
  }
351
477M
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
352
477M
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
353
477M
  _cached_size_ = cached_size;
354
477M
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
355
477M
  return total_size;
356
477M
}
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
2.82M
void OpIdPB::MergeFrom(const OpIdPB& from) {
374
// @@protoc_insertion_point(class_specific_merge_from_start:yb.OpIdPB)
375
2.82M
  GOOGLE_DCHECK_NE(&from, this);
376
2.82M
  _internal_metadata_.MergeFrom(from._internal_metadata_);
377
2.82M
  ::google::protobuf::uint32 cached_has_bits = 0;
378
2.82M
  (void) cached_has_bits;
379
380
2.82M
  cached_has_bits = from._has_bits_[0];
381
2.82M
  if (cached_has_bits & 3u) {
382
2.82M
    if (
cached_has_bits & 0x00000001u2.82M
) {
383
2.82M
      term_ = from.term_;
384
2.82M
    }
385
2.82M
    if (
cached_has_bits & 0x00000002u2.82M
) {
386
2.82M
      index_ = from.index_;
387
2.82M
    }
388
2.82M
    _has_bits_[0] |= cached_has_bits;
389
2.82M
  }
390
2.82M
}
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) 
return0
;
402
1.36M
  Clear();
403
1.36M
  MergeFrom(from);
404
1.36M
}
405
406
629M
bool OpIdPB::IsInitialized() const {
407
629M
  if ((_has_bits_[0] & 0x00000003) != 0x00000003) 
return false0
;
408
629M
  return true;
409
629M
}
410
411
0
void OpIdPB::Swap(OpIdPB* other) {
412
0
  if (other == this) return;
413
0
  InternalSwap(other);
414
0
}
415
452k
void OpIdPB::InternalSwap(OpIdPB* other) {
416
452k
  using std::swap;
417
452k
  swap(term_, other->term_);
418
452k
  swap(index_, other->index_);
419
452k
  swap(_has_bits_[0], other->_has_bits_[0]);
420
452k
  _internal_metadata_.Swap(&other->_internal_metadata_);
421
452k
  swap(_cached_size_, other->_cached_size_);
422
452k
}
423
424
120M
::google::protobuf::Metadata OpIdPB::GetMetadata() const {
425
120M
  protobuf_yb_2futil_2fopid_2eproto::protobuf_AssignDescriptorsOnce();
426
120M
  return ::protobuf_yb_2futil_2fopid_2eproto::file_level_metadata[kIndexInFileMessages];
427
120M
}
428
429
430
// @@protoc_insertion_point(namespace_scope)
431
}  // namespace yb
432
433
// @@protoc_insertion_point(global_scope)