Coverage Report

Created: 2023-11-19 06:10

/proc/self/cwd/external/com_google_protobuf/src/google/protobuf/descriptor.cc
Line
Count
Source (jump to first uncovered line)
1
// Protocol Buffers - Google's data interchange format
2
// Copyright 2008 Google Inc.  All rights reserved.
3
// https://developers.google.com/protocol-buffers/
4
//
5
// Redistribution and use in source and binary forms, with or without
6
// modification, are permitted provided that the following conditions are
7
// met:
8
//
9
//     * Redistributions of source code must retain the above copyright
10
// notice, this list of conditions and the following disclaimer.
11
//     * Redistributions in binary form must reproduce the above
12
// copyright notice, this list of conditions and the following disclaimer
13
// in the documentation and/or other materials provided with the
14
// distribution.
15
//     * Neither the name of Google Inc. nor the names of its
16
// contributors may be used to endorse or promote products derived from
17
// this software without specific prior written permission.
18
//
19
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
31
// Author: kenton@google.com (Kenton Varda)
32
//  Based on original Protocol Buffers design by
33
//  Sanjay Ghemawat, Jeff Dean, and others.
34
35
#include "google/protobuf/descriptor.h"
36
37
#include <algorithm>
38
#include <array>
39
#include <cstdlib>
40
#include <functional>
41
#include <iterator>
42
#include <limits>
43
#include <memory>
44
#include <sstream>
45
#include <string>
46
#include <type_traits>
47
#include <vector>
48
49
#include "google/protobuf/stubs/common.h"
50
#include "absl/base/call_once.h"
51
#include "absl/base/casts.h"
52
#include "absl/base/dynamic_annotations.h"
53
#include "absl/container/btree_map.h"
54
#include "absl/container/flat_hash_map.h"
55
#include "absl/container/flat_hash_set.h"
56
#include "absl/functional/function_ref.h"
57
#include "absl/hash/hash.h"
58
#include "absl/log/absl_check.h"
59
#include "absl/log/absl_log.h"
60
#include "absl/strings/ascii.h"
61
#include "absl/strings/escaping.h"
62
#include "absl/strings/match.h"
63
#include "absl/strings/str_cat.h"
64
#include "absl/strings/str_format.h"
65
#include "absl/strings/str_join.h"
66
#include "absl/strings/str_split.h"
67
#include "absl/strings/string_view.h"
68
#include "absl/strings/strip.h"
69
#include "absl/strings/substitute.h"
70
#include "absl/synchronization/mutex.h"
71
#include "absl/types/optional.h"
72
#include "google/protobuf/any.h"
73
#include "google/protobuf/descriptor.pb.h"
74
#include "google/protobuf/descriptor_database.h"
75
#include "google/protobuf/descriptor_legacy.h"
76
#include "google/protobuf/dynamic_message.h"
77
#include "google/protobuf/generated_message_util.h"
78
#include "google/protobuf/io/strtod.h"
79
#include "google/protobuf/io/tokenizer.h"
80
#include "google/protobuf/port.h"
81
#include "google/protobuf/repeated_ptr_field.h"
82
#include "google/protobuf/text_format.h"
83
#include "google/protobuf/unknown_field_set.h"
84
85
86
// Must be included last.
87
#include "google/protobuf/port_def.inc"
88
89
namespace google {
90
namespace protobuf {
91
namespace {
92
using ::google::protobuf::internal::DownCast;
93
94
const int kPackageLimit = 100;
95
96
97
0
std::string ToCamelCase(const std::string& input, bool lower_first) {
98
0
  bool capitalize_next = !lower_first;
99
0
  std::string result;
100
0
  result.reserve(input.size());
101
102
0
  for (char character : input) {
103
0
    if (character == '_') {
104
0
      capitalize_next = true;
105
0
    } else if (capitalize_next) {
106
0
      result.push_back(absl::ascii_toupper(character));
107
0
      capitalize_next = false;
108
0
    } else {
109
0
      result.push_back(character);
110
0
    }
111
0
  }
112
113
  // Lower-case the first letter.
114
0
  if (lower_first && !result.empty()) {
115
0
    result[0] = absl::ascii_tolower(result[0]);
116
0
  }
117
118
0
  return result;
119
0
}
120
121
0
std::string ToJsonName(const std::string& input) {
122
0
  bool capitalize_next = false;
123
0
  std::string result;
124
0
  result.reserve(input.size());
125
126
0
  for (char character : input) {
127
0
    if (character == '_') {
128
0
      capitalize_next = true;
129
0
    } else if (capitalize_next) {
130
0
      result.push_back(absl::ascii_toupper(character));
131
0
      capitalize_next = false;
132
0
    } else {
133
0
      result.push_back(character);
134
0
    }
135
0
  }
136
137
0
  return result;
138
0
}
139
140
template <typename OptionsT>
141
0
bool IsLegacyJsonFieldConflictEnabled(const OptionsT& options) {
142
0
#ifdef __GNUC__
143
0
#pragma GCC diagnostic push
144
0
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
145
0
#endif
146
0
  return options.deprecated_legacy_json_field_conflicts();
147
0
#ifdef __GNUC__
148
0
#pragma GCC diagnostic pop
149
0
#endif
150
0
}
Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::IsLegacyJsonFieldConflictEnabled<google::protobuf::MessageOptions>(google::protobuf::MessageOptions const&)
Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::IsLegacyJsonFieldConflictEnabled<google::protobuf::EnumOptions>(google::protobuf::EnumOptions const&)
151
152
// Backport of fold expressions for the comma operator to C++11.
153
// Usage:  Fold({expr...});
154
// Guaranteed to evaluate left-to-right
155
struct ExpressionEater {
156
  template <typename T>
157
0
  ExpressionEater(T&&) {}  // NOLINT
Unexecuted instantiation: descriptor.cc:google::protobuf::(anonymous namespace)::ExpressionEater::ExpressionEater<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&)
Unexecuted instantiation: descriptor.cc:google::protobuf::(anonymous namespace)::ExpressionEater::ExpressionEater<bool>(bool&&)
Unexecuted instantiation: descriptor.cc:google::protobuf::(anonymous namespace)::ExpressionEater::ExpressionEater<int&>(int&)
Unexecuted instantiation: descriptor.cc:google::protobuf::(anonymous namespace)::ExpressionEater::ExpressionEater<char*&>(char*&)
Unexecuted instantiation: descriptor.cc:google::protobuf::(anonymous namespace)::ExpressionEater::ExpressionEater<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*&>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*&)
Unexecuted instantiation: descriptor.cc:google::protobuf::(anonymous namespace)::ExpressionEater::ExpressionEater<google::protobuf::SourceCodeInfo*&>(google::protobuf::SourceCodeInfo*&)
Unexecuted instantiation: descriptor.cc:google::protobuf::(anonymous namespace)::ExpressionEater::ExpressionEater<google::protobuf::FileDescriptorTables*&>(google::protobuf::FileDescriptorTables*&)
Unexecuted instantiation: descriptor.cc:google::protobuf::(anonymous namespace)::ExpressionEater::ExpressionEater<google::protobuf::MessageOptions*&>(google::protobuf::MessageOptions*&)
Unexecuted instantiation: descriptor.cc:google::protobuf::(anonymous namespace)::ExpressionEater::ExpressionEater<google::protobuf::FieldOptions*&>(google::protobuf::FieldOptions*&)
Unexecuted instantiation: descriptor.cc:google::protobuf::(anonymous namespace)::ExpressionEater::ExpressionEater<google::protobuf::EnumOptions*&>(google::protobuf::EnumOptions*&)
Unexecuted instantiation: descriptor.cc:google::protobuf::(anonymous namespace)::ExpressionEater::ExpressionEater<google::protobuf::EnumValueOptions*&>(google::protobuf::EnumValueOptions*&)
Unexecuted instantiation: descriptor.cc:google::protobuf::(anonymous namespace)::ExpressionEater::ExpressionEater<google::protobuf::ExtensionRangeOptions*&>(google::protobuf::ExtensionRangeOptions*&)
Unexecuted instantiation: descriptor.cc:google::protobuf::(anonymous namespace)::ExpressionEater::ExpressionEater<google::protobuf::OneofOptions*&>(google::protobuf::OneofOptions*&)
Unexecuted instantiation: descriptor.cc:google::protobuf::(anonymous namespace)::ExpressionEater::ExpressionEater<google::protobuf::ServiceOptions*&>(google::protobuf::ServiceOptions*&)
Unexecuted instantiation: descriptor.cc:google::protobuf::(anonymous namespace)::ExpressionEater::ExpressionEater<google::protobuf::MethodOptions*&>(google::protobuf::MethodOptions*&)
Unexecuted instantiation: descriptor.cc:google::protobuf::(anonymous namespace)::ExpressionEater::ExpressionEater<google::protobuf::FileOptions*&>(google::protobuf::FileOptions*&)
158
};
159
0
void Fold(std::initializer_list<ExpressionEater>) {}
160
161
template <int R>
162
0
constexpr size_t RoundUpTo(size_t n) {
163
0
  static_assert((R & (R - 1)) == 0, "Must be power of two");
164
0
  return (n + (R - 1)) & ~(R - 1);
165
0
}
166
167
0
constexpr size_t Max(size_t a, size_t b) { return a > b ? a : b; }
168
template <typename T, typename... Ts>
169
0
constexpr size_t Max(T a, Ts... b) {
170
0
  return Max(a, Max(b...));
171
0
}
Unexecuted instantiation: descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::Max<unsigned long, unsigned long, unsigned long>(unsigned long, unsigned long, unsigned long)
Unexecuted instantiation: descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::Max<unsigned long, unsigned long, unsigned long, unsigned long>(unsigned long, unsigned long, unsigned long, unsigned long)
Unexecuted instantiation: descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::Max<unsigned long, unsigned long, unsigned long, unsigned long, unsigned long>(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long)
Unexecuted instantiation: descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::Max<unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long>(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long)
Unexecuted instantiation: descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::Max<unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long>(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long)
Unexecuted instantiation: descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::Max<unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long>(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long)
Unexecuted instantiation: descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::Max<unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long>(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long)
Unexecuted instantiation: descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::Max<unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long>(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long)
Unexecuted instantiation: descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::Max<unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long>(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long)
Unexecuted instantiation: descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::Max<unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long>(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long)
Unexecuted instantiation: descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::Max<unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long>(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long)
172
173
template <typename T>
174
0
constexpr size_t EffectiveAlignof() {
175
0
  // `char` is special in that it gets aligned to 8. It is where we drop the
176
0
  // trivial structs.
177
0
  return std::is_same<T, char>::value ? 8 : alignof(T);
178
0
}
Unexecuted instantiation: descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::EffectiveAlignof<char>()
Unexecuted instantiation: descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::EffectiveAlignof<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >()
Unexecuted instantiation: descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::EffectiveAlignof<google::protobuf::SourceCodeInfo>()
Unexecuted instantiation: descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::EffectiveAlignof<google::protobuf::FileDescriptorTables>()
Unexecuted instantiation: descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::EffectiveAlignof<google::protobuf::MessageOptions>()
Unexecuted instantiation: descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::EffectiveAlignof<google::protobuf::FieldOptions>()
Unexecuted instantiation: descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::EffectiveAlignof<google::protobuf::EnumOptions>()
Unexecuted instantiation: descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::EffectiveAlignof<google::protobuf::EnumValueOptions>()
Unexecuted instantiation: descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::EffectiveAlignof<google::protobuf::ExtensionRangeOptions>()
Unexecuted instantiation: descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::EffectiveAlignof<google::protobuf::OneofOptions>()
Unexecuted instantiation: descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::EffectiveAlignof<google::protobuf::ServiceOptions>()
Unexecuted instantiation: descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::EffectiveAlignof<google::protobuf::MethodOptions>()
Unexecuted instantiation: descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::EffectiveAlignof<google::protobuf::FileOptions>()
179
180
template <int align, typename U, typename... T>
181
using AppendIfAlign =
182
    typename std::conditional<EffectiveAlignof<U>() == align, void (*)(T..., U),
183
                              void (*)(T...)>::type;
184
185
// Metafunction to sort types in descending order of alignment.
186
// Useful for the flat allocator to ensure proper alignment of all elements
187
// without having to add padding.
188
// Instead of implementing a proper sort metafunction we just do a
189
// filter+merge, which is much simpler to write as a metafunction.
190
// We have a fixed set of alignments we can filter on.
191
// For simplicity we use a function pointer as a type list.
192
template <typename In, typename T16, typename T8, typename T4, typename T2,
193
          typename T1>
194
struct TypeListSortImpl;
195
196
template <typename... T16, typename... T8, typename... T4, typename... T2,
197
          typename... T1>
198
struct TypeListSortImpl<void (*)(), void (*)(T16...), void (*)(T8...),
199
                        void (*)(T4...), void (*)(T2...), void (*)(T1...)> {
200
  using type = void (*)(T16..., T8..., T4..., T2..., T1...);
201
};
202
203
template <typename First, typename... Rest, typename... T16, typename... T8,
204
          typename... T4, typename... T2, typename... T1>
205
struct TypeListSortImpl<void (*)(First, Rest...), void (*)(T16...),
206
                        void (*)(T8...), void (*)(T4...), void (*)(T2...),
207
                        void (*)(T1...)> {
208
  using type = typename TypeListSortImpl<
209
      void (*)(Rest...), AppendIfAlign<16, First, T16...>,
210
      AppendIfAlign<8, First, T8...>, AppendIfAlign<4, First, T4...>,
211
      AppendIfAlign<2, First, T2...>, AppendIfAlign<1, First, T1...>>::type;
212
};
213
214
template <typename... T>
215
using SortByAlignment =
216
    typename TypeListSortImpl<void (*)(T...), void (*)(), void (*)(),
217
                              void (*)(), void (*)(), void (*)()>::type;
218
219
template <template <typename...> class C, typename... T>
220
auto ApplyTypeList(void (*)(T...)) -> C<T...>;
221
222
template <typename T>
223
0
constexpr int FindTypeIndex() {
224
0
  return -1;
225
0
}
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<char>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::SourceCodeInfo>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FileDescriptorTables>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::MessageOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FieldOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::EnumOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::EnumValueOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::ExtensionRangeOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::OneofOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::ServiceOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::MethodOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FileOptions>()
226
227
template <typename T, typename T1, typename... Ts>
228
0
constexpr int FindTypeIndex() {
229
0
  return std::is_same<T, T1>::value ? 0 : FindTypeIndex<T, Ts...>() + 1;
230
0
}
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<char, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<char, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<char, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<char, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<char, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<char, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<char, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<char, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<char, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<char, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<char, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<char, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::SourceCodeInfo, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::SourceCodeInfo, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::SourceCodeInfo, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::SourceCodeInfo, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::SourceCodeInfo, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::SourceCodeInfo, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::SourceCodeInfo, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::SourceCodeInfo, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::SourceCodeInfo, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::SourceCodeInfo, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::SourceCodeInfo, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::SourceCodeInfo, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FileDescriptorTables, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FileDescriptorTables, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FileDescriptorTables, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FileDescriptorTables, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FileDescriptorTables, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FileDescriptorTables, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FileDescriptorTables, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FileDescriptorTables, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FileDescriptorTables, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FileDescriptorTables, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FileDescriptorTables, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FileDescriptorTables, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::MessageOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::MessageOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::MessageOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::MessageOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::MessageOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::MessageOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::MessageOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::MessageOptions, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::MessageOptions, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::MessageOptions, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::MessageOptions, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::MessageOptions, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FieldOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FieldOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FieldOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FieldOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FieldOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FieldOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FieldOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FieldOptions, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FieldOptions, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FieldOptions, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FieldOptions, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FieldOptions, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::EnumOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::EnumOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::EnumOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::EnumOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::EnumOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::EnumOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::EnumOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::EnumOptions, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::EnumOptions, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::EnumOptions, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::EnumOptions, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::EnumOptions, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::EnumValueOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::EnumValueOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::EnumValueOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::EnumValueOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::EnumValueOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::EnumValueOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::EnumValueOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::EnumValueOptions, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::EnumValueOptions, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::EnumValueOptions, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::EnumValueOptions, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::EnumValueOptions, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::ExtensionRangeOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::ExtensionRangeOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::ExtensionRangeOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::ExtensionRangeOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::ExtensionRangeOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::ExtensionRangeOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::ExtensionRangeOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::ExtensionRangeOptions, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::ExtensionRangeOptions, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::ExtensionRangeOptions, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::ExtensionRangeOptions, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::ExtensionRangeOptions, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::OneofOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::OneofOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::OneofOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::OneofOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::OneofOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::OneofOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::OneofOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::OneofOptions, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::OneofOptions, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::OneofOptions, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::OneofOptions, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::OneofOptions, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::ServiceOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::ServiceOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::ServiceOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::ServiceOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::ServiceOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::ServiceOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::ServiceOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::ServiceOptions, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::ServiceOptions, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::ServiceOptions, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::ServiceOptions, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::ServiceOptions, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::MethodOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::MethodOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::MethodOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::MethodOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::MethodOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::MethodOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::MethodOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::MethodOptions, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::MethodOptions, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::MethodOptions, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::MethodOptions, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::MethodOptions, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FileOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FileOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FileOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FileOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FileOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FileOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FileOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FileOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FileOptions, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FileOptions, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FileOptions, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FileOptions, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FileOptions, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>()
231
232
// A type to value map, where the possible keys as specified in `Keys...`.
233
// The values for key `K` is `ValueT<K>`
234
template <template <typename> class ValueT, typename... Keys>
235
class TypeMap {
236
 public:
237
  template <typename K>
238
0
  ValueT<K>& Get() {
239
0
    return static_cast<Base<K>&>(payload_).value;
240
0
  }
Unexecuted instantiation: descriptor.cc:std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::PointerT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >()
Unexecuted instantiation: descriptor.cc:int& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::IntT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >()
Unexecuted instantiation: descriptor.cc:int& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::IntT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::FileDescriptorTables>()
Unexecuted instantiation: descriptor.cc:int& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::IntT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::FileOptions>()
Unexecuted instantiation: descriptor.cc:int& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::IntT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::SourceCodeInfo>()
Unexecuted instantiation: descriptor.cc:int& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::IntT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<char>()
Unexecuted instantiation: descriptor.cc:int& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::IntT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::ServiceOptions>()
Unexecuted instantiation: descriptor.cc:int& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::IntT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::MethodOptions>()
Unexecuted instantiation: descriptor.cc:int& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::IntT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::MessageOptions>()
Unexecuted instantiation: descriptor.cc:int& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::IntT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::ExtensionRangeOptions>()
Unexecuted instantiation: descriptor.cc:int& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::IntT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::OneofOptions>()
Unexecuted instantiation: descriptor.cc:int& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::IntT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::EnumOptions>()
Unexecuted instantiation: descriptor.cc:int& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::IntT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::EnumValueOptions>()
Unexecuted instantiation: descriptor.cc:int& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::IntT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::FieldOptions>()
Unexecuted instantiation: descriptor.cc:char*& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::PointerT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<char>()
Unexecuted instantiation: descriptor.cc:google::protobuf::SourceCodeInfo*& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::PointerT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::SourceCodeInfo>()
Unexecuted instantiation: descriptor.cc:google::protobuf::FileDescriptorTables*& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::PointerT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::FileDescriptorTables>()
Unexecuted instantiation: descriptor.cc:google::protobuf::MessageOptions*& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::PointerT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::MessageOptions>()
Unexecuted instantiation: descriptor.cc:google::protobuf::FieldOptions*& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::PointerT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::FieldOptions>()
Unexecuted instantiation: descriptor.cc:google::protobuf::EnumOptions*& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::PointerT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::EnumOptions>()
Unexecuted instantiation: descriptor.cc:google::protobuf::EnumValueOptions*& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::PointerT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::EnumValueOptions>()
Unexecuted instantiation: descriptor.cc:google::protobuf::ExtensionRangeOptions*& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::PointerT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::ExtensionRangeOptions>()
Unexecuted instantiation: descriptor.cc:google::protobuf::OneofOptions*& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::PointerT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::OneofOptions>()
Unexecuted instantiation: descriptor.cc:google::protobuf::ServiceOptions*& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::PointerT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::ServiceOptions>()
Unexecuted instantiation: descriptor.cc:google::protobuf::MethodOptions*& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::PointerT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::MethodOptions>()
Unexecuted instantiation: descriptor.cc:google::protobuf::FileOptions*& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::PointerT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::FileOptions>()
241
242
  template <typename K>
243
0
  const ValueT<K>& Get() const {
244
0
    return static_cast<const Base<K>&>(payload_).value;
245
0
  }
Unexecuted instantiation: descriptor.cc:char* const& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::PointerT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<char>() const
Unexecuted instantiation: descriptor.cc:int const& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::IntT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<char>() const
Unexecuted instantiation: descriptor.cc:int const& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::IntT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >() const
Unexecuted instantiation: descriptor.cc:int const& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::IntT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::SourceCodeInfo>() const
Unexecuted instantiation: descriptor.cc:int const& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::IntT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::FileDescriptorTables>() const
Unexecuted instantiation: descriptor.cc:int const& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::IntT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::MessageOptions>() const
Unexecuted instantiation: descriptor.cc:int const& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::IntT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::FieldOptions>() const
Unexecuted instantiation: descriptor.cc:int const& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::IntT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::EnumOptions>() const
Unexecuted instantiation: descriptor.cc:int const& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::IntT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::EnumValueOptions>() const
Unexecuted instantiation: descriptor.cc:int const& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::IntT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::ExtensionRangeOptions>() const
Unexecuted instantiation: descriptor.cc:int const& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::IntT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::OneofOptions>() const
Unexecuted instantiation: descriptor.cc:int const& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::IntT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::ServiceOptions>() const
Unexecuted instantiation: descriptor.cc:int const& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::IntT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::MethodOptions>() const
Unexecuted instantiation: descriptor.cc:int const& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::IntT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::FileOptions>() const
246
247
 private:
248
  template <typename K>
249
  struct Base {
250
    ValueT<K> value{};
251
  };
252
  struct Payload : Base<Keys>... {};
253
  Payload payload_;
254
};
255
256
template <typename T>
257
using IntT = int;
258
template <typename T>
259
using PointerT = T*;
260
261
// Manages an allocation of sequential arrays of type `T...`.
262
// It is more space efficient than storing N (ptr, size) pairs, by storing only
263
// the pointer to the head and the boundaries between the arrays.
264
template <typename... T>
265
class FlatAllocation {
266
 public:
267
  static constexpr size_t kMaxAlign = Max(alignof(T)...);
268
269
0
  FlatAllocation(const TypeMap<IntT, T...>& ends) : ends_(ends) {
270
    // The arrays start just after FlatAllocation, so adjust the ends.
271
0
    Fold({(ends_.template Get<T>() +=
272
0
           RoundUpTo<kMaxAlign>(sizeof(FlatAllocation)))...});
273
0
    Fold({Init<T>()...});
274
0
  }
275
276
0
  void Destroy() {
277
0
    Fold({Destroy<T>()...});
278
0
    internal::SizedDelete(this, total_bytes());
279
0
  }
280
281
  template <int I>
282
  using type = typename std::tuple_element<I, std::tuple<T...>>::type;
283
284
  // Gets a tuple of the head pointers for the arrays
285
0
  TypeMap<PointerT, T...> Pointers() const {
286
0
    TypeMap<PointerT, T...> out;
287
0
    Fold({(out.template Get<T>() = Begin<T>())...});
288
0
    return out;
289
0
  }
290
291
292
 private:
293
  // Total number of bytes used by all arrays.
294
0
  int total_bytes() const {
295
    // Get the last end.
296
0
    return ends_.template Get<typename std::tuple_element<
297
0
        sizeof...(T) - 1, std::tuple<T...>>::type>();
298
0
  }
299
300
301
  template <typename U>
302
0
  int BeginOffset() const {
303
0
    constexpr int type_index = FindTypeIndex<U, T...>();
304
    // Avoid a negative value here to keep it compiling when type_index == 0
305
0
    constexpr int prev_type_index = type_index == 0 ? 0 : type_index - 1;
306
0
    using PrevType =
307
0
        typename std::tuple_element<prev_type_index, std::tuple<T...>>::type;
308
    // Ensure the types are properly aligned.
309
0
    static_assert(EffectiveAlignof<PrevType>() >= EffectiveAlignof<U>(), "");
310
0
    return type_index == 0 ? RoundUpTo<kMaxAlign>(sizeof(FlatAllocation))
311
0
                           : ends_.template Get<PrevType>();
312
0
  }
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::BeginOffset<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >() const
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::BeginOffset<google::protobuf::SourceCodeInfo>() const
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::BeginOffset<google::protobuf::FileDescriptorTables>() const
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::BeginOffset<google::protobuf::MessageOptions>() const
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::BeginOffset<google::protobuf::FieldOptions>() const
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::BeginOffset<google::protobuf::EnumOptions>() const
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::BeginOffset<google::protobuf::EnumValueOptions>() const
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::BeginOffset<google::protobuf::ExtensionRangeOptions>() const
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::BeginOffset<google::protobuf::OneofOptions>() const
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::BeginOffset<google::protobuf::ServiceOptions>() const
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::BeginOffset<google::protobuf::MethodOptions>() const
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::BeginOffset<google::protobuf::FileOptions>() const
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::BeginOffset<char>() const
313
314
  template <typename U>
315
0
  int EndOffset() const {
316
0
    return ends_.template Get<U>();
317
0
  }
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::EndOffset<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >() const
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::EndOffset<google::protobuf::SourceCodeInfo>() const
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::EndOffset<google::protobuf::FileDescriptorTables>() const
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::EndOffset<google::protobuf::MessageOptions>() const
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::EndOffset<google::protobuf::FieldOptions>() const
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::EndOffset<google::protobuf::EnumOptions>() const
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::EndOffset<google::protobuf::EnumValueOptions>() const
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::EndOffset<google::protobuf::ExtensionRangeOptions>() const
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::EndOffset<google::protobuf::OneofOptions>() const
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::EndOffset<google::protobuf::ServiceOptions>() const
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::EndOffset<google::protobuf::MethodOptions>() const
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::EndOffset<google::protobuf::FileOptions>() const
Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::EndOffset<char>() const
318
319
  // Avoid the reinterpret_cast if the array is empty.
320
  // Clang's Control Flow Integrity does not like the cast pointing to memory
321
  // that is not yet initialized to be of that type.
322
  // (from -fsanitize=cfi-unrelated-cast)
323
  template <typename U>
324
0
  U* Begin() const {
325
0
    int begin = BeginOffset<U>(), end = EndOffset<U>();
326
0
    if (begin == end) return nullptr;
327
0
    return reinterpret_cast<U*>(data() + begin);
328
0
  }
Unexecuted instantiation: descriptor.cc:std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >* google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Begin<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >() const
Unexecuted instantiation: descriptor.cc:google::protobuf::SourceCodeInfo* google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Begin<google::protobuf::SourceCodeInfo>() const
Unexecuted instantiation: descriptor.cc:google::protobuf::FileDescriptorTables* google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Begin<google::protobuf::FileDescriptorTables>() const
Unexecuted instantiation: descriptor.cc:google::protobuf::MessageOptions* google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Begin<google::protobuf::MessageOptions>() const
Unexecuted instantiation: descriptor.cc:google::protobuf::FieldOptions* google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Begin<google::protobuf::FieldOptions>() const
Unexecuted instantiation: descriptor.cc:google::protobuf::EnumOptions* google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Begin<google::protobuf::EnumOptions>() const
Unexecuted instantiation: descriptor.cc:google::protobuf::EnumValueOptions* google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Begin<google::protobuf::EnumValueOptions>() const
Unexecuted instantiation: descriptor.cc:google::protobuf::ExtensionRangeOptions* google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Begin<google::protobuf::ExtensionRangeOptions>() const
Unexecuted instantiation: descriptor.cc:google::protobuf::OneofOptions* google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Begin<google::protobuf::OneofOptions>() const
Unexecuted instantiation: descriptor.cc:google::protobuf::ServiceOptions* google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Begin<google::protobuf::ServiceOptions>() const
Unexecuted instantiation: descriptor.cc:google::protobuf::MethodOptions* google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Begin<google::protobuf::MethodOptions>() const
Unexecuted instantiation: descriptor.cc:google::protobuf::FileOptions* google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Begin<google::protobuf::FileOptions>() const
Unexecuted instantiation: descriptor.cc:char* google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Begin<char>() const
329
330
  template <typename U>
331
0
  U* End() const {
332
0
    int begin = BeginOffset<U>(), end = EndOffset<U>();
333
0
    if (begin == end) return nullptr;
334
0
    return reinterpret_cast<U*>(data() + end);
335
0
  }
Unexecuted instantiation: descriptor.cc:std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >* google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::End<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >() const
Unexecuted instantiation: descriptor.cc:google::protobuf::SourceCodeInfo* google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::End<google::protobuf::SourceCodeInfo>() const
Unexecuted instantiation: descriptor.cc:google::protobuf::FileDescriptorTables* google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::End<google::protobuf::FileDescriptorTables>() const
Unexecuted instantiation: descriptor.cc:google::protobuf::MessageOptions* google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::End<google::protobuf::MessageOptions>() const
Unexecuted instantiation: descriptor.cc:google::protobuf::FieldOptions* google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::End<google::protobuf::FieldOptions>() const
Unexecuted instantiation: descriptor.cc:google::protobuf::EnumOptions* google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::End<google::protobuf::EnumOptions>() const
Unexecuted instantiation: descriptor.cc:google::protobuf::EnumValueOptions* google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::End<google::protobuf::EnumValueOptions>() const
Unexecuted instantiation: descriptor.cc:google::protobuf::ExtensionRangeOptions* google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::End<google::protobuf::ExtensionRangeOptions>() const
Unexecuted instantiation: descriptor.cc:google::protobuf::OneofOptions* google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::End<google::protobuf::OneofOptions>() const
Unexecuted instantiation: descriptor.cc:google::protobuf::ServiceOptions* google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::End<google::protobuf::ServiceOptions>() const
Unexecuted instantiation: descriptor.cc:google::protobuf::MethodOptions* google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::End<google::protobuf::MethodOptions>() const
Unexecuted instantiation: descriptor.cc:google::protobuf::FileOptions* google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::End<google::protobuf::FileOptions>() const
Unexecuted instantiation: descriptor.cc:char* google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::End<char>() const
336
337
  template <typename U>
338
0
  bool Init() {
339
    // Skip for the `char` block. No need to zero initialize it.
340
0
    if (std::is_same<U, char>::value) return true;
341
0
    for (char *p = data() + BeginOffset<U>(), *end = data() + EndOffset<U>();
342
0
         p != end; p += sizeof(U)) {
343
0
      ::new (p) U{};
344
0
    }
345
0
    return true;
346
0
  }
Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Init<char>()
Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Init<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >()
Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Init<google::protobuf::SourceCodeInfo>()
Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Init<google::protobuf::FileDescriptorTables>()
Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Init<google::protobuf::MessageOptions>()
Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Init<google::protobuf::FieldOptions>()
Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Init<google::protobuf::EnumOptions>()
Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Init<google::protobuf::EnumValueOptions>()
Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Init<google::protobuf::ExtensionRangeOptions>()
Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Init<google::protobuf::OneofOptions>()
Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Init<google::protobuf::ServiceOptions>()
Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Init<google::protobuf::MethodOptions>()
Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Init<google::protobuf::FileOptions>()
347
348
  template <typename U>
349
0
  bool Destroy() {
350
0
    if (std::is_trivially_destructible<U>::value) return true;
351
0
    for (U* it = Begin<U>(), *end = End<U>(); it != end; ++it) {
352
0
      it->~U();
353
0
    }
354
0
    return true;
355
0
  }
Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Destroy<char>()
Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Destroy<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >()
Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Destroy<google::protobuf::SourceCodeInfo>()
Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Destroy<google::protobuf::FileDescriptorTables>()
Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Destroy<google::protobuf::MessageOptions>()
Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Destroy<google::protobuf::FieldOptions>()
Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Destroy<google::protobuf::EnumOptions>()
Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Destroy<google::protobuf::EnumValueOptions>()
Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Destroy<google::protobuf::ExtensionRangeOptions>()
Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Destroy<google::protobuf::OneofOptions>()
Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Destroy<google::protobuf::ServiceOptions>()
Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Destroy<google::protobuf::MethodOptions>()
Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Destroy<google::protobuf::FileOptions>()
356
357
0
  char* data() const {
358
0
    return const_cast<char*>(reinterpret_cast<const char*>(this));
359
0
  }
360
361
  TypeMap<IntT, T...> ends_;
362
};
363
364
template <typename... T>
365
0
TypeMap<IntT, T...> CalculateEnds(const TypeMap<IntT, T...>& sizes) {
366
0
  int total = 0;
367
0
  TypeMap<IntT, T...> out;
368
0
  Fold({(out.template Get<T>() = total +=
369
0
         sizeof(T) * sizes.template Get<T>())...});
370
0
  return out;
371
0
}
372
373
// The implementation for FlatAllocator below.
374
// This separate class template makes it easier to have methods that fold on
375
// `T...`.
376
template <typename... T>
377
class FlatAllocatorImpl {
378
 public:
379
  using Allocation = FlatAllocation<T...>;
380
381
  template <typename U>
382
0
  void PlanArray(int array_size) {
383
    // We can't call PlanArray after FinalizePlanning has been called.
384
0
    ABSL_CHECK(!has_allocated());
385
0
    if (std::is_trivially_destructible<U>::value) {
386
      // Trivial types are aligned to 8 bytes.
387
0
      static_assert(alignof(U) <= 8, "");
388
0
      total_.template Get<char>() += RoundUpTo<8>(array_size * sizeof(U));
389
0
    } else {
390
      // Since we can't use `if constexpr`, just make the expression compile
391
      // when this path is not taken.
392
0
      using TypeToUse =
393
0
          typename std::conditional<std::is_trivially_destructible<U>::value,
394
0
                                    char, U>::type;
395
0
      total_.template Get<TypeToUse>() += array_size;
396
0
    }
397
0
  }
Unexecuted instantiation: descriptor.cc:void google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::PlanArray<google::protobuf::FileDescriptorTables>(int)
Unexecuted instantiation: descriptor.cc:void google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::PlanArray<google::protobuf::FileOptions>(int)
Unexecuted instantiation: descriptor.cc:void google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::PlanArray<google::protobuf::SourceCodeInfo>(int)
Unexecuted instantiation: descriptor.cc:void google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::PlanArray<google::protobuf::ServiceDescriptor>(int)
Unexecuted instantiation: descriptor.cc:void google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::PlanArray<google::protobuf::ServiceOptions>(int)
Unexecuted instantiation: descriptor.cc:void google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::PlanArray<google::protobuf::MethodDescriptor>(int)
Unexecuted instantiation: descriptor.cc:void google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::PlanArray<google::protobuf::MethodOptions>(int)
Unexecuted instantiation: descriptor.cc:void google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::PlanArray<google::protobuf::MessageOptions>(int)
Unexecuted instantiation: descriptor.cc:void google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::PlanArray<google::protobuf::ExtensionRangeOptions>(int)
Unexecuted instantiation: descriptor.cc:void google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::PlanArray<google::protobuf::Descriptor::ReservedRange>(int)
Unexecuted instantiation: descriptor.cc:void google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::PlanArray<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const*>(int)
Unexecuted instantiation: descriptor.cc:void google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::PlanArray<google::protobuf::OneofDescriptor>(int)
Unexecuted instantiation: descriptor.cc:void google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::PlanArray<google::protobuf::OneofOptions>(int)
Unexecuted instantiation: descriptor.cc:void google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::PlanArray<google::protobuf::EnumOptions>(int)
Unexecuted instantiation: descriptor.cc:void google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::PlanArray<google::protobuf::EnumValueOptions>(int)
Unexecuted instantiation: descriptor.cc:void google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::PlanArray<google::protobuf::EnumDescriptor::ReservedRange>(int)
Unexecuted instantiation: descriptor.cc:void google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::PlanArray<google::protobuf::FieldDescriptor>(int)
Unexecuted instantiation: descriptor.cc:void google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::PlanArray<google::protobuf::FieldOptions>(int)
Unexecuted instantiation: descriptor.cc:void google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::PlanArray<int>(int)
Unexecuted instantiation: descriptor.cc:void google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::PlanArray<google::protobuf::FileDescriptor const*>(int)
Unexecuted instantiation: descriptor.cc:void google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::PlanArray<google::protobuf::EnumValueDescriptor>(int)
Unexecuted instantiation: descriptor.cc:void google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::PlanArray<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(int)
Unexecuted instantiation: descriptor.cc:void google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::PlanArray<google::protobuf::FileDescriptor>(int)
Unexecuted instantiation: descriptor.cc:void google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::PlanArray<google::protobuf::EnumDescriptor>(int)
Unexecuted instantiation: descriptor.cc:void google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::PlanArray<google::protobuf::Descriptor>(int)
Unexecuted instantiation: descriptor.cc:void google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::PlanArray<google::protobuf::Descriptor::ExtensionRange>(int)
398
399
  template <typename U>
400
0
  U* AllocateArray(int array_size) {
401
0
    constexpr bool trivial = std::is_trivially_destructible<U>::value;
402
0
    using TypeToUse = typename std::conditional<trivial, char, U>::type;
403
404
    // We can only allocate after FinalizePlanning has been called.
405
0
    ABSL_CHECK(has_allocated());
406
407
0
    TypeToUse*& data = pointers_.template Get<TypeToUse>();
408
0
    int& used = used_.template Get<TypeToUse>();
409
0
    U* res = reinterpret_cast<U*>(data + used);
410
0
    used += trivial ? RoundUpTo<8>(array_size * sizeof(U)) : array_size;
411
0
    ABSL_CHECK_LE(used, total_.template Get<TypeToUse>());
412
0
    return res;
413
0
  }
Unexecuted instantiation: descriptor.cc:std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateArray<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(int)
Unexecuted instantiation: descriptor.cc:google::protobuf::EnumValueDescriptor* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateArray<google::protobuf::EnumValueDescriptor>(int)
Unexecuted instantiation: descriptor.cc:google::protobuf::EnumDescriptor* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateArray<google::protobuf::EnumDescriptor>(int)
Unexecuted instantiation: descriptor.cc:google::protobuf::Descriptor* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateArray<google::protobuf::Descriptor>(int)
Unexecuted instantiation: descriptor.cc:google::protobuf::Descriptor::ExtensionRange* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateArray<google::protobuf::Descriptor::ExtensionRange>(int)
Unexecuted instantiation: descriptor.cc:google::protobuf::FileDescriptor* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateArray<google::protobuf::FileDescriptor>(int)
Unexecuted instantiation: descriptor.cc:google::protobuf::FileOptions* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateArray<google::protobuf::FileOptions>(int)
Unexecuted instantiation: descriptor.cc:google::protobuf::SourceCodeInfo* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateArray<google::protobuf::SourceCodeInfo>(int)
Unexecuted instantiation: descriptor.cc:google::protobuf::FileDescriptorTables* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateArray<google::protobuf::FileDescriptorTables>(int)
Unexecuted instantiation: descriptor.cc:google::protobuf::FileDescriptor const** google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateArray<google::protobuf::FileDescriptor const*>(int)
Unexecuted instantiation: descriptor.cc:int* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateArray<int>(int)
Unexecuted instantiation: descriptor.cc:google::protobuf::ServiceDescriptor* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateArray<google::protobuf::ServiceDescriptor>(int)
Unexecuted instantiation: descriptor.cc:google::protobuf::FieldDescriptor* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateArray<google::protobuf::FieldDescriptor>(int)
Unexecuted instantiation: descriptor.cc:google::protobuf::OneofDescriptor* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateArray<google::protobuf::OneofDescriptor>(int)
Unexecuted instantiation: descriptor.cc:google::protobuf::Descriptor::ReservedRange* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateArray<google::protobuf::Descriptor::ReservedRange>(int)
Unexecuted instantiation: descriptor.cc:std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const** google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateArray<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const*>(int)
Unexecuted instantiation: descriptor.cc:google::protobuf::MessageOptions* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateArray<google::protobuf::MessageOptions>(int)
Unexecuted instantiation: descriptor.cc:google::protobuf::FieldOptions* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateArray<google::protobuf::FieldOptions>(int)
Unexecuted instantiation: descriptor.cc:google::protobuf::ExtensionRangeOptions* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateArray<google::protobuf::ExtensionRangeOptions>(int)
Unexecuted instantiation: descriptor.cc:google::protobuf::OneofOptions* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateArray<google::protobuf::OneofOptions>(int)
Unexecuted instantiation: descriptor.cc:google::protobuf::EnumDescriptor::ReservedRange* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateArray<google::protobuf::EnumDescriptor::ReservedRange>(int)
Unexecuted instantiation: descriptor.cc:google::protobuf::EnumOptions* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateArray<google::protobuf::EnumOptions>(int)
Unexecuted instantiation: descriptor.cc:google::protobuf::EnumValueOptions* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateArray<google::protobuf::EnumValueOptions>(int)
Unexecuted instantiation: descriptor.cc:google::protobuf::MethodDescriptor* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateArray<google::protobuf::MethodDescriptor>(int)
Unexecuted instantiation: descriptor.cc:google::protobuf::ServiceOptions* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateArray<google::protobuf::ServiceOptions>(int)
Unexecuted instantiation: descriptor.cc:google::protobuf::MethodOptions* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateArray<google::protobuf::MethodOptions>(int)
414
415
  template <typename... In>
416
0
  const std::string* AllocateStrings(In&&... in) {
417
0
    std::string* strings = AllocateArray<std::string>(sizeof...(in));
418
0
    std::string* res = strings;
419
0
    Fold({(*strings++ = std::string(std::forward<In>(in)))...});
420
0
    return res;
421
0
  }
Unexecuted instantiation: descriptor.cc:std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateStrings<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&)
Unexecuted instantiation: descriptor.cc:std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateStrings<std::__1::basic_string_view<char, std::__1::char_traits<char> > >(std::__1::basic_string_view<char, std::__1::char_traits<char> >&&)
Unexecuted instantiation: descriptor.cc:std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateStrings<char const (&) [1]>(char const (&) [1])
Unexecuted instantiation: descriptor.cc:std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateStrings<std::__1::basic_string_view<char, std::__1::char_traits<char> >&, std::__1::basic_string_view<char, std::__1::char_traits<char> >&>(std::__1::basic_string_view<char, std::__1::char_traits<char> >&, std::__1::basic_string_view<char, std::__1::char_traits<char> >&)
Unexecuted instantiation: descriptor.cc:std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateStrings<char const (&) [18], std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(char const (&) [18], std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&)
Unexecuted instantiation: descriptor.cc:std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateStrings<std::__1::basic_string_view<char, std::__1::char_traits<char> >&>(std::__1::basic_string_view<char, std::__1::char_traits<char> >&)
Unexecuted instantiation: descriptor.cc:std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateStrings<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)
Unexecuted instantiation: descriptor.cc:std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateStrings<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)
Unexecuted instantiation: descriptor.cc:std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateStrings<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&)
Unexecuted instantiation: descriptor.cc:std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateStrings<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&)
Unexecuted instantiation: descriptor.cc:std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateStrings<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&)
422
423
  // Allocate all 5 names of the field:
424
  // name, full name, lowercase, camelcase and json.
425
  // It will dedup the strings when possible.
426
  // The resulting array contains `name` at index 0, `full_name` at index 1
427
  // and the other 3 indices are specified in the result.
428
  void PlanFieldNames(const std::string& name,
429
0
                      const std::string* opt_json_name) {
430
0
    ABSL_CHECK(!has_allocated());
431
432
    // Fast path for snake_case names, which follow the style guide.
433
0
    if (opt_json_name == nullptr) {
434
0
      switch (GetFieldNameCase(name)) {
435
0
        case FieldNameCase::kAllLower:
436
          // Case 1: they are all the same.
437
0
          return PlanArray<std::string>(2);
438
0
        case FieldNameCase::kSnakeCase:
439
          // Case 2: name==lower, camel==json
440
0
          return PlanArray<std::string>(3);
441
0
        default:
442
0
          break;
443
0
      }
444
0
    }
445
446
0
    std::string lowercase_name = name;
447
0
    absl::AsciiStrToLower(&lowercase_name);
448
449
0
    std::string camelcase_name = ToCamelCase(name, /* lower_first = */ true);
450
0
    std::string json_name =
451
0
        opt_json_name != nullptr ? *opt_json_name : ToJsonName(name);
452
453
0
    absl::string_view all_names[] = {name, lowercase_name, camelcase_name,
454
0
                                     json_name};
455
0
    std::sort(all_names, all_names + 4);
456
0
    int unique =
457
0
        static_cast<int>(std::unique(all_names, all_names + 4) - all_names);
458
459
0
    PlanArray<std::string>(unique + 1);
460
0
  }
461
462
  struct FieldNamesResult {
463
    const std::string* array;
464
    int lowercase_index;
465
    int camelcase_index;
466
    int json_index;
467
  };
468
  FieldNamesResult AllocateFieldNames(const std::string& name,
469
                                      const std::string& scope,
470
0
                                      const std::string* opt_json_name) {
471
0
    ABSL_CHECK(has_allocated());
472
473
0
    std::string full_name =
474
0
        scope.empty() ? name : absl::StrCat(scope, ".", name);
475
476
    // Fast path for snake_case names, which follow the style guide.
477
0
    if (opt_json_name == nullptr) {
478
0
      switch (GetFieldNameCase(name)) {
479
0
        case FieldNameCase::kAllLower:
480
          // Case 1: they are all the same.
481
0
          return {AllocateStrings(name, std::move(full_name)), 0, 0, 0};
482
0
        case FieldNameCase::kSnakeCase:
483
          // Case 2: name==lower, camel==json
484
0
          return {AllocateStrings(name, std::move(full_name),
485
0
                                  ToCamelCase(name, /* lower_first = */ true)),
486
0
                  0, 2, 2};
487
0
        default:
488
0
          break;
489
0
      }
490
0
    }
491
492
0
    std::vector<std::string> names;
493
0
    names.push_back(name);
494
0
    names.push_back(std::move(full_name));
495
496
0
    const auto push_name = [&](std::string new_name) {
497
0
      for (size_t i = 0; i < names.size(); ++i) {
498
        // Do not compare the full_name. It is unlikely to match, except in
499
        // custom json_name. We are not taking this into account in
500
        // PlanFieldNames so better to not try it.
501
0
        if (i == 1) continue;
502
0
        if (names[i] == new_name) return i;
503
0
      }
504
0
      names.push_back(std::move(new_name));
505
0
      return names.size() - 1;
506
0
    };
507
508
0
    FieldNamesResult result{nullptr, 0, 0, 0};
509
510
0
    std::string lowercase_name = name;
511
0
    absl::AsciiStrToLower(&lowercase_name);
512
0
    result.lowercase_index = push_name(std::move(lowercase_name));
513
0
    result.camelcase_index =
514
0
        push_name(ToCamelCase(name, /* lower_first = */ true));
515
0
    result.json_index =
516
0
        push_name(opt_json_name != nullptr ? *opt_json_name : ToJsonName(name));
517
518
0
    std::string* all_names = AllocateArray<std::string>(names.size());
519
0
    result.array = all_names;
520
0
    std::move(names.begin(), names.end(), all_names);
521
522
0
    return result;
523
0
  }
524
525
  template <typename Alloc>
526
0
  void FinalizePlanning(Alloc& alloc) {
527
0
    ABSL_CHECK(!has_allocated());
528
529
0
    pointers_ = alloc->CreateFlatAlloc(total_)->Pointers();
530
531
0
    ABSL_CHECK(has_allocated());
532
0
  }
Unexecuted instantiation: descriptor.cc:void google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::FinalizePlanning<google::protobuf::DescriptorPool::Tables*>(google::protobuf::DescriptorPool::Tables*&)
Unexecuted instantiation: descriptor.cc:void google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::FinalizePlanning<std::__1::unique_ptr<google::protobuf::DescriptorPool::Tables, std::__1::default_delete<google::protobuf::DescriptorPool::Tables> > const>(std::__1::unique_ptr<google::protobuf::DescriptorPool::Tables, std::__1::default_delete<google::protobuf::DescriptorPool::Tables> > const&)
533
534
0
  void ExpectConsumed() const {
535
    // We verify that we consumed all the memory requested if there was no
536
    // error in processing.
537
0
    Fold({ExpectConsumed<T>()...});
538
0
  }
539
540
 private:
541
0
  bool has_allocated() const {
542
0
    return pointers_.template Get<char>() != nullptr;
543
0
  }
544
545
0
  static bool IsLower(char c) { return 'a' <= c && c <= 'z'; }
546
0
  static bool IsDigit(char c) { return '0' <= c && c <= '9'; }
547
0
  static bool IsLowerOrDigit(char c) { return IsLower(c) || IsDigit(c); }
548
549
  enum class FieldNameCase { kAllLower, kSnakeCase, kOther };
550
0
  FieldNameCase GetFieldNameCase(const std::string& name) {
551
0
    if (!IsLower(name[0])) return FieldNameCase::kOther;
552
0
    FieldNameCase best = FieldNameCase::kAllLower;
553
0
    for (char c : name) {
554
0
      if (IsLowerOrDigit(c)) {
555
        // nothing to do
556
0
      } else if (c == '_') {
557
0
        best = FieldNameCase::kSnakeCase;
558
0
      } else {
559
0
        return FieldNameCase::kOther;
560
0
      }
561
0
    }
562
0
    return best;
563
0
  }
564
565
  template <typename U>
566
0
  bool ExpectConsumed() const {
567
0
    ABSL_CHECK_EQ(total_.template Get<U>(), used_.template Get<U>());
568
0
    return true;
569
0
  }
Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::ExpectConsumed<char>() const
Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::ExpectConsumed<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >() const
Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::ExpectConsumed<google::protobuf::SourceCodeInfo>() const
Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::ExpectConsumed<google::protobuf::FileDescriptorTables>() const
Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::ExpectConsumed<google::protobuf::MessageOptions>() const
Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::ExpectConsumed<google::protobuf::FieldOptions>() const
Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::ExpectConsumed<google::protobuf::EnumOptions>() const
Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::ExpectConsumed<google::protobuf::EnumValueOptions>() const
Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::ExpectConsumed<google::protobuf::ExtensionRangeOptions>() const
Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::ExpectConsumed<google::protobuf::OneofOptions>() const
Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::ExpectConsumed<google::protobuf::ServiceOptions>() const
Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::ExpectConsumed<google::protobuf::MethodOptions>() const
Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::ExpectConsumed<google::protobuf::FileOptions>() const
570
571
  TypeMap<PointerT, T...> pointers_;
572
  TypeMap<IntT, T...> total_;
573
  TypeMap<IntT, T...> used_;
574
};
575
576
}  // namespace
577
578
class Symbol {
579
 public:
580
  enum Type {
581
    NULL_SYMBOL,
582
    MESSAGE,
583
    FIELD,
584
    ONEOF,
585
    ENUM,
586
    ENUM_VALUE,
587
    ENUM_VALUE_OTHER_PARENT,
588
    SERVICE,
589
    METHOD,
590
    FULL_PACKAGE,
591
    SUB_PACKAGE,
592
  };
593
594
0
  Symbol() {
595
0
    static constexpr internal::SymbolBase null_symbol{};
596
0
    static_assert(null_symbol.symbol_type_ == NULL_SYMBOL, "");
597
    // Initialize with a sentinel to make sure `ptr_` is never null.
598
0
    ptr_ = &null_symbol;
599
0
  }
600
601
  // Every object we store derives from internal::SymbolBase, where we store the
602
  // symbol type enum.
603
  // Storing in the object can be done without using more space in most cases,
604
  // while storing it in the Symbol type would require 8 bytes.
605
#define DEFINE_MEMBERS(TYPE, TYPE_CONSTANT, FIELD)                             \
606
0
  explicit Symbol(TYPE* value) : ptr_(value) {                                 \
607
0
    value->symbol_type_ = TYPE_CONSTANT;                                       \
608
0
  }                                                                            \
Unexecuted instantiation: google::protobuf::Symbol::Symbol(google::protobuf::EnumDescriptor*)
Unexecuted instantiation: google::protobuf::Symbol::Symbol(google::protobuf::Descriptor*)
Unexecuted instantiation: google::protobuf::Symbol::Symbol(google::protobuf::FileDescriptor*)
Unexecuted instantiation: google::protobuf::Symbol::Symbol(google::protobuf::Symbol::Subpackage*)
Unexecuted instantiation: google::protobuf::Symbol::Symbol(google::protobuf::FieldDescriptor*)
Unexecuted instantiation: google::protobuf::Symbol::Symbol(google::protobuf::OneofDescriptor*)
Unexecuted instantiation: google::protobuf::Symbol::Symbol(google::protobuf::ServiceDescriptor*)
Unexecuted instantiation: google::protobuf::Symbol::Symbol(google::protobuf::MethodDescriptor*)
609
0
  const TYPE* FIELD() const {                                                  \
610
0
    return type() == TYPE_CONSTANT ? static_cast<const TYPE*>(ptr_) : nullptr; \
611
0
  }
Unexecuted instantiation: google::protobuf::Symbol::file_descriptor() const
Unexecuted instantiation: google::protobuf::Symbol::sub_package_file_descriptor() const
Unexecuted instantiation: google::protobuf::Symbol::field_descriptor() const
Unexecuted instantiation: google::protobuf::Symbol::descriptor() const
Unexecuted instantiation: google::protobuf::Symbol::oneof_descriptor() const
Unexecuted instantiation: google::protobuf::Symbol::enum_descriptor() const
Unexecuted instantiation: google::protobuf::Symbol::service_descriptor() const
Unexecuted instantiation: google::protobuf::Symbol::method_descriptor() const
612
613
  DEFINE_MEMBERS(Descriptor, MESSAGE, descriptor)
614
  DEFINE_MEMBERS(FieldDescriptor, FIELD, field_descriptor)
615
  DEFINE_MEMBERS(OneofDescriptor, ONEOF, oneof_descriptor)
616
  DEFINE_MEMBERS(EnumDescriptor, ENUM, enum_descriptor)
617
  DEFINE_MEMBERS(ServiceDescriptor, SERVICE, service_descriptor)
618
  DEFINE_MEMBERS(MethodDescriptor, METHOD, method_descriptor)
619
  DEFINE_MEMBERS(FileDescriptor, FULL_PACKAGE, file_descriptor)
620
621
  // We use a special node for subpackage FileDescriptor.
622
  // It is potentially added to the table with multiple different names, so we
623
  // need a separate place to put the name.
624
  struct Subpackage : internal::SymbolBase {
625
    int name_size;
626
    const FileDescriptor* file;
627
  };
628
  DEFINE_MEMBERS(Subpackage, SUB_PACKAGE, sub_package_file_descriptor)
629
630
  // Enum values have two different parents.
631
  // We use two different identitied for the same object to determine the two
632
  // different insertions in the map.
633
0
  static Symbol EnumValue(EnumValueDescriptor* value, int n) {
634
0
    Symbol s;
635
0
    internal::SymbolBase* ptr;
636
0
    if (n == 0) {
637
0
      ptr = static_cast<internal::SymbolBaseN<0>*>(value);
638
0
      ptr->symbol_type_ = ENUM_VALUE;
639
0
    } else {
640
0
      ptr = static_cast<internal::SymbolBaseN<1>*>(value);
641
0
      ptr->symbol_type_ = ENUM_VALUE_OTHER_PARENT;
642
0
    }
643
0
    s.ptr_ = ptr;
644
0
    return s;
645
0
  }
646
647
0
  const EnumValueDescriptor* enum_value_descriptor() const {
648
0
    return type() == ENUM_VALUE
649
0
               ? static_cast<const EnumValueDescriptor*>(
650
0
                     static_cast<const internal::SymbolBaseN<0>*>(ptr_))
651
0
           : type() == ENUM_VALUE_OTHER_PARENT
652
0
               ? static_cast<const EnumValueDescriptor*>(
653
0
                     static_cast<const internal::SymbolBaseN<1>*>(ptr_))
654
0
               : nullptr;
655
0
  }
656
657
#undef DEFINE_MEMBERS
658
659
0
  Type type() const { return static_cast<Type>(ptr_->symbol_type_); }
660
0
  bool IsNull() const { return type() == NULL_SYMBOL; }
661
0
  bool IsType() const { return type() == MESSAGE || type() == ENUM; }
662
0
  bool IsAggregate() const {
663
0
    return IsType() || IsPackage() || type() == SERVICE;
664
0
  }
665
0
  bool IsPackage() const {
666
0
    return type() == FULL_PACKAGE || type() == SUB_PACKAGE;
667
0
  }
668
669
0
  const FileDescriptor* GetFile() const {
670
0
    switch (type()) {
671
0
      case MESSAGE:
672
0
        return descriptor()->file();
673
0
      case FIELD:
674
0
        return field_descriptor()->file();
675
0
      case ONEOF:
676
0
        return oneof_descriptor()->containing_type()->file();
677
0
      case ENUM:
678
0
        return enum_descriptor()->file();
679
0
      case ENUM_VALUE:
680
0
        return enum_value_descriptor()->type()->file();
681
0
      case SERVICE:
682
0
        return service_descriptor()->file();
683
0
      case METHOD:
684
0
        return method_descriptor()->service()->file();
685
0
      case FULL_PACKAGE:
686
0
        return file_descriptor();
687
0
      case SUB_PACKAGE:
688
0
        return sub_package_file_descriptor()->file;
689
0
      default:
690
0
        return nullptr;
691
0
    }
692
0
  }
693
694
0
  absl::string_view full_name() const {
695
0
    switch (type()) {
696
0
      case MESSAGE:
697
0
        return descriptor()->full_name();
698
0
      case FIELD:
699
0
        return field_descriptor()->full_name();
700
0
      case ONEOF:
701
0
        return oneof_descriptor()->full_name();
702
0
      case ENUM:
703
0
        return enum_descriptor()->full_name();
704
0
      case ENUM_VALUE:
705
0
        return enum_value_descriptor()->full_name();
706
0
      case SERVICE:
707
0
        return service_descriptor()->full_name();
708
0
      case METHOD:
709
0
        return method_descriptor()->full_name();
710
0
      case FULL_PACKAGE:
711
0
        return file_descriptor()->package();
712
0
      case SUB_PACKAGE:
713
0
        return absl::string_view(sub_package_file_descriptor()->file->package())
714
0
            .substr(0, sub_package_file_descriptor()->name_size);
715
0
      default:
716
0
        ABSL_CHECK(false);
717
0
    }
718
0
    return "";
719
0
  }
720
721
0
  std::pair<const void*, absl::string_view> parent_name_key() const {
722
0
    const auto or_file = [&](const void* p) { return p ? p : GetFile(); };
723
0
    switch (type()) {
724
0
      case MESSAGE:
725
0
        return {or_file(descriptor()->containing_type()), descriptor()->name()};
726
0
      case FIELD: {
727
0
        auto* field = field_descriptor();
728
0
        return {or_file(field->is_extension() ? field->extension_scope()
729
0
                                              : field->containing_type()),
730
0
                field->name()};
731
0
      }
732
0
      case ONEOF:
733
0
        return {oneof_descriptor()->containing_type(),
734
0
                oneof_descriptor()->name()};
735
0
      case ENUM:
736
0
        return {or_file(enum_descriptor()->containing_type()),
737
0
                enum_descriptor()->name()};
738
0
      case ENUM_VALUE:
739
0
        return {or_file(enum_value_descriptor()->type()->containing_type()),
740
0
                enum_value_descriptor()->name()};
741
0
      case ENUM_VALUE_OTHER_PARENT:
742
0
        return {enum_value_descriptor()->type(),
743
0
                enum_value_descriptor()->name()};
744
0
      case SERVICE:
745
0
        return {GetFile(), service_descriptor()->name()};
746
0
      case METHOD:
747
0
        return {method_descriptor()->service(), method_descriptor()->name()};
748
0
      default:
749
0
        ABSL_CHECK(false);
750
0
    }
751
0
    return {};
752
0
  }
753
754
 private:
755
  const internal::SymbolBase* ptr_;
756
};
757
758
const FieldDescriptor::CppType
759
    FieldDescriptor::kTypeToCppTypeMap[MAX_TYPE + 1] = {
760
        static_cast<CppType>(0),  // 0 is reserved for errors
761
762
        CPPTYPE_DOUBLE,   // TYPE_DOUBLE
763
        CPPTYPE_FLOAT,    // TYPE_FLOAT
764
        CPPTYPE_INT64,    // TYPE_INT64
765
        CPPTYPE_UINT64,   // TYPE_UINT64
766
        CPPTYPE_INT32,    // TYPE_INT32
767
        CPPTYPE_UINT64,   // TYPE_FIXED64
768
        CPPTYPE_UINT32,   // TYPE_FIXED32
769
        CPPTYPE_BOOL,     // TYPE_BOOL
770
        CPPTYPE_STRING,   // TYPE_STRING
771
        CPPTYPE_MESSAGE,  // TYPE_GROUP
772
        CPPTYPE_MESSAGE,  // TYPE_MESSAGE
773
        CPPTYPE_STRING,   // TYPE_BYTES
774
        CPPTYPE_UINT32,   // TYPE_UINT32
775
        CPPTYPE_ENUM,     // TYPE_ENUM
776
        CPPTYPE_INT32,    // TYPE_SFIXED32
777
        CPPTYPE_INT64,    // TYPE_SFIXED64
778
        CPPTYPE_INT32,    // TYPE_SINT32
779
        CPPTYPE_INT64,    // TYPE_SINT64
780
};
781
782
const char* const FieldDescriptor::kTypeToName[MAX_TYPE + 1] = {
783
    "ERROR",  // 0 is reserved for errors
784
785
    "double",    // TYPE_DOUBLE
786
    "float",     // TYPE_FLOAT
787
    "int64",     // TYPE_INT64
788
    "uint64",    // TYPE_UINT64
789
    "int32",     // TYPE_INT32
790
    "fixed64",   // TYPE_FIXED64
791
    "fixed32",   // TYPE_FIXED32
792
    "bool",      // TYPE_BOOL
793
    "string",    // TYPE_STRING
794
    "group",     // TYPE_GROUP
795
    "message",   // TYPE_MESSAGE
796
    "bytes",     // TYPE_BYTES
797
    "uint32",    // TYPE_UINT32
798
    "enum",      // TYPE_ENUM
799
    "sfixed32",  // TYPE_SFIXED32
800
    "sfixed64",  // TYPE_SFIXED64
801
    "sint32",    // TYPE_SINT32
802
    "sint64",    // TYPE_SINT64
803
};
804
805
const char* const FieldDescriptor::kCppTypeToName[MAX_CPPTYPE + 1] = {
806
    "ERROR",  // 0 is reserved for errors
807
808
    "int32",    // CPPTYPE_INT32
809
    "int64",    // CPPTYPE_INT64
810
    "uint32",   // CPPTYPE_UINT32
811
    "uint64",   // CPPTYPE_UINT64
812
    "double",   // CPPTYPE_DOUBLE
813
    "float",    // CPPTYPE_FLOAT
814
    "bool",     // CPPTYPE_BOOL
815
    "enum",     // CPPTYPE_ENUM
816
    "string",   // CPPTYPE_STRING
817
    "message",  // CPPTYPE_MESSAGE
818
};
819
820
const char* const FieldDescriptor::kLabelToName[MAX_LABEL + 1] = {
821
    "ERROR",  // 0 is reserved for errors
822
823
    "optional",  // LABEL_OPTIONAL
824
    "required",  // LABEL_REQUIRED
825
    "repeated",  // LABEL_REPEATED
826
};
827
828
PROTOBUF_IGNORE_DEPRECATION_START
829
0
const char* FileDescriptor::SyntaxName(FileDescriptor::Syntax syntax) {
830
0
  switch (syntax) {
831
0
    case SYNTAX_PROTO2:
832
0
      return "proto2";
833
0
    case SYNTAX_PROTO3:
834
0
      return "proto3";
835
0
    case SYNTAX_UNKNOWN:
836
0
      return "unknown";
837
0
  }
838
0
  ABSL_LOG(FATAL) << "can't reach here.";
839
0
  return nullptr;
840
0
}
841
PROTOBUF_IGNORE_DEPRECATION_STOP
842
843
static const char* const kNonLinkedWeakMessageReplacementName = "google.protobuf.Empty";
844
845
#if !defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)
846
const int FieldDescriptor::kMaxNumber;
847
const int FieldDescriptor::kFirstReservedNumber;
848
const int FieldDescriptor::kLastReservedNumber;
849
#endif
850
851
namespace {
852
853
0
std::string EnumValueToPascalCase(const std::string& input) {
854
0
  bool next_upper = true;
855
0
  std::string result;
856
0
  result.reserve(input.size());
857
858
0
  for (char character : input) {
859
0
    if (character == '_') {
860
0
      next_upper = true;
861
0
    } else {
862
0
      if (next_upper) {
863
0
        result.push_back(absl::ascii_toupper(character));
864
0
      } else {
865
0
        result.push_back(absl::ascii_tolower(character));
866
0
      }
867
0
      next_upper = false;
868
0
    }
869
0
  }
870
871
0
  return result;
872
0
}
873
874
// Class to remove an enum prefix from enum values.
875
class PrefixRemover {
876
 public:
877
0
  PrefixRemover(absl::string_view prefix) {
878
    // Strip underscores and lower-case the prefix.
879
0
    for (char character : prefix) {
880
0
      if (character != '_') {
881
0
        prefix_ += absl::ascii_tolower(character);
882
0
      }
883
0
    }
884
0
  }
885
886
  // Tries to remove the enum prefix from this enum value.
887
  // If this is not possible, returns the input verbatim.
888
0
  std::string MaybeRemove(absl::string_view str) {
889
    // We can't just lowercase and strip str and look for a prefix.
890
    // We need to properly recognize the difference between:
891
    //
892
    //   enum Foo {
893
    //     FOO_BAR_BAZ = 0;
894
    //     FOO_BARBAZ = 1;
895
    //   }
896
    //
897
    // This is acceptable (though perhaps not advisable) because even when
898
    // we PascalCase, these two will still be distinct (BarBaz vs. Barbaz).
899
0
    size_t i, j;
900
901
    // Skip past prefix_ in str if we can.
902
0
    for (i = 0, j = 0; i < str.size() && j < prefix_.size(); i++) {
903
0
      if (str[i] == '_') {
904
0
        continue;
905
0
      }
906
907
0
      if (absl::ascii_tolower(str[i]) != prefix_[j++]) {
908
0
        return std::string(str);
909
0
      }
910
0
    }
911
912
    // If we didn't make it through the prefix, we've failed to strip the
913
    // prefix.
914
0
    if (j < prefix_.size()) {
915
0
      return std::string(str);
916
0
    }
917
918
    // Skip underscores between prefix and further characters.
919
0
    while (i < str.size() && str[i] == '_') {
920
0
      i++;
921
0
    }
922
923
    // Enum label can't be the empty string.
924
0
    if (i == str.size()) {
925
0
      return std::string(str);
926
0
    }
927
928
    // We successfully stripped the prefix.
929
0
    str.remove_prefix(i);
930
0
    return std::string(str);
931
0
  }
932
933
 private:
934
  std::string prefix_;
935
};
936
937
// A DescriptorPool contains a bunch of hash-maps to implement the
938
// various Find*By*() methods.  Since hashtable lookups are O(1), it's
939
// most efficient to construct a fixed set of large hash-maps used by
940
// all objects in the pool rather than construct one or more small
941
// hash-maps for each object.
942
//
943
// The keys to these hash-maps are (parent, name) or (parent, number) pairs.
944
struct FullNameQuery {
945
  absl::string_view query;
946
0
  absl::string_view full_name() const { return query; }
947
};
948
struct SymbolByFullNameHash {
949
  using is_transparent = void;
950
951
  template <typename T>
952
0
  size_t operator()(const T& s) const {
953
0
    return absl::HashOf(s.full_name());
954
0
  }
Unexecuted instantiation: descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::SymbolByFullNameHash::operator()<google::protobuf::(anonymous namespace)::FullNameQuery>(google::protobuf::(anonymous namespace)::FullNameQuery const&) const
Unexecuted instantiation: descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::SymbolByFullNameHash::operator()<google::protobuf::Symbol>(google::protobuf::Symbol const&) const
955
};
956
struct SymbolByFullNameEq {
957
  using is_transparent = void;
958
959
  template <typename T, typename U>
960
0
  bool operator()(const T& a, const U& b) const {
961
0
    return a.full_name() == b.full_name();
962
0
  }
Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::SymbolByFullNameEq::operator()<google::protobuf::Symbol, google::protobuf::(anonymous namespace)::FullNameQuery>(google::protobuf::Symbol const&, google::protobuf::(anonymous namespace)::FullNameQuery const&) const
Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::SymbolByFullNameEq::operator()<google::protobuf::Symbol, google::protobuf::Symbol>(google::protobuf::Symbol const&, google::protobuf::Symbol const&) const
963
};
964
using SymbolsByNameSet =
965
    absl::flat_hash_set<Symbol, SymbolByFullNameHash, SymbolByFullNameEq>;
966
967
struct ParentNameQuery {
968
  std::pair<const void*, absl::string_view> query;
969
0
  std::pair<const void*, absl::string_view> parent_name_key() const {
970
0
    return query;
971
0
  }
972
};
973
struct SymbolByParentHash {
974
  using is_transparent = void;
975
976
  template <typename T>
977
0
  size_t operator()(const T& s) const {
978
0
    return absl::HashOf(s.parent_name_key());
979
0
  }
Unexecuted instantiation: descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::SymbolByParentHash::operator()<google::protobuf::(anonymous namespace)::ParentNameQuery>(google::protobuf::(anonymous namespace)::ParentNameQuery const&) const
Unexecuted instantiation: descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::SymbolByParentHash::operator()<google::protobuf::Symbol>(google::protobuf::Symbol const&) const
980
};
981
struct SymbolByParentEq {
982
  using is_transparent = void;
983
984
  template <typename T, typename U>
985
0
  bool operator()(const T& a, const U& b) const {
986
0
    return a.parent_name_key() == b.parent_name_key();
987
0
  }
Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::SymbolByParentEq::operator()<google::protobuf::Symbol, google::protobuf::(anonymous namespace)::ParentNameQuery>(google::protobuf::Symbol const&, google::protobuf::(anonymous namespace)::ParentNameQuery const&) const
Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::SymbolByParentEq::operator()<google::protobuf::Symbol, google::protobuf::Symbol>(google::protobuf::Symbol const&, google::protobuf::Symbol const&) const
988
};
989
using SymbolsByParentSet =
990
    absl::flat_hash_set<Symbol, SymbolByParentHash, SymbolByParentEq>;
991
992
template <typename DescriptorT>
993
struct DescriptorsByNameHash {
994
  using is_transparent = void;
995
996
0
  size_t operator()(absl::string_view name) const { return absl::HashOf(name); }
Unexecuted instantiation: descriptor.cc:google::protobuf::(anonymous namespace)::DescriptorsByNameHash<google::protobuf::FileDescriptor>::operator()(std::__1::basic_string_view<char, std::__1::char_traits<char> >) const
Unexecuted instantiation: descriptor.cc:google::protobuf::(anonymous namespace)::DescriptorsByNameHash<google::protobuf::Descriptor>::operator()(std::__1::basic_string_view<char, std::__1::char_traits<char> >) const
997
998
0
  size_t operator()(const DescriptorT* file) const {
999
0
    return absl::HashOf(file->name());
1000
0
  }
Unexecuted instantiation: descriptor.cc:google::protobuf::(anonymous namespace)::DescriptorsByNameHash<google::protobuf::FileDescriptor>::operator()(google::protobuf::FileDescriptor const*) const
Unexecuted instantiation: descriptor.cc:google::protobuf::(anonymous namespace)::DescriptorsByNameHash<google::protobuf::Descriptor>::operator()(google::protobuf::Descriptor const*) const
1001
};
1002
1003
template <typename DescriptorT>
1004
struct DescriptorsByNameEq {
1005
  using is_transparent = void;
1006
1007
  bool operator()(absl::string_view lhs, absl::string_view rhs) const {
1008
    return lhs == rhs;
1009
  }
1010
  bool operator()(absl::string_view lhs, const DescriptorT* rhs) const {
1011
    return lhs == rhs->name();
1012
  }
1013
0
  bool operator()(const DescriptorT* lhs, absl::string_view rhs) const {
1014
0
    return lhs->name() == rhs;
1015
0
  }
Unexecuted instantiation: descriptor.cc:google::protobuf::(anonymous namespace)::DescriptorsByNameEq<google::protobuf::FileDescriptor>::operator()(google::protobuf::FileDescriptor const*, std::__1::basic_string_view<char, std::__1::char_traits<char> >) const
Unexecuted instantiation: descriptor.cc:google::protobuf::(anonymous namespace)::DescriptorsByNameEq<google::protobuf::Descriptor>::operator()(google::protobuf::Descriptor const*, std::__1::basic_string_view<char, std::__1::char_traits<char> >) const
1016
0
  bool operator()(const DescriptorT* lhs, const DescriptorT* rhs) const {
1017
0
    return lhs == rhs || lhs->name() == rhs->name();
1018
0
  }
Unexecuted instantiation: descriptor.cc:google::protobuf::(anonymous namespace)::DescriptorsByNameEq<google::protobuf::FileDescriptor>::operator()(google::protobuf::FileDescriptor const*, google::protobuf::FileDescriptor const*) const
Unexecuted instantiation: descriptor.cc:google::protobuf::(anonymous namespace)::DescriptorsByNameEq<google::protobuf::Descriptor>::operator()(google::protobuf::Descriptor const*, google::protobuf::Descriptor const*) const
1019
};
1020
1021
template <typename DescriptorT>
1022
using DescriptorsByNameSet =
1023
    absl::flat_hash_set<const DescriptorT*, DescriptorsByNameHash<DescriptorT>,
1024
                        DescriptorsByNameEq<DescriptorT>>;
1025
1026
using FieldsByNameMap =
1027
    absl::flat_hash_map<std::pair<const void*, absl::string_view>,
1028
                        const FieldDescriptor*>;
1029
1030
struct ParentNumberQuery {
1031
  std::pair<const void*, int> query;
1032
};
1033
0
std::pair<const void*, int> ObjectToParentNumber(const FieldDescriptor* field) {
1034
0
  return {field->containing_type(), field->number()};
1035
0
}
1036
std::pair<const void*, int> ObjectToParentNumber(
1037
0
    const EnumValueDescriptor* enum_value) {
1038
0
  return {enum_value->type(), enum_value->number()};
1039
0
}
1040
0
std::pair<const void*, int> ObjectToParentNumber(ParentNumberQuery query) {
1041
0
  return query.query;
1042
0
}
1043
struct ParentNumberHash {
1044
  using is_transparent = void;
1045
1046
  template <typename T>
1047
0
  size_t operator()(const T& t) const {
1048
0
    return absl::HashOf(ObjectToParentNumber(t));
1049
0
  }
Unexecuted instantiation: descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::ParentNumberHash::operator()<google::protobuf::(anonymous namespace)::ParentNumberQuery>(google::protobuf::(anonymous namespace)::ParentNumberQuery const&) const
Unexecuted instantiation: descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::ParentNumberHash::operator()<google::protobuf::EnumValueDescriptor*>(google::protobuf::EnumValueDescriptor* const&) const
Unexecuted instantiation: descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::ParentNumberHash::operator()<google::protobuf::EnumValueDescriptor const*>(google::protobuf::EnumValueDescriptor const* const&) const
Unexecuted instantiation: descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::ParentNumberHash::operator()<google::protobuf::FieldDescriptor*>(google::protobuf::FieldDescriptor* const&) const
Unexecuted instantiation: descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::ParentNumberHash::operator()<google::protobuf::FieldDescriptor const*>(google::protobuf::FieldDescriptor const* const&) const
1050
};
1051
struct ParentNumberEq {
1052
  using is_transparent = void;
1053
1054
  template <typename T, typename U>
1055
0
  bool operator()(const T& a, const U& b) const {
1056
0
    return ObjectToParentNumber(a) == ObjectToParentNumber(b);
1057
0
  }
Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::ParentNumberEq::operator()<google::protobuf::FieldDescriptor const*, google::protobuf::(anonymous namespace)::ParentNumberQuery>(google::protobuf::FieldDescriptor const* const&, google::protobuf::(anonymous namespace)::ParentNumberQuery const&) const
Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::ParentNumberEq::operator()<google::protobuf::EnumValueDescriptor const*, google::protobuf::(anonymous namespace)::ParentNumberQuery>(google::protobuf::EnumValueDescriptor const* const&, google::protobuf::(anonymous namespace)::ParentNumberQuery const&) const
Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::ParentNumberEq::operator()<google::protobuf::EnumValueDescriptor const*, google::protobuf::EnumValueDescriptor*>(google::protobuf::EnumValueDescriptor const* const&, google::protobuf::EnumValueDescriptor* const&) const
Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::ParentNumberEq::operator()<google::protobuf::FieldDescriptor const*, google::protobuf::FieldDescriptor*>(google::protobuf::FieldDescriptor const* const&, google::protobuf::FieldDescriptor* const&) const
1058
};
1059
using FieldsByNumberSet = absl::flat_hash_set<const FieldDescriptor*,
1060
                                              ParentNumberHash, ParentNumberEq>;
1061
using EnumValuesByNumberSet =
1062
    absl::flat_hash_set<const EnumValueDescriptor*, ParentNumberHash,
1063
                        ParentNumberEq>;
1064
1065
// This is a map rather than a hash-map, since we use it to iterate
1066
// through all the extensions that extend a given Descriptor, and an
1067
// ordered data structure that implements lower_bound is convenient
1068
// for that.
1069
using ExtensionsGroupedByDescriptorMap =
1070
    absl::btree_map<std::pair<const Descriptor*, int>, const FieldDescriptor*>;
1071
using LocationsByPathMap =
1072
    absl::flat_hash_map<std::string, const SourceCodeInfo_Location*>;
1073
1074
0
absl::flat_hash_set<std::string>* NewAllowedProto3Extendee() {
1075
0
  const char* kOptionNames[] = {
1076
0
      "FileOptions",   "MessageOptions",   "FieldOptions",
1077
0
      "EnumOptions",   "EnumValueOptions", "ServiceOptions",
1078
0
      "MethodOptions", "OneofOptions",     "ExtensionRangeOptions"};
1079
0
  auto allowed_proto3_extendees = new absl::flat_hash_set<std::string>();
1080
0
  allowed_proto3_extendees->reserve(sizeof(kOptionNames) /
1081
0
                                    sizeof(kOptionNames[0]));
1082
1083
0
  for (const char* option_name : kOptionNames) {
1084
    // descriptor.proto has a different package name in opensource. We allow
1085
    // both so the opensource protocol compiler can also compile internal
1086
    // proto3 files with custom options. See: b/27567912
1087
0
    allowed_proto3_extendees->insert(std::string("google.protobuf.") +
1088
0
                                     option_name);
1089
    // Split the word to trick the opensource processing scripts so they
1090
    // will keep the original package name.
1091
0
    allowed_proto3_extendees->insert(std::string("proto2.") + option_name);
1092
0
  }
1093
0
  return allowed_proto3_extendees;
1094
0
}
1095
1096
// Checks whether the extendee type is allowed in proto3.
1097
// Only extensions to descriptor options are allowed. We use name comparison
1098
// instead of comparing the descriptor directly because the extensions may be
1099
// defined in a different pool.
1100
0
bool AllowedExtendeeInProto3(const std::string& name) {
1101
0
  static auto allowed_proto3_extendees =
1102
0
      internal::OnShutdownDelete(NewAllowedProto3Extendee());
1103
0
  return allowed_proto3_extendees->find(name) !=
1104
0
         allowed_proto3_extendees->end();
1105
0
}
1106
}  // anonymous namespace
1107
1108
// Contains tables specific to a particular file.  These tables are not
1109
// modified once the file has been constructed, so they need not be
1110
// protected by a mutex.  This makes operations that depend only on the
1111
// contents of a single file -- e.g. Descriptor::FindFieldByName() --
1112
// lock-free.
1113
//
1114
// For historical reasons, the definitions of the methods of
1115
// FileDescriptorTables and DescriptorPool::Tables are interleaved below.
1116
// These used to be a single class.
1117
class FileDescriptorTables {
1118
 public:
1119
  FileDescriptorTables();
1120
  ~FileDescriptorTables();
1121
1122
  // Empty table, used with placeholder files.
1123
  inline static const FileDescriptorTables& GetEmptyInstance();
1124
1125
  // -----------------------------------------------------------------
1126
  // Finding items.
1127
1128
  // Returns a null Symbol (symbol.IsNull() is true) if not found.
1129
  // TODO(sbenza): All callers to this function know the type they are looking
1130
  // for. If we propagate that information statically we can make the query
1131
  // faster.
1132
  inline Symbol FindNestedSymbol(const void* parent,
1133
                                 absl::string_view name) const;
1134
1135
  // These return nullptr if not found.
1136
  inline const FieldDescriptor* FindFieldByNumber(const Descriptor* parent,
1137
                                                  int number) const;
1138
  inline const FieldDescriptor* FindFieldByLowercaseName(
1139
      const void* parent, absl::string_view lowercase_name) const;
1140
  inline const FieldDescriptor* FindFieldByCamelcaseName(
1141
      const void* parent, absl::string_view camelcase_name) const;
1142
  inline const EnumValueDescriptor* FindEnumValueByNumber(
1143
      const EnumDescriptor* parent, int number) const;
1144
  // This creates a new EnumValueDescriptor if not found, in a thread-safe way.
1145
  inline const EnumValueDescriptor* FindEnumValueByNumberCreatingIfUnknown(
1146
      const EnumDescriptor* parent, int number) const;
1147
1148
  // -----------------------------------------------------------------
1149
  // Adding items.
1150
1151
  // These add items to the corresponding tables.  They return false if
1152
  // the key already exists in the table.
1153
  bool AddAliasUnderParent(const void* parent, absl::string_view name,
1154
                           Symbol symbol);
1155
  bool AddFieldByNumber(FieldDescriptor* field);
1156
  bool AddEnumValueByNumber(EnumValueDescriptor* value);
1157
1158
  // Populates p->first->locations_by_path_ from p->second.
1159
  // Unusual signature dictated by absl::call_once.
1160
  static void BuildLocationsByPath(
1161
      std::pair<const FileDescriptorTables*, const SourceCodeInfo*>* p);
1162
1163
  // Returns the location denoted by the specified path through info,
1164
  // or nullptr if not found.
1165
  // The value of info must be that of the corresponding FileDescriptor.
1166
  // (Conceptually a pure function, but stateful as an optimisation.)
1167
  const SourceCodeInfo_Location* GetSourceLocation(
1168
      const std::vector<int>& path, const SourceCodeInfo* info) const;
1169
1170
  // Must be called after BuildFileImpl(), even if the build failed and
1171
  // we are going to roll back to the last checkpoint.
1172
  void FinalizeTables();
1173
1174
 private:
1175
  const void* FindParentForFieldsByMap(const FieldDescriptor* field) const;
1176
  static void FieldsByLowercaseNamesLazyInitStatic(
1177
      const FileDescriptorTables* tables);
1178
  void FieldsByLowercaseNamesLazyInitInternal() const;
1179
  static void FieldsByCamelcaseNamesLazyInitStatic(
1180
      const FileDescriptorTables* tables);
1181
  void FieldsByCamelcaseNamesLazyInitInternal() const;
1182
1183
  SymbolsByParentSet symbols_by_parent_;
1184
  mutable absl::once_flag fields_by_lowercase_name_once_;
1185
  mutable absl::once_flag fields_by_camelcase_name_once_;
1186
  // Make these fields atomic to avoid race conditions with
1187
  // GetEstimatedOwnedMemoryBytesSize. Once the pointer is set the map won't
1188
  // change anymore.
1189
  mutable std::atomic<const FieldsByNameMap*> fields_by_lowercase_name_{};
1190
  mutable std::atomic<const FieldsByNameMap*> fields_by_camelcase_name_{};
1191
  FieldsByNumberSet fields_by_number_;  // Not including extensions.
1192
  EnumValuesByNumberSet enum_values_by_number_;
1193
  mutable EnumValuesByNumberSet unknown_enum_values_by_number_
1194
      PROTOBUF_GUARDED_BY(unknown_enum_values_mu_);
1195
1196
  // Populated on first request to save space, hence constness games.
1197
  mutable absl::once_flag locations_by_path_once_;
1198
  mutable LocationsByPathMap locations_by_path_;
1199
1200
  // Mutex to protect the unknown-enum-value map due to dynamic
1201
  // EnumValueDescriptor creation on unknown values.
1202
  mutable absl::Mutex unknown_enum_values_mu_;
1203
};
1204
1205
namespace internal {
1206
1207
// Small sequential allocator to be used within a single file.
1208
// Most of the memory for a single FileDescriptor and everything under it is
1209
// allocated in a single block of memory, with the FlatAllocator giving it out
1210
// in parts later.
1211
// The code first plans the total number of bytes needed by calling PlanArray
1212
// with all the allocations that will happen afterwards, then calls
1213
// FinalizePlanning passing the underlying allocator (the DescriptorPool::Tables
1214
// instance), and then proceeds to get the memory via
1215
// `AllocateArray`/`AllocateString` calls. The calls to PlanArray and
1216
// The calls have to match between planning and allocating, though not
1217
// necessarily in the same order.
1218
class FlatAllocator
1219
    : public decltype(ApplyTypeList<FlatAllocatorImpl>(
1220
          SortByAlignment<char, std::string, SourceCodeInfo,
1221
                          FileDescriptorTables,
1222
                          // Option types
1223
                          MessageOptions, FieldOptions, EnumOptions,
1224
                          EnumValueOptions, ExtensionRangeOptions, OneofOptions,
1225
                          ServiceOptions, MethodOptions, FileOptions>())) {};
1226
1227
}  // namespace internal
1228
1229
// ===================================================================
1230
// DescriptorPool::Tables
1231
1232
class DescriptorPool::Tables {
1233
 public:
1234
  Tables();
1235
  ~Tables();
1236
1237
  // Record the current state of the tables to the stack of checkpoints.
1238
  // Each call to AddCheckpoint() must be paired with exactly one call to either
1239
  // ClearLastCheckpoint() or RollbackToLastCheckpoint().
1240
  //
1241
  // This is used when building files, since some kinds of validation errors
1242
  // cannot be detected until the file's descriptors have already been added to
1243
  // the tables.
1244
  //
1245
  // This supports recursive checkpoints, since building a file may trigger
1246
  // recursive building of other files. Note that recursive checkpoints are not
1247
  // normally necessary; explicit dependencies are built prior to checkpointing.
1248
  // So although we recursively build transitive imports, there is at most one
1249
  // checkpoint in the stack during dependency building.
1250
  //
1251
  // Recursive checkpoints only arise during cross-linking of the descriptors.
1252
  // Symbol references must be resolved, via DescriptorBuilder::FindSymbol and
1253
  // friends. If the pending file references an unknown symbol
1254
  // (e.g., it is not defined in the pending file's explicit dependencies), and
1255
  // the pool is using a fallback database, and that database contains a file
1256
  // defining that symbol, and that file has not yet been built by the pool,
1257
  // the pool builds the file during cross-linking, leading to another
1258
  // checkpoint.
1259
  void AddCheckpoint();
1260
1261
  // Mark the last checkpoint as having cleared successfully, removing it from
1262
  // the stack. If the stack is empty, all pending symbols will be committed.
1263
  //
1264
  // Note that this does not guarantee that the symbols added since the last
1265
  // checkpoint won't be rolled back: if a checkpoint gets rolled back,
1266
  // everything past that point gets rolled back, including symbols added after
1267
  // checkpoints that were pushed onto the stack after it and marked as cleared.
1268
  void ClearLastCheckpoint();
1269
1270
  // Roll back the Tables to the state of the checkpoint at the top of the
1271
  // stack, removing everything that was added after that point.
1272
  void RollbackToLastCheckpoint();
1273
1274
  // The stack of files which are currently being built.  Used to detect
1275
  // cyclic dependencies when loading files from a DescriptorDatabase.  Not
1276
  // used when fallback_database_ == nullptr.
1277
  std::vector<std::string> pending_files_;
1278
1279
  // A set of files which we have tried to load from the fallback database
1280
  // and encountered errors.  We will not attempt to load them again during
1281
  // execution of the current public API call, but for compatibility with
1282
  // legacy clients, this is cleared at the beginning of each public API call.
1283
  // Not used when fallback_database_ == nullptr.
1284
  absl::flat_hash_set<std::string> known_bad_files_;
1285
1286
  // A set of symbols which we have tried to load from the fallback database
1287
  // and encountered errors. We will not attempt to load them again during
1288
  // execution of the current public API call, but for compatibility with
1289
  // legacy clients, this is cleared at the beginning of each public API call.
1290
  absl::flat_hash_set<std::string> known_bad_symbols_;
1291
1292
  // The set of descriptors for which we've already loaded the full
1293
  // set of extensions numbers from fallback_database_.
1294
  absl::flat_hash_set<const Descriptor*> extensions_loaded_from_db_;
1295
1296
  // Maps type name to Descriptor::WellKnownType.  This is logically global
1297
  // and const, but we make it a member here to simplify its construction and
1298
  // destruction.  This only has 20-ish entries and is one per DescriptorPool,
1299
  // so the overhead is small.
1300
  absl::flat_hash_map<std::string, Descriptor::WellKnownType> well_known_types_;
1301
1302
  // -----------------------------------------------------------------
1303
  // Finding items.
1304
1305
  // Find symbols.  This returns a null Symbol (symbol.IsNull() is true)
1306
  // if not found.
1307
  inline Symbol FindSymbol(absl::string_view key) const;
1308
1309
  // This implements the body of DescriptorPool::Find*ByName().  It should
1310
  // really be a private method of DescriptorPool, but that would require
1311
  // declaring Symbol in descriptor.h, which would drag all kinds of other
1312
  // stuff into the header.  Yay C++.
1313
  Symbol FindByNameHelper(const DescriptorPool* pool, absl::string_view name);
1314
1315
  // These return nullptr if not found.
1316
  inline const FileDescriptor* FindFile(absl::string_view key) const;
1317
  inline const FieldDescriptor* FindExtension(const Descriptor* extendee,
1318
                                              int number) const;
1319
  inline void FindAllExtensions(const Descriptor* extendee,
1320
                                std::vector<const FieldDescriptor*>* out) const;
1321
1322
  // -----------------------------------------------------------------
1323
  // Adding items.
1324
1325
  // These add items to the corresponding tables.  They return false if
1326
  // the key already exists in the table.  For AddSymbol(), the string passed
1327
  // in must be one that was constructed using AllocateString(), as it will
1328
  // be used as a key in the symbols_by_name_ map without copying.
1329
  bool AddSymbol(absl::string_view full_name, Symbol symbol);
1330
  bool AddFile(const FileDescriptor* file);
1331
  bool AddExtension(const FieldDescriptor* field);
1332
1333
  // -----------------------------------------------------------------
1334
  // Allocating memory.
1335
1336
  // Allocate an object which will be reclaimed when the pool is
1337
  // destroyed.  Note that the object's destructor will never be called,
1338
  // so its fields must be plain old data (primitive data types and
1339
  // pointers).  All of the descriptor types are such objects.
1340
  template <typename Type>
1341
  Type* Allocate();
1342
1343
  // Allocate some bytes which will be reclaimed when the pool is
1344
  // destroyed. Memory is aligned to 8 bytes.
1345
  void* AllocateBytes(int size);
1346
1347
  // Create a FlatAllocation for the corresponding sizes.
1348
  // All objects within it will be default constructed.
1349
  // The whole allocation, including the non-trivial objects within, will be
1350
  // destroyed with the pool.
1351
  template <typename... T>
1352
  internal::FlatAllocator::Allocation* CreateFlatAlloc(
1353
      const TypeMap<IntT, T...>& sizes);
1354
1355
1356
 private:
1357
  // All memory allocated in the pool.  Must be first as other objects can
1358
  // point into these.
1359
  struct MiscDeleter {
1360
0
    void operator()(int* p) const { internal::SizedDelete(p, *p + 8); }
1361
  };
1362
  // Miscellaneous allocations are length prefixed. The paylaod is 8 bytes after
1363
  // the `int` that contains the size. This keeps the payload aligned.
1364
  std::vector<std::unique_ptr<int, MiscDeleter>> misc_allocs_;
1365
  struct FlatAllocDeleter {
1366
0
    void operator()(internal::FlatAllocator::Allocation* p) const {
1367
0
      p->Destroy();
1368
0
    }
1369
  };
1370
  std::vector<
1371
      std::unique_ptr<internal::FlatAllocator::Allocation, FlatAllocDeleter>>
1372
      flat_allocs_;
1373
1374
  SymbolsByNameSet symbols_by_name_;
1375
  DescriptorsByNameSet<FileDescriptor> files_by_name_;
1376
  ExtensionsGroupedByDescriptorMap extensions_;
1377
1378
  struct CheckPoint {
1379
    explicit CheckPoint(const Tables* tables)
1380
        : flat_allocations_before_checkpoint(
1381
              static_cast<int>(tables->flat_allocs_.size())),
1382
          misc_allocations_before_checkpoint(
1383
              static_cast<int>(tables->misc_allocs_.size())),
1384
          pending_symbols_before_checkpoint(
1385
              tables->symbols_after_checkpoint_.size()),
1386
          pending_files_before_checkpoint(
1387
              tables->files_after_checkpoint_.size()),
1388
          pending_extensions_before_checkpoint(
1389
0
              tables->extensions_after_checkpoint_.size()) {}
1390
    int flat_allocations_before_checkpoint;
1391
    int misc_allocations_before_checkpoint;
1392
    int pending_symbols_before_checkpoint;
1393
    int pending_files_before_checkpoint;
1394
    int pending_extensions_before_checkpoint;
1395
  };
1396
  std::vector<CheckPoint> checkpoints_;
1397
  std::vector<Symbol> symbols_after_checkpoint_;
1398
  std::vector<const FileDescriptor*> files_after_checkpoint_;
1399
  std::vector<std::pair<const Descriptor*, int>> extensions_after_checkpoint_;
1400
};
1401
1402
0
DescriptorPool::Tables::Tables() {
1403
0
  well_known_types_.insert({
1404
0
      {"google.protobuf.DoubleValue", Descriptor::WELLKNOWNTYPE_DOUBLEVALUE},
1405
0
      {"google.protobuf.FloatValue", Descriptor::WELLKNOWNTYPE_FLOATVALUE},
1406
0
      {"google.protobuf.Int64Value", Descriptor::WELLKNOWNTYPE_INT64VALUE},
1407
0
      {"google.protobuf.UInt64Value", Descriptor::WELLKNOWNTYPE_UINT64VALUE},
1408
0
      {"google.protobuf.Int32Value", Descriptor::WELLKNOWNTYPE_INT32VALUE},
1409
0
      {"google.protobuf.UInt32Value", Descriptor::WELLKNOWNTYPE_UINT32VALUE},
1410
0
      {"google.protobuf.StringValue", Descriptor::WELLKNOWNTYPE_STRINGVALUE},
1411
0
      {"google.protobuf.BytesValue", Descriptor::WELLKNOWNTYPE_BYTESVALUE},
1412
0
      {"google.protobuf.BoolValue", Descriptor::WELLKNOWNTYPE_BOOLVALUE},
1413
0
      {"google.protobuf.Any", Descriptor::WELLKNOWNTYPE_ANY},
1414
0
      {"google.protobuf.FieldMask", Descriptor::WELLKNOWNTYPE_FIELDMASK},
1415
0
      {"google.protobuf.Duration", Descriptor::WELLKNOWNTYPE_DURATION},
1416
0
      {"google.protobuf.Timestamp", Descriptor::WELLKNOWNTYPE_TIMESTAMP},
1417
0
      {"google.protobuf.Value", Descriptor::WELLKNOWNTYPE_VALUE},
1418
0
      {"google.protobuf.ListValue", Descriptor::WELLKNOWNTYPE_LISTVALUE},
1419
0
      {"google.protobuf.Struct", Descriptor::WELLKNOWNTYPE_STRUCT},
1420
0
  });
1421
0
}
1422
1423
0
DescriptorPool::Tables::~Tables() { ABSL_DCHECK(checkpoints_.empty()); }
1424
1425
0
FileDescriptorTables::FileDescriptorTables() {}
1426
1427
0
FileDescriptorTables::~FileDescriptorTables() {
1428
0
  delete fields_by_lowercase_name_.load(std::memory_order_acquire);
1429
0
  delete fields_by_camelcase_name_.load(std::memory_order_acquire);
1430
0
}
1431
1432
0
inline const FileDescriptorTables& FileDescriptorTables::GetEmptyInstance() {
1433
0
  static auto file_descriptor_tables =
1434
0
      internal::OnShutdownDelete(new FileDescriptorTables());
1435
0
  return *file_descriptor_tables;
1436
0
}
1437
1438
0
void DescriptorPool::Tables::AddCheckpoint() {
1439
0
  checkpoints_.emplace_back(this);
1440
0
}
1441
1442
0
void DescriptorPool::Tables::ClearLastCheckpoint() {
1443
0
  ABSL_DCHECK(!checkpoints_.empty());
1444
0
  checkpoints_.pop_back();
1445
0
  if (checkpoints_.empty()) {
1446
    // All checkpoints have been cleared: we can now commit all of the pending
1447
    // data.
1448
0
    symbols_after_checkpoint_.clear();
1449
0
    files_after_checkpoint_.clear();
1450
0
    extensions_after_checkpoint_.clear();
1451
0
  }
1452
0
}
1453
1454
0
void DescriptorPool::Tables::RollbackToLastCheckpoint() {
1455
0
  ABSL_DCHECK(!checkpoints_.empty());
1456
0
  const CheckPoint& checkpoint = checkpoints_.back();
1457
1458
0
  for (size_t i = checkpoint.pending_symbols_before_checkpoint;
1459
0
       i < symbols_after_checkpoint_.size(); i++) {
1460
0
    symbols_by_name_.erase(symbols_after_checkpoint_[i]);
1461
0
  }
1462
0
  for (size_t i = checkpoint.pending_files_before_checkpoint;
1463
0
       i < files_after_checkpoint_.size(); i++) {
1464
0
    files_by_name_.erase(files_after_checkpoint_[i]);
1465
0
  }
1466
0
  for (size_t i = checkpoint.pending_extensions_before_checkpoint;
1467
0
       i < extensions_after_checkpoint_.size(); i++) {
1468
0
    extensions_.erase(extensions_after_checkpoint_[i]);
1469
0
  }
1470
1471
0
  symbols_after_checkpoint_.resize(
1472
0
      checkpoint.pending_symbols_before_checkpoint);
1473
0
  files_after_checkpoint_.resize(checkpoint.pending_files_before_checkpoint);
1474
0
  extensions_after_checkpoint_.resize(
1475
0
      checkpoint.pending_extensions_before_checkpoint);
1476
1477
0
  flat_allocs_.resize(checkpoint.flat_allocations_before_checkpoint);
1478
0
  misc_allocs_.resize(checkpoint.misc_allocations_before_checkpoint);
1479
0
  checkpoints_.pop_back();
1480
0
}
1481
1482
// -------------------------------------------------------------------
1483
1484
0
inline Symbol DescriptorPool::Tables::FindSymbol(absl::string_view key) const {
1485
0
  auto it = symbols_by_name_.find(FullNameQuery{key});
1486
0
  return it == symbols_by_name_.end() ? Symbol() : *it;
1487
0
}
1488
1489
inline Symbol FileDescriptorTables::FindNestedSymbol(
1490
0
    const void* parent, absl::string_view name) const {
1491
0
  auto it = symbols_by_parent_.find(ParentNameQuery{{parent, name}});
1492
0
  return it == symbols_by_parent_.end() ? Symbol() : *it;
1493
0
}
1494
1495
Symbol DescriptorPool::Tables::FindByNameHelper(const DescriptorPool* pool,
1496
0
                                                absl::string_view name) {
1497
0
  if (pool->mutex_ != nullptr) {
1498
    // Fast path: the Symbol is already cached.  This is just a hash lookup.
1499
0
    absl::ReaderMutexLock lock(pool->mutex_);
1500
0
    if (known_bad_symbols_.empty() && known_bad_files_.empty()) {
1501
0
      Symbol result = FindSymbol(name);
1502
0
      if (!result.IsNull()) return result;
1503
0
    }
1504
0
  }
1505
0
  absl::MutexLockMaybe lock(pool->mutex_);
1506
0
  if (pool->fallback_database_ != nullptr) {
1507
0
    known_bad_symbols_.clear();
1508
0
    known_bad_files_.clear();
1509
0
  }
1510
0
  Symbol result = FindSymbol(name);
1511
1512
0
  if (result.IsNull() && pool->underlay_ != nullptr) {
1513
    // Symbol not found; check the underlay.
1514
0
    result = pool->underlay_->tables_->FindByNameHelper(pool->underlay_, name);
1515
0
  }
1516
1517
0
  if (result.IsNull()) {
1518
    // Symbol still not found, so check fallback database.
1519
0
    if (pool->TryFindSymbolInFallbackDatabase(name)) {
1520
0
      result = FindSymbol(name);
1521
0
    }
1522
0
  }
1523
1524
0
  return result;
1525
0
}
1526
1527
inline const FileDescriptor* DescriptorPool::Tables::FindFile(
1528
0
    absl::string_view key) const {
1529
0
  auto it = files_by_name_.find(key);
1530
0
  if (it == files_by_name_.end()) return nullptr;
1531
0
  return *it;
1532
0
}
1533
1534
inline const FieldDescriptor* FileDescriptorTables::FindFieldByNumber(
1535
0
    const Descriptor* parent, int number) const {
1536
  // If `number` is within the sequential range, just index into the parent
1537
  // without doing a table lookup.
1538
0
  if (parent != nullptr &&  //
1539
0
      1 <= number && number <= parent->sequential_field_limit_) {
1540
0
    return parent->field(number - 1);
1541
0
  }
1542
1543
0
  auto it = fields_by_number_.find(ParentNumberQuery{{parent, number}});
1544
0
  return it == fields_by_number_.end() ? nullptr : *it;
1545
0
}
1546
1547
const void* FileDescriptorTables::FindParentForFieldsByMap(
1548
0
    const FieldDescriptor* field) const {
1549
0
  if (field->is_extension()) {
1550
0
    if (field->extension_scope() == nullptr) {
1551
0
      return field->file();
1552
0
    } else {
1553
0
      return field->extension_scope();
1554
0
    }
1555
0
  } else {
1556
0
    return field->containing_type();
1557
0
  }
1558
0
}
1559
1560
void FileDescriptorTables::FieldsByLowercaseNamesLazyInitStatic(
1561
0
    const FileDescriptorTables* tables) {
1562
0
  tables->FieldsByLowercaseNamesLazyInitInternal();
1563
0
}
1564
1565
0
void FileDescriptorTables::FieldsByLowercaseNamesLazyInitInternal() const {
1566
0
  auto* map = new FieldsByNameMap;
1567
0
  for (Symbol symbol : symbols_by_parent_) {
1568
0
    const FieldDescriptor* field = symbol.field_descriptor();
1569
0
    if (!field) continue;
1570
0
    (*map)[{FindParentForFieldsByMap(field), field->lowercase_name().c_str()}] =
1571
0
        field;
1572
0
  }
1573
0
  fields_by_lowercase_name_.store(map, std::memory_order_release);
1574
0
}
1575
1576
inline const FieldDescriptor* FileDescriptorTables::FindFieldByLowercaseName(
1577
0
    const void* parent, absl::string_view lowercase_name) const {
1578
0
  absl::call_once(fields_by_lowercase_name_once_,
1579
0
                  &FileDescriptorTables::FieldsByLowercaseNamesLazyInitStatic,
1580
0
                  this);
1581
0
  const auto* fields =
1582
0
      fields_by_lowercase_name_.load(std::memory_order_acquire);
1583
0
  auto it = fields->find({parent, lowercase_name});
1584
0
  if (it == fields->end()) return nullptr;
1585
0
  return it->second;
1586
0
}
1587
1588
void FileDescriptorTables::FieldsByCamelcaseNamesLazyInitStatic(
1589
0
    const FileDescriptorTables* tables) {
1590
0
  tables->FieldsByCamelcaseNamesLazyInitInternal();
1591
0
}
1592
1593
0
void FileDescriptorTables::FieldsByCamelcaseNamesLazyInitInternal() const {
1594
0
  auto* map = new FieldsByNameMap;
1595
0
  for (Symbol symbol : symbols_by_parent_) {
1596
0
    const FieldDescriptor* field = symbol.field_descriptor();
1597
0
    if (!field) continue;
1598
0
    (*map)[{FindParentForFieldsByMap(field), field->camelcase_name().c_str()}] =
1599
0
        field;
1600
0
  }
1601
0
  fields_by_camelcase_name_.store(map, std::memory_order_release);
1602
0
}
1603
1604
inline const FieldDescriptor* FileDescriptorTables::FindFieldByCamelcaseName(
1605
0
    const void* parent, absl::string_view camelcase_name) const {
1606
0
  absl::call_once(fields_by_camelcase_name_once_,
1607
0
                  FileDescriptorTables::FieldsByCamelcaseNamesLazyInitStatic,
1608
0
                  this);
1609
0
  auto* fields = fields_by_camelcase_name_.load(std::memory_order_acquire);
1610
0
  auto it = fields->find({parent, camelcase_name});
1611
0
  if (it == fields->end()) return nullptr;
1612
0
  return it->second;
1613
0
}
1614
1615
inline const EnumValueDescriptor* FileDescriptorTables::FindEnumValueByNumber(
1616
0
    const EnumDescriptor* parent, int number) const {
1617
  // If `number` is within the sequential range, just index into the parent
1618
  // without doing a table lookup.
1619
0
  const int base = parent->value(0)->number();
1620
0
  if (base <= number &&
1621
0
      number <= static_cast<int64_t>(base) + parent->sequential_value_limit_) {
1622
0
    return parent->value(number - base);
1623
0
  }
1624
1625
0
  auto it = enum_values_by_number_.find(ParentNumberQuery{{parent, number}});
1626
0
  return it == enum_values_by_number_.end() ? nullptr : *it;
1627
0
}
1628
1629
inline const EnumValueDescriptor*
1630
FileDescriptorTables::FindEnumValueByNumberCreatingIfUnknown(
1631
0
    const EnumDescriptor* parent, int number) const {
1632
  // First try, with map of compiled-in values.
1633
0
  {
1634
0
    const auto* value = FindEnumValueByNumber(parent, number);
1635
0
    if (value != nullptr) {
1636
0
      return value;
1637
0
    }
1638
0
  }
1639
1640
0
  const ParentNumberQuery query{{parent, number}};
1641
1642
  // Second try, with reader lock held on unknown enum values: common case.
1643
0
  {
1644
0
    absl::ReaderMutexLock l(&unknown_enum_values_mu_);
1645
0
    auto it = unknown_enum_values_by_number_.find(query);
1646
0
    if (it != unknown_enum_values_by_number_.end()) {
1647
0
      return *it;
1648
0
    }
1649
0
  }
1650
  // If not found, try again with writer lock held, and create new descriptor if
1651
  // necessary.
1652
0
  {
1653
0
    absl::WriterMutexLock l(&unknown_enum_values_mu_);
1654
0
    auto it = unknown_enum_values_by_number_.find(query);
1655
0
    if (it != unknown_enum_values_by_number_.end()) {
1656
0
      return *it;
1657
0
    }
1658
1659
    // Create an EnumValueDescriptor dynamically. We don't insert it into the
1660
    // EnumDescriptor (it's not a part of the enum as originally defined), but
1661
    // we do insert it into the table so that we can return the same pointer
1662
    // later.
1663
0
    std::string enum_value_name = absl::StrFormat(
1664
0
        "UNKNOWN_ENUM_VALUE_%s_%d", parent->name().c_str(), number);
1665
0
    auto* pool = DescriptorPool::generated_pool();
1666
0
    auto* tables = const_cast<DescriptorPool::Tables*>(pool->tables_.get());
1667
0
    internal::FlatAllocator alloc;
1668
0
    alloc.PlanArray<EnumValueDescriptor>(1);
1669
0
    alloc.PlanArray<std::string>(2);
1670
1671
0
    {
1672
      // Must lock the pool because we will do allocations in the shared arena.
1673
0
      absl::MutexLockMaybe l2(pool->mutex_);
1674
0
      alloc.FinalizePlanning(tables);
1675
0
    }
1676
0
    EnumValueDescriptor* result = alloc.AllocateArray<EnumValueDescriptor>(1);
1677
0
    result->all_names_ = alloc.AllocateStrings(
1678
0
        enum_value_name,
1679
0
        absl::StrCat(parent->full_name(), ".", enum_value_name));
1680
0
    result->number_ = number;
1681
0
    result->type_ = parent;
1682
0
    result->options_ = &EnumValueOptions::default_instance();
1683
0
    unknown_enum_values_by_number_.insert(result);
1684
0
    return result;
1685
0
  }
1686
0
}
1687
1688
inline const FieldDescriptor* DescriptorPool::Tables::FindExtension(
1689
0
    const Descriptor* extendee, int number) const {
1690
0
  auto it = extensions_.find({extendee, number});
1691
0
  if (it == extensions_.end()) return nullptr;
1692
0
  return it->second;
1693
0
}
1694
1695
inline void DescriptorPool::Tables::FindAllExtensions(
1696
    const Descriptor* extendee,
1697
0
    std::vector<const FieldDescriptor*>* out) const {
1698
0
  ExtensionsGroupedByDescriptorMap::const_iterator it =
1699
0
      extensions_.lower_bound(std::make_pair(extendee, 0));
1700
0
  for (; it != extensions_.end() && it->first.first == extendee; ++it) {
1701
0
    out->push_back(it->second);
1702
0
  }
1703
0
}
1704
1705
// -------------------------------------------------------------------
1706
1707
bool DescriptorPool::Tables::AddSymbol(absl::string_view full_name,
1708
0
                                       Symbol symbol) {
1709
0
  ABSL_DCHECK_EQ(full_name, symbol.full_name());
1710
0
  if (symbols_by_name_.insert(symbol).second) {
1711
0
    symbols_after_checkpoint_.push_back(symbol);
1712
0
    return true;
1713
0
  } else {
1714
0
    return false;
1715
0
  }
1716
0
}
1717
1718
bool FileDescriptorTables::AddAliasUnderParent(const void* parent,
1719
                                               absl::string_view name,
1720
0
                                               Symbol symbol) {
1721
0
  ABSL_DCHECK_EQ(name, symbol.parent_name_key().second);
1722
0
  ABSL_DCHECK_EQ(parent, symbol.parent_name_key().first);
1723
0
  return symbols_by_parent_.insert(symbol).second;
1724
0
}
1725
1726
0
bool DescriptorPool::Tables::AddFile(const FileDescriptor* file) {
1727
0
  if (files_by_name_.insert(file).second) {
1728
0
    files_after_checkpoint_.push_back(file);
1729
0
    return true;
1730
0
  } else {
1731
0
    return false;
1732
0
  }
1733
0
}
1734
1735
0
void FileDescriptorTables::FinalizeTables() {}
1736
1737
0
bool FileDescriptorTables::AddFieldByNumber(FieldDescriptor* field) {
1738
  // Skip fields that are at the start of the sequence.
1739
0
  if (field->containing_type() != nullptr && field->number() >= 1 &&
1740
0
      field->number() <= field->containing_type()->sequential_field_limit_) {
1741
0
    if (field->is_extension()) {
1742
      // Conflicts with the field that already exists in the sequential range.
1743
0
      return false;
1744
0
    }
1745
    // Only return true if the field at that index matches. Otherwise it
1746
    // conflicts with the existing field in the sequential range.
1747
0
    return field->containing_type()->field(field->number() - 1) == field;
1748
0
  }
1749
1750
0
  return fields_by_number_.insert(field).second;
1751
0
}
1752
1753
0
bool FileDescriptorTables::AddEnumValueByNumber(EnumValueDescriptor* value) {
1754
  // Skip values that are at the start of the sequence.
1755
0
  const int base = value->type()->value(0)->number();
1756
0
  if (base <= value->number() &&
1757
0
      value->number() <=
1758
0
          static_cast<int64_t>(base) + value->type()->sequential_value_limit_)
1759
0
    return true;
1760
0
  return enum_values_by_number_.insert(value).second;
1761
0
}
1762
1763
0
bool DescriptorPool::Tables::AddExtension(const FieldDescriptor* field) {
1764
0
  auto it_inserted =
1765
0
      extensions_.insert({{field->containing_type(), field->number()}, field});
1766
0
  if (it_inserted.second) {
1767
0
    extensions_after_checkpoint_.push_back(it_inserted.first->first);
1768
0
    return true;
1769
0
  } else {
1770
0
    return false;
1771
0
  }
1772
0
}
1773
1774
// -------------------------------------------------------------------
1775
1776
template <typename Type>
1777
0
Type* DescriptorPool::Tables::Allocate() {
1778
0
  static_assert(std::is_trivially_destructible<Type>::value, "");
1779
0
  static_assert(alignof(Type) <= 8, "");
1780
0
  return ::new (AllocateBytes(sizeof(Type))) Type{};
1781
0
}
1782
1783
0
void* DescriptorPool::Tables::AllocateBytes(int size) {
1784
0
  if (size == 0) return nullptr;
1785
0
  void* p = ::operator new(size + RoundUpTo<8>(sizeof(int)));
1786
0
  int* sizep = static_cast<int*>(p);
1787
0
  misc_allocs_.emplace_back(sizep);
1788
0
  *sizep = size;
1789
0
  return static_cast<char*>(p) + RoundUpTo<8>(sizeof(int));
1790
0
}
1791
1792
template <typename... T>
1793
internal::FlatAllocator::Allocation* DescriptorPool::Tables::CreateFlatAlloc(
1794
0
    const TypeMap<IntT, T...>& sizes) {
1795
0
  auto ends = CalculateEnds(sizes);
1796
0
  using FlatAlloc = internal::FlatAllocator::Allocation;
1797
1798
0
  int last_end = ends.template Get<
1799
0
      typename std::tuple_element<sizeof...(T) - 1, std::tuple<T...>>::type>();
1800
0
  size_t total_size =
1801
0
      last_end + RoundUpTo<FlatAlloc::kMaxAlign>(sizeof(FlatAlloc));
1802
0
  char* data = static_cast<char*>(::operator new(total_size));
1803
0
  auto* res = ::new (data) FlatAlloc(ends);
1804
0
  flat_allocs_.emplace_back(res);
1805
1806
0
  return res;
1807
0
}
1808
1809
void FileDescriptorTables::BuildLocationsByPath(
1810
0
    std::pair<const FileDescriptorTables*, const SourceCodeInfo*>* p) {
1811
0
  for (int i = 0, len = p->second->location_size(); i < len; ++i) {
1812
0
    const SourceCodeInfo_Location* loc = &p->second->location().Get(i);
1813
0
    p->first->locations_by_path_[absl::StrJoin(loc->path(), ",")] = loc;
1814
0
  }
1815
0
}
1816
1817
const SourceCodeInfo_Location* FileDescriptorTables::GetSourceLocation(
1818
0
    const std::vector<int>& path, const SourceCodeInfo* info) const {
1819
0
  std::pair<const FileDescriptorTables*, const SourceCodeInfo*> p(
1820
0
      std::make_pair(this, info));
1821
0
  absl::call_once(locations_by_path_once_,
1822
0
                  FileDescriptorTables::BuildLocationsByPath, &p);
1823
0
  auto it = locations_by_path_.find(absl::StrJoin(path, ","));
1824
0
  if (it == locations_by_path_.end()) return nullptr;
1825
0
  return it->second;
1826
0
}
1827
1828
// ===================================================================
1829
// DescriptorPool
1830
1831
1832
0
DescriptorPool::ErrorCollector::~ErrorCollector() {}
1833
1834
absl::string_view DescriptorPool::ErrorCollector::ErrorLocationName(
1835
0
    ErrorLocation location) {
1836
0
  switch (location) {
1837
0
    case NAME:
1838
0
      return "NAME";
1839
0
    case NUMBER:
1840
0
      return "NUMBER";
1841
0
    case TYPE:
1842
0
      return "TYPE";
1843
0
    case EXTENDEE:
1844
0
      return "EXTENDEE";
1845
0
    case DEFAULT_VALUE:
1846
0
      return "DEFAULT_VALUE";
1847
0
    case OPTION_NAME:
1848
0
      return "OPTION_NAME";
1849
0
    case OPTION_VALUE:
1850
0
      return "OPTION_VALUE";
1851
0
    case INPUT_TYPE:
1852
0
      return "INPUT_TYPE";
1853
0
    case OUTPUT_TYPE:
1854
0
      return "OUTPUT_TYPE";
1855
0
    case IMPORT:
1856
0
      return "IMPORT";
1857
0
    case OTHER:
1858
0
      return "OTHER";
1859
0
  }
1860
0
  return "UNKNOWN";
1861
0
}
1862
1863
DescriptorPool::DescriptorPool()
1864
    : mutex_(nullptr),
1865
      fallback_database_(nullptr),
1866
      default_error_collector_(nullptr),
1867
      underlay_(nullptr),
1868
      tables_(new Tables),
1869
      enforce_dependencies_(true),
1870
      lazily_build_dependencies_(false),
1871
      allow_unknown_(false),
1872
      enforce_weak_(false),
1873
      enforce_special_extension_ranges_(false),
1874
      disallow_enforce_utf8_(false),
1875
0
      deprecated_legacy_json_field_conflicts_(false) {}
1876
1877
DescriptorPool::DescriptorPool(DescriptorDatabase* fallback_database,
1878
                               ErrorCollector* error_collector)
1879
    : mutex_(new absl::Mutex),
1880
      fallback_database_(fallback_database),
1881
      default_error_collector_(error_collector),
1882
      underlay_(nullptr),
1883
      tables_(new Tables),
1884
      enforce_dependencies_(true),
1885
      lazily_build_dependencies_(false),
1886
      allow_unknown_(false),
1887
      enforce_weak_(false),
1888
      enforce_special_extension_ranges_(false),
1889
      disallow_enforce_utf8_(false),
1890
0
      deprecated_legacy_json_field_conflicts_(false) {}
1891
1892
DescriptorPool::DescriptorPool(const DescriptorPool* underlay)
1893
    : mutex_(nullptr),
1894
      fallback_database_(nullptr),
1895
      default_error_collector_(nullptr),
1896
      underlay_(underlay),
1897
      tables_(new Tables),
1898
      enforce_dependencies_(true),
1899
      lazily_build_dependencies_(false),
1900
      allow_unknown_(false),
1901
      enforce_weak_(false),
1902
      enforce_special_extension_ranges_(false),
1903
      disallow_enforce_utf8_(false),
1904
0
      deprecated_legacy_json_field_conflicts_(false) {}
1905
1906
0
DescriptorPool::~DescriptorPool() {
1907
0
  if (mutex_ != nullptr) delete mutex_;
1908
0
}
1909
1910
// DescriptorPool::BuildFile() defined later.
1911
// DescriptorPool::BuildFileCollectingErrors() defined later.
1912
1913
0
void DescriptorPool::InternalDontEnforceDependencies() {
1914
0
  enforce_dependencies_ = false;
1915
0
}
1916
1917
void DescriptorPool::AddUnusedImportTrackFile(absl::string_view file_name,
1918
0
                                              bool is_error) {
1919
0
  unused_import_track_files_[file_name] = is_error;
1920
0
}
1921
1922
1923
0
void DescriptorPool::ClearUnusedImportTrackFiles() {
1924
0
  unused_import_track_files_.clear();
1925
0
}
1926
1927
0
bool DescriptorPool::InternalIsFileLoaded(absl::string_view filename) const {
1928
0
  absl::MutexLockMaybe lock(mutex_);
1929
0
  return tables_->FindFile(filename) != nullptr;
1930
0
}
1931
1932
// generated_pool ====================================================
1933
1934
namespace {
1935
1936
1937
10
EncodedDescriptorDatabase* GeneratedDatabase() {
1938
10
  static auto generated_database =
1939
10
      internal::OnShutdownDelete(new EncodedDescriptorDatabase());
1940
10
  return generated_database;
1941
10
}
1942
1943
0
DescriptorPool* NewGeneratedPool() {
1944
0
  auto generated_pool = new DescriptorPool(GeneratedDatabase());
1945
0
  generated_pool->InternalSetLazilyBuildDependencies();
1946
0
  return generated_pool;
1947
0
}
1948
1949
}  // anonymous namespace
1950
1951
0
DescriptorDatabase* DescriptorPool::internal_generated_database() {
1952
0
  return GeneratedDatabase();
1953
0
}
1954
1955
0
DescriptorPool* DescriptorPool::internal_generated_pool() {
1956
0
  static DescriptorPool* generated_pool =
1957
0
      internal::OnShutdownDelete(NewGeneratedPool());
1958
0
  return generated_pool;
1959
0
}
1960
1961
0
const DescriptorPool* DescriptorPool::generated_pool() {
1962
0
  const DescriptorPool* pool = internal_generated_pool();
1963
  // Ensure that descriptor.proto gets registered in the generated pool. It is a
1964
  // special case because it is included in the full runtime. We have to avoid
1965
  // registering it pre-main, because we need to ensure that the linker
1966
  // --gc-sections step can strip out the full runtime if it is unused.
1967
0
  DescriptorProto::descriptor();
1968
0
  return pool;
1969
0
}
1970
1971
1972
void DescriptorPool::InternalAddGeneratedFile(
1973
10
    const void* encoded_file_descriptor, int size) {
1974
  // So, this function is called in the process of initializing the
1975
  // descriptors for generated proto classes.  Each generated .pb.cc file
1976
  // has an internal procedure called AddDescriptors() which is called at
1977
  // process startup, and that function calls this one in order to register
1978
  // the raw bytes of the FileDescriptorProto representing the file.
1979
  //
1980
  // We do not actually construct the descriptor objects right away.  We just
1981
  // hang on to the bytes until they are actually needed.  We actually construct
1982
  // the descriptor the first time one of the following things happens:
1983
  // * Someone calls a method like descriptor(), GetDescriptor(), or
1984
  //   GetReflection() on the generated types, which requires returning the
1985
  //   descriptor or an object based on it.
1986
  // * Someone looks up the descriptor in DescriptorPool::generated_pool().
1987
  //
1988
  // Once one of these happens, the DescriptorPool actually parses the
1989
  // FileDescriptorProto and generates a FileDescriptor (and all its children)
1990
  // based on it.
1991
  //
1992
  // Note that FileDescriptorProto is itself a generated protocol message.
1993
  // Therefore, when we parse one, we have to be very careful to avoid using
1994
  // any descriptor-based operations, since this might cause infinite recursion
1995
  // or deadlock.
1996
10
  ABSL_CHECK(GeneratedDatabase()->Add(encoded_file_descriptor, size));
1997
10
}
1998
1999
2000
// Find*By* methods ==================================================
2001
2002
// TODO(kenton):  There's a lot of repeated code here, but I'm not sure if
2003
//   there's any good way to factor it out.  Think about this some time when
2004
//   there's nothing more important to do (read: never).
2005
2006
const FileDescriptor* DescriptorPool::FindFileByName(
2007
0
    absl::string_view name) const {
2008
0
  absl::MutexLockMaybe lock(mutex_);
2009
0
  if (fallback_database_ != nullptr) {
2010
0
    tables_->known_bad_symbols_.clear();
2011
0
    tables_->known_bad_files_.clear();
2012
0
  }
2013
0
  const FileDescriptor* result = tables_->FindFile(name);
2014
0
  if (result != nullptr) return result;
2015
0
  if (underlay_ != nullptr) {
2016
0
    result = underlay_->FindFileByName(name);
2017
0
    if (result != nullptr) return result;
2018
0
  }
2019
0
  if (TryFindFileInFallbackDatabase(name)) {
2020
0
    result = tables_->FindFile(name);
2021
0
    if (result != nullptr) return result;
2022
0
  }
2023
0
  return nullptr;
2024
0
}
2025
2026
const FileDescriptor* DescriptorPool::FindFileContainingSymbol(
2027
0
    absl::string_view symbol_name) const {
2028
0
  absl::MutexLockMaybe lock(mutex_);
2029
0
  if (fallback_database_ != nullptr) {
2030
0
    tables_->known_bad_symbols_.clear();
2031
0
    tables_->known_bad_files_.clear();
2032
0
  }
2033
0
  Symbol result = tables_->FindSymbol(symbol_name);
2034
0
  if (!result.IsNull()) return result.GetFile();
2035
0
  if (underlay_ != nullptr) {
2036
0
    const FileDescriptor* file_result =
2037
0
        underlay_->FindFileContainingSymbol(symbol_name);
2038
0
    if (file_result != nullptr) return file_result;
2039
0
  }
2040
0
  if (TryFindSymbolInFallbackDatabase(symbol_name)) {
2041
0
    result = tables_->FindSymbol(symbol_name);
2042
0
    if (!result.IsNull()) return result.GetFile();
2043
0
  }
2044
0
  return nullptr;
2045
0
}
2046
2047
const Descriptor* DescriptorPool::FindMessageTypeByName(
2048
0
    absl::string_view name) const {
2049
0
  return tables_->FindByNameHelper(this, name).descriptor();
2050
0
}
2051
2052
const FieldDescriptor* DescriptorPool::FindFieldByName(
2053
0
    absl::string_view name) const {
2054
0
  if (const FieldDescriptor* field =
2055
0
          tables_->FindByNameHelper(this, name).field_descriptor()) {
2056
0
    if (!field->is_extension()) {
2057
0
      return field;
2058
0
    }
2059
0
  }
2060
0
  return nullptr;
2061
0
}
2062
2063
const FieldDescriptor* DescriptorPool::FindExtensionByName(
2064
0
    absl::string_view name) const {
2065
0
  if (const FieldDescriptor* field =
2066
0
          tables_->FindByNameHelper(this, name).field_descriptor()) {
2067
0
    if (field->is_extension()) {
2068
0
      return field;
2069
0
    }
2070
0
  }
2071
0
  return nullptr;
2072
0
}
2073
2074
const OneofDescriptor* DescriptorPool::FindOneofByName(
2075
0
    absl::string_view name) const {
2076
0
  return tables_->FindByNameHelper(this, name).oneof_descriptor();
2077
0
}
2078
2079
const EnumDescriptor* DescriptorPool::FindEnumTypeByName(
2080
0
    absl::string_view name) const {
2081
0
  return tables_->FindByNameHelper(this, name).enum_descriptor();
2082
0
}
2083
2084
const EnumValueDescriptor* DescriptorPool::FindEnumValueByName(
2085
0
    absl::string_view name) const {
2086
0
  return tables_->FindByNameHelper(this, name).enum_value_descriptor();
2087
0
}
2088
2089
const ServiceDescriptor* DescriptorPool::FindServiceByName(
2090
0
    absl::string_view name) const {
2091
0
  return tables_->FindByNameHelper(this, name).service_descriptor();
2092
0
}
2093
2094
const MethodDescriptor* DescriptorPool::FindMethodByName(
2095
0
    absl::string_view name) const {
2096
0
  return tables_->FindByNameHelper(this, name).method_descriptor();
2097
0
}
2098
2099
const FieldDescriptor* DescriptorPool::FindExtensionByNumber(
2100
0
    const Descriptor* extendee, int number) const {
2101
0
  if (extendee->extension_range_count() == 0) return nullptr;
2102
  // A faster path to reduce lock contention in finding extensions, assuming
2103
  // most extensions will be cache hit.
2104
0
  if (mutex_ != nullptr) {
2105
0
    absl::ReaderMutexLock lock(mutex_);
2106
0
    const FieldDescriptor* result = tables_->FindExtension(extendee, number);
2107
0
    if (result != nullptr) {
2108
0
      return result;
2109
0
    }
2110
0
  }
2111
0
  absl::MutexLockMaybe lock(mutex_);
2112
0
  if (fallback_database_ != nullptr) {
2113
0
    tables_->known_bad_symbols_.clear();
2114
0
    tables_->known_bad_files_.clear();
2115
0
  }
2116
0
  const FieldDescriptor* result = tables_->FindExtension(extendee, number);
2117
0
  if (result != nullptr) {
2118
0
    return result;
2119
0
  }
2120
0
  if (underlay_ != nullptr) {
2121
0
    result = underlay_->FindExtensionByNumber(extendee, number);
2122
0
    if (result != nullptr) return result;
2123
0
  }
2124
0
  if (TryFindExtensionInFallbackDatabase(extendee, number)) {
2125
0
    result = tables_->FindExtension(extendee, number);
2126
0
    if (result != nullptr) {
2127
0
      return result;
2128
0
    }
2129
0
  }
2130
0
  return nullptr;
2131
0
}
2132
2133
const FieldDescriptor* DescriptorPool::InternalFindExtensionByNumberNoLock(
2134
0
    const Descriptor* extendee, int number) const {
2135
0
  if (extendee->extension_range_count() == 0) return nullptr;
2136
2137
0
  const FieldDescriptor* result = tables_->FindExtension(extendee, number);
2138
0
  if (result != nullptr) {
2139
0
    return result;
2140
0
  }
2141
2142
0
  if (underlay_ != nullptr) {
2143
0
    result = underlay_->InternalFindExtensionByNumberNoLock(extendee, number);
2144
0
    if (result != nullptr) return result;
2145
0
  }
2146
2147
0
  return nullptr;
2148
0
}
2149
2150
const FieldDescriptor* DescriptorPool::FindExtensionByPrintableName(
2151
0
    const Descriptor* extendee, absl::string_view printable_name) const {
2152
0
  if (extendee->extension_range_count() == 0) return nullptr;
2153
0
  const FieldDescriptor* result = FindExtensionByName(printable_name);
2154
0
  if (result != nullptr && result->containing_type() == extendee) {
2155
0
    return result;
2156
0
  }
2157
0
  if (extendee->options().message_set_wire_format()) {
2158
    // MessageSet extensions may be identified by type name.
2159
0
    const Descriptor* type = FindMessageTypeByName(printable_name);
2160
0
    if (type != nullptr) {
2161
      // Look for a matching extension in the foreign type's scope.
2162
0
      const int type_extension_count = type->extension_count();
2163
0
      for (int i = 0; i < type_extension_count; i++) {
2164
0
        const FieldDescriptor* extension = type->extension(i);
2165
0
        if (extension->containing_type() == extendee &&
2166
0
            extension->type() == FieldDescriptor::TYPE_MESSAGE &&
2167
0
            extension->is_optional() && extension->message_type() == type) {
2168
          // Found it.
2169
0
          return extension;
2170
0
        }
2171
0
      }
2172
0
    }
2173
0
  }
2174
0
  return nullptr;
2175
0
}
2176
2177
void DescriptorPool::FindAllExtensions(
2178
    const Descriptor* extendee,
2179
0
    std::vector<const FieldDescriptor*>* out) const {
2180
0
  absl::MutexLockMaybe lock(mutex_);
2181
0
  if (fallback_database_ != nullptr) {
2182
0
    tables_->known_bad_symbols_.clear();
2183
0
    tables_->known_bad_files_.clear();
2184
0
  }
2185
2186
  // Initialize tables_->extensions_ from the fallback database first
2187
  // (but do this only once per descriptor).
2188
0
  if (fallback_database_ != nullptr &&
2189
0
      tables_->extensions_loaded_from_db_.count(extendee) == 0) {
2190
0
    std::vector<int> numbers;
2191
0
    if (fallback_database_->FindAllExtensionNumbers(extendee->full_name(),
2192
0
                                                    &numbers)) {
2193
0
      for (int number : numbers) {
2194
0
        if (tables_->FindExtension(extendee, number) == nullptr) {
2195
0
          TryFindExtensionInFallbackDatabase(extendee, number);
2196
0
        }
2197
0
      }
2198
0
      tables_->extensions_loaded_from_db_.insert(extendee);
2199
0
    }
2200
0
  }
2201
2202
0
  tables_->FindAllExtensions(extendee, out);
2203
0
  if (underlay_ != nullptr) {
2204
0
    underlay_->FindAllExtensions(extendee, out);
2205
0
  }
2206
0
}
2207
2208
2209
// -------------------------------------------------------------------
2210
2211
0
const FieldDescriptor* Descriptor::FindFieldByNumber(int key) const {
2212
0
  const FieldDescriptor* result = file()->tables_->FindFieldByNumber(this, key);
2213
0
  if (result == nullptr || result->is_extension()) {
2214
0
    return nullptr;
2215
0
  } else {
2216
0
    return result;
2217
0
  }
2218
0
}
2219
2220
const FieldDescriptor* Descriptor::FindFieldByLowercaseName(
2221
0
    absl::string_view key) const {
2222
0
  const FieldDescriptor* result =
2223
0
      file()->tables_->FindFieldByLowercaseName(this, key);
2224
0
  if (result == nullptr || result->is_extension()) {
2225
0
    return nullptr;
2226
0
  } else {
2227
0
    return result;
2228
0
  }
2229
0
}
2230
2231
const FieldDescriptor* Descriptor::FindFieldByCamelcaseName(
2232
0
    absl::string_view key) const {
2233
0
  const FieldDescriptor* result =
2234
0
      file()->tables_->FindFieldByCamelcaseName(this, key);
2235
0
  if (result == nullptr || result->is_extension()) {
2236
0
    return nullptr;
2237
0
  } else {
2238
0
    return result;
2239
0
  }
2240
0
}
2241
2242
const FieldDescriptor* Descriptor::FindFieldByName(
2243
0
    absl::string_view key) const {
2244
0
  const FieldDescriptor* field =
2245
0
      file()->tables_->FindNestedSymbol(this, key).field_descriptor();
2246
0
  return field != nullptr && !field->is_extension() ? field : nullptr;
2247
0
}
2248
2249
const OneofDescriptor* Descriptor::FindOneofByName(
2250
0
    absl::string_view key) const {
2251
0
  return file()->tables_->FindNestedSymbol(this, key).oneof_descriptor();
2252
0
}
2253
2254
const FieldDescriptor* Descriptor::FindExtensionByName(
2255
0
    absl::string_view key) const {
2256
0
  const FieldDescriptor* field =
2257
0
      file()->tables_->FindNestedSymbol(this, key).field_descriptor();
2258
0
  return field != nullptr && field->is_extension() ? field : nullptr;
2259
0
}
2260
2261
const FieldDescriptor* Descriptor::FindExtensionByLowercaseName(
2262
0
    absl::string_view key) const {
2263
0
  const FieldDescriptor* result =
2264
0
      file()->tables_->FindFieldByLowercaseName(this, key);
2265
0
  if (result == nullptr || !result->is_extension()) {
2266
0
    return nullptr;
2267
0
  } else {
2268
0
    return result;
2269
0
  }
2270
0
}
2271
2272
const FieldDescriptor* Descriptor::FindExtensionByCamelcaseName(
2273
0
    absl::string_view key) const {
2274
0
  const FieldDescriptor* result =
2275
0
      file()->tables_->FindFieldByCamelcaseName(this, key);
2276
0
  if (result == nullptr || !result->is_extension()) {
2277
0
    return nullptr;
2278
0
  } else {
2279
0
    return result;
2280
0
  }
2281
0
}
2282
2283
const Descriptor* Descriptor::FindNestedTypeByName(
2284
0
    absl::string_view key) const {
2285
0
  return file()->tables_->FindNestedSymbol(this, key).descriptor();
2286
0
}
2287
2288
const EnumDescriptor* Descriptor::FindEnumTypeByName(
2289
0
    absl::string_view key) const {
2290
0
  return file()->tables_->FindNestedSymbol(this, key).enum_descriptor();
2291
0
}
2292
2293
const EnumValueDescriptor* Descriptor::FindEnumValueByName(
2294
0
    absl::string_view key) const {
2295
0
  return file()->tables_->FindNestedSymbol(this, key).enum_value_descriptor();
2296
0
}
2297
2298
0
const FieldDescriptor* Descriptor::map_key() const {
2299
0
  if (!options().map_entry()) return nullptr;
2300
0
  ABSL_DCHECK_EQ(field_count(), 2);
2301
0
  return field(0);
2302
0
}
2303
2304
0
const FieldDescriptor* Descriptor::map_value() const {
2305
0
  if (!options().map_entry()) return nullptr;
2306
0
  ABSL_DCHECK_EQ(field_count(), 2);
2307
0
  return field(1);
2308
0
}
2309
2310
const EnumValueDescriptor* EnumDescriptor::FindValueByName(
2311
0
    absl::string_view key) const {
2312
0
  return file()->tables_->FindNestedSymbol(this, key).enum_value_descriptor();
2313
0
}
2314
2315
0
const EnumValueDescriptor* EnumDescriptor::FindValueByNumber(int key) const {
2316
0
  return file()->tables_->FindEnumValueByNumber(this, key);
2317
0
}
2318
2319
const EnumValueDescriptor* EnumDescriptor::FindValueByNumberCreatingIfUnknown(
2320
0
    int key) const {
2321
0
  return file()->tables_->FindEnumValueByNumberCreatingIfUnknown(this, key);
2322
0
}
2323
2324
const MethodDescriptor* ServiceDescriptor::FindMethodByName(
2325
0
    absl::string_view key) const {
2326
0
  return file()->tables_->FindNestedSymbol(this, key).method_descriptor();
2327
0
}
2328
2329
const Descriptor* FileDescriptor::FindMessageTypeByName(
2330
0
    absl::string_view key) const {
2331
0
  return tables_->FindNestedSymbol(this, key).descriptor();
2332
0
}
2333
2334
const EnumDescriptor* FileDescriptor::FindEnumTypeByName(
2335
0
    absl::string_view key) const {
2336
0
  return tables_->FindNestedSymbol(this, key).enum_descriptor();
2337
0
}
2338
2339
const EnumValueDescriptor* FileDescriptor::FindEnumValueByName(
2340
0
    absl::string_view key) const {
2341
0
  return tables_->FindNestedSymbol(this, key).enum_value_descriptor();
2342
0
}
2343
2344
const ServiceDescriptor* FileDescriptor::FindServiceByName(
2345
0
    absl::string_view key) const {
2346
0
  return tables_->FindNestedSymbol(this, key).service_descriptor();
2347
0
}
2348
2349
const FieldDescriptor* FileDescriptor::FindExtensionByName(
2350
0
    absl::string_view key) const {
2351
0
  const FieldDescriptor* field =
2352
0
      tables_->FindNestedSymbol(this, key).field_descriptor();
2353
0
  return field != nullptr && field->is_extension() ? field : nullptr;
2354
0
}
2355
2356
const FieldDescriptor* FileDescriptor::FindExtensionByLowercaseName(
2357
0
    absl::string_view key) const {
2358
0
  const FieldDescriptor* result = tables_->FindFieldByLowercaseName(this, key);
2359
0
  if (result == nullptr || !result->is_extension()) {
2360
0
    return nullptr;
2361
0
  } else {
2362
0
    return result;
2363
0
  }
2364
0
}
2365
2366
const FieldDescriptor* FileDescriptor::FindExtensionByCamelcaseName(
2367
0
    absl::string_view key) const {
2368
0
  const FieldDescriptor* result = tables_->FindFieldByCamelcaseName(this, key);
2369
0
  if (result == nullptr || !result->is_extension()) {
2370
0
    return nullptr;
2371
0
  } else {
2372
0
    return result;
2373
0
  }
2374
0
}
2375
2376
void Descriptor::ExtensionRange::CopyTo(
2377
0
    DescriptorProto_ExtensionRange* proto) const {
2378
0
  proto->set_start(this->start);
2379
0
  proto->set_end(this->end);
2380
0
  if (options_ != &ExtensionRangeOptions::default_instance()) {
2381
0
    *proto->mutable_options() = *options_;
2382
0
  }
2383
0
}
2384
2385
const Descriptor::ExtensionRange*
2386
0
Descriptor::FindExtensionRangeContainingNumber(int number) const {
2387
  // Linear search should be fine because we don't expect a message to have
2388
  // more than a couple extension ranges.
2389
0
  for (int i = 0; i < extension_range_count(); i++) {
2390
0
    if (number >= extension_range(i)->start &&
2391
0
        number < extension_range(i)->end) {
2392
0
      return extension_range(i);
2393
0
    }
2394
0
  }
2395
0
  return nullptr;
2396
0
}
2397
2398
const Descriptor::ReservedRange* Descriptor::FindReservedRangeContainingNumber(
2399
0
    int number) const {
2400
  // TODO(chrisn): Consider a non-linear search.
2401
0
  for (int i = 0; i < reserved_range_count(); i++) {
2402
0
    if (number >= reserved_range(i)->start && number < reserved_range(i)->end) {
2403
0
      return reserved_range(i);
2404
0
    }
2405
0
  }
2406
0
  return nullptr;
2407
0
}
2408
2409
const EnumDescriptor::ReservedRange*
2410
0
EnumDescriptor::FindReservedRangeContainingNumber(int number) const {
2411
  // TODO(chrisn): Consider a non-linear search.
2412
0
  for (int i = 0; i < reserved_range_count(); i++) {
2413
0
    if (number >= reserved_range(i)->start &&
2414
0
        number <= reserved_range(i)->end) {
2415
0
      return reserved_range(i);
2416
0
    }
2417
0
  }
2418
0
  return nullptr;
2419
0
}
2420
2421
// -------------------------------------------------------------------
2422
2423
bool DescriptorPool::TryFindFileInFallbackDatabase(
2424
0
    absl::string_view name) const {
2425
0
  if (fallback_database_ == nullptr) return false;
2426
2427
0
  if (tables_->known_bad_files_.contains(name)) return false;
2428
2429
  // NOINLINE to reduce the stack cost of the operation in the caller.
2430
0
  const auto find_file = [](DescriptorDatabase& database,
2431
0
                            absl::string_view filename,
2432
0
                            FileDescriptorProto& output) PROTOBUF_NOINLINE {
2433
0
    return database.FindFileByName(std::string(filename), &output);
2434
0
  };
2435
2436
0
  auto file_proto = absl::make_unique<FileDescriptorProto>();
2437
0
  if (!find_file(*fallback_database_, name, *file_proto) ||
2438
0
      BuildFileFromDatabase(*file_proto) == nullptr) {
2439
0
    tables_->known_bad_files_.emplace(name);
2440
0
    return false;
2441
0
  }
2442
0
  return true;
2443
0
}
2444
2445
0
bool DescriptorPool::IsSubSymbolOfBuiltType(absl::string_view name) const {
2446
0
  auto prefix = std::string(name);
2447
0
  for (;;) {
2448
0
    std::string::size_type dot_pos = prefix.find_last_of('.');
2449
0
    if (dot_pos == std::string::npos) {
2450
0
      break;
2451
0
    }
2452
0
    prefix = prefix.substr(0, dot_pos);
2453
0
    Symbol symbol = tables_->FindSymbol(prefix);
2454
    // If the symbol type is anything other than PACKAGE, then its complete
2455
    // definition is already known.
2456
0
    if (!symbol.IsNull() && !symbol.IsPackage()) {
2457
0
      return true;
2458
0
    }
2459
0
  }
2460
0
  if (underlay_ != nullptr) {
2461
    // Check to see if any prefix of this symbol exists in the underlay.
2462
0
    return underlay_->IsSubSymbolOfBuiltType(name);
2463
0
  }
2464
0
  return false;
2465
0
}
2466
2467
bool DescriptorPool::TryFindSymbolInFallbackDatabase(
2468
0
    absl::string_view name) const {
2469
0
  if (fallback_database_ == nullptr) return false;
2470
2471
0
  if (tables_->known_bad_symbols_.contains(name)) return false;
2472
2473
0
  std::string name_string(name);
2474
0
  auto file_proto = absl::make_unique<FileDescriptorProto>();
2475
0
  if (  // We skip looking in the fallback database if the name is a sub-symbol
2476
        // of any descriptor that already exists in the descriptor pool (except
2477
        // for package descriptors).  This is valid because all symbols except
2478
        // for packages are defined in a single file, so if the symbol exists
2479
        // then we should already have its definition.
2480
        //
2481
        // The other reason to do this is to support "overriding" type
2482
        // definitions by merging two databases that define the same type. (Yes,
2483
        // people do this.)  The main difficulty with making this work is that
2484
        // FindFileContainingSymbol() is allowed to return both false positives
2485
        // (e.g., SimpleDescriptorDatabase, UpgradedDescriptorDatabase) and
2486
        // false negatives (e.g. ProtoFileParser, SourceTreeDescriptorDatabase).
2487
        // When two such databases are merged, looking up a non-existent
2488
        // sub-symbol of a type that already exists in the descriptor pool can
2489
        // result in an attempt to load multiple definitions of the same type.
2490
        // The check below avoids this.
2491
0
      IsSubSymbolOfBuiltType(name)
2492
2493
      // Look up file containing this symbol in fallback database.
2494
0
      || !fallback_database_->FindFileContainingSymbol(name_string,
2495
0
                                                       file_proto.get())
2496
2497
      // Check if we've already built this file. If so, it apparently doesn't
2498
      // contain the symbol we're looking for.  Some DescriptorDatabases
2499
      // return false positives.
2500
0
      || tables_->FindFile(file_proto->name()) != nullptr
2501
2502
      // Build the file.
2503
0
      || BuildFileFromDatabase(*file_proto) == nullptr) {
2504
0
    tables_->known_bad_symbols_.insert(std::move(name_string));
2505
0
    return false;
2506
0
  }
2507
2508
0
  return true;
2509
0
}
2510
2511
bool DescriptorPool::TryFindExtensionInFallbackDatabase(
2512
0
    const Descriptor* containing_type, int field_number) const {
2513
0
  if (fallback_database_ == nullptr) return false;
2514
2515
0
  auto file_proto = absl::make_unique<FileDescriptorProto>();
2516
0
  if (!fallback_database_->FindFileContainingExtension(
2517
0
          containing_type->full_name(), field_number, file_proto.get())) {
2518
0
    return false;
2519
0
  }
2520
2521
0
  if (tables_->FindFile(file_proto->name()) != nullptr) {
2522
    // We've already loaded this file, and it apparently doesn't contain the
2523
    // extension we're looking for.  Some DescriptorDatabases return false
2524
    // positives.
2525
0
    return false;
2526
0
  }
2527
2528
0
  if (BuildFileFromDatabase(*file_proto) == nullptr) {
2529
0
    return false;
2530
0
  }
2531
2532
0
  return true;
2533
0
}
2534
2535
// ===================================================================
2536
2537
0
bool FieldDescriptor::is_map_message_type() const {
2538
0
  return type_descriptor_.message_type->options().map_entry();
2539
0
}
2540
2541
std::string FieldDescriptor::DefaultValueAsString(
2542
0
    bool quote_string_type) const {
2543
0
  ABSL_CHECK(has_default_value()) << "No default value";
2544
0
  switch (cpp_type()) {
2545
0
    case CPPTYPE_INT32:
2546
0
      return absl::StrCat(default_value_int32_t());
2547
0
    case CPPTYPE_INT64:
2548
0
      return absl::StrCat(default_value_int64_t());
2549
0
    case CPPTYPE_UINT32:
2550
0
      return absl::StrCat(default_value_uint32_t());
2551
0
    case CPPTYPE_UINT64:
2552
0
      return absl::StrCat(default_value_uint64_t());
2553
0
    case CPPTYPE_FLOAT:
2554
0
      return io::SimpleFtoa(default_value_float());
2555
0
    case CPPTYPE_DOUBLE:
2556
0
      return io::SimpleDtoa(default_value_double());
2557
0
    case CPPTYPE_BOOL:
2558
0
      return default_value_bool() ? "true" : "false";
2559
0
    case CPPTYPE_STRING:
2560
0
      if (quote_string_type) {
2561
0
        return absl::StrCat("\"", absl::CEscape(default_value_string()), "\"");
2562
0
      } else {
2563
0
        if (type() == TYPE_BYTES) {
2564
0
          return absl::CEscape(default_value_string());
2565
0
        } else {
2566
0
          return default_value_string();
2567
0
        }
2568
0
      }
2569
0
    case CPPTYPE_ENUM:
2570
0
      return default_value_enum()->name();
2571
0
    case CPPTYPE_MESSAGE:
2572
0
      ABSL_DLOG(FATAL) << "Messages can't have default values!";
2573
0
      break;
2574
0
  }
2575
0
  ABSL_LOG(FATAL) << "Can't get here: failed to get default value as string";
2576
0
  return "";
2577
0
}
2578
2579
// CopyTo methods ====================================================
2580
2581
0
void FileDescriptor::CopyTo(FileDescriptorProto* proto) const {
2582
0
  CopyHeadingTo(proto);
2583
2584
0
  for (int i = 0; i < dependency_count(); i++) {
2585
0
    proto->add_dependency(dependency(i)->name());
2586
0
  }
2587
2588
0
  for (int i = 0; i < public_dependency_count(); i++) {
2589
0
    proto->add_public_dependency(public_dependencies_[i]);
2590
0
  }
2591
2592
0
  for (int i = 0; i < weak_dependency_count(); i++) {
2593
0
    proto->add_weak_dependency(weak_dependencies_[i]);
2594
0
  }
2595
2596
0
  for (int i = 0; i < message_type_count(); i++) {
2597
0
    message_type(i)->CopyTo(proto->add_message_type());
2598
0
  }
2599
0
  for (int i = 0; i < enum_type_count(); i++) {
2600
0
    enum_type(i)->CopyTo(proto->add_enum_type());
2601
0
  }
2602
0
  for (int i = 0; i < service_count(); i++) {
2603
0
    service(i)->CopyTo(proto->add_service());
2604
0
  }
2605
0
  for (int i = 0; i < extension_count(); i++) {
2606
0
    extension(i)->CopyTo(proto->add_extension());
2607
0
  }
2608
0
}
2609
2610
0
void FileDescriptor::CopyHeadingTo(FileDescriptorProto* proto) const {
2611
0
  proto->set_name(name());
2612
0
  if (!package().empty()) {
2613
0
    proto->set_package(package());
2614
0
  }
2615
2616
  // TODO(liujisi): Also populate when syntax="proto2".
2617
0
  FileDescriptorLegacy::Syntax syntax = FileDescriptorLegacy(this).syntax();
2618
0
  if (syntax == FileDescriptorLegacy::Syntax::SYNTAX_PROTO3
2619
0
  ) {
2620
0
    proto->set_syntax(FileDescriptorLegacy::SyntaxName(syntax));
2621
0
  }
2622
2623
0
  if (&options() != &FileOptions::default_instance()) {
2624
0
    *proto->mutable_options() = options();
2625
0
  }
2626
0
}
2627
2628
0
void FileDescriptor::CopyJsonNameTo(FileDescriptorProto* proto) const {
2629
0
  if (message_type_count() != proto->message_type_size() ||
2630
0
      extension_count() != proto->extension_size()) {
2631
0
    ABSL_LOG(ERROR) << "Cannot copy json_name to a proto of a different size.";
2632
0
    return;
2633
0
  }
2634
0
  for (int i = 0; i < message_type_count(); i++) {
2635
0
    message_type(i)->CopyJsonNameTo(proto->mutable_message_type(i));
2636
0
  }
2637
0
  for (int i = 0; i < extension_count(); i++) {
2638
0
    extension(i)->CopyJsonNameTo(proto->mutable_extension(i));
2639
0
  }
2640
0
}
2641
2642
0
void FileDescriptor::CopySourceCodeInfoTo(FileDescriptorProto* proto) const {
2643
0
  if (source_code_info_ &&
2644
0
      source_code_info_ != &SourceCodeInfo::default_instance()) {
2645
0
    proto->mutable_source_code_info()->CopyFrom(*source_code_info_);
2646
0
  }
2647
0
}
2648
2649
0
void Descriptor::CopyTo(DescriptorProto* proto) const {
2650
0
  proto->set_name(name());
2651
2652
0
  for (int i = 0; i < field_count(); i++) {
2653
0
    field(i)->CopyTo(proto->add_field());
2654
0
  }
2655
0
  for (int i = 0; i < oneof_decl_count(); i++) {
2656
0
    oneof_decl(i)->CopyTo(proto->add_oneof_decl());
2657
0
  }
2658
0
  for (int i = 0; i < nested_type_count(); i++) {
2659
0
    nested_type(i)->CopyTo(proto->add_nested_type());
2660
0
  }
2661
0
  for (int i = 0; i < enum_type_count(); i++) {
2662
0
    enum_type(i)->CopyTo(proto->add_enum_type());
2663
0
  }
2664
0
  for (int i = 0; i < extension_range_count(); i++) {
2665
0
    extension_range(i)->CopyTo(proto->add_extension_range());
2666
0
  }
2667
0
  for (int i = 0; i < extension_count(); i++) {
2668
0
    extension(i)->CopyTo(proto->add_extension());
2669
0
  }
2670
0
  for (int i = 0; i < reserved_range_count(); i++) {
2671
0
    DescriptorProto::ReservedRange* range = proto->add_reserved_range();
2672
0
    range->set_start(reserved_range(i)->start);
2673
0
    range->set_end(reserved_range(i)->end);
2674
0
  }
2675
0
  for (int i = 0; i < reserved_name_count(); i++) {
2676
0
    proto->add_reserved_name(reserved_name(i));
2677
0
  }
2678
2679
0
  if (&options() != &MessageOptions::default_instance()) {
2680
0
    proto->mutable_options()->CopyFrom(options());
2681
0
  }
2682
0
}
2683
2684
0
void Descriptor::CopyJsonNameTo(DescriptorProto* proto) const {
2685
0
  if (field_count() != proto->field_size() ||
2686
0
      nested_type_count() != proto->nested_type_size() ||
2687
0
      extension_count() != proto->extension_size()) {
2688
0
    ABSL_LOG(ERROR) << "Cannot copy json_name to a proto of a different size.";
2689
0
    return;
2690
0
  }
2691
0
  for (int i = 0; i < field_count(); i++) {
2692
0
    field(i)->CopyJsonNameTo(proto->mutable_field(i));
2693
0
  }
2694
0
  for (int i = 0; i < nested_type_count(); i++) {
2695
0
    nested_type(i)->CopyJsonNameTo(proto->mutable_nested_type(i));
2696
0
  }
2697
0
  for (int i = 0; i < extension_count(); i++) {
2698
0
    extension(i)->CopyJsonNameTo(proto->mutable_extension(i));
2699
0
  }
2700
0
}
2701
2702
0
void FieldDescriptor::CopyTo(FieldDescriptorProto* proto) const {
2703
0
  proto->set_name(name());
2704
0
  proto->set_number(number());
2705
0
  if (has_json_name_) {
2706
0
    proto->set_json_name(json_name());
2707
0
  }
2708
0
  if (proto3_optional_) {
2709
0
    proto->set_proto3_optional(true);
2710
0
  }
2711
  // Some compilers do not allow static_cast directly between two enum types,
2712
  // so we must cast to int first.
2713
0
  proto->set_label(static_cast<FieldDescriptorProto::Label>(
2714
0
      absl::implicit_cast<int>(label())));
2715
0
  proto->set_type(static_cast<FieldDescriptorProto::Type>(
2716
0
      absl::implicit_cast<int>(type())));
2717
2718
0
  if (is_extension()) {
2719
0
    if (!containing_type()->is_unqualified_placeholder_) {
2720
0
      proto->set_extendee(".");
2721
0
    }
2722
0
    proto->mutable_extendee()->append(containing_type()->full_name());
2723
0
  }
2724
2725
0
  if (cpp_type() == CPPTYPE_MESSAGE) {
2726
0
    if (message_type()->is_placeholder_) {
2727
      // We don't actually know if the type is a message type.  It could be
2728
      // an enum.
2729
0
      proto->clear_type();
2730
0
    }
2731
2732
0
    if (!message_type()->is_unqualified_placeholder_) {
2733
0
      proto->set_type_name(".");
2734
0
    }
2735
0
    proto->mutable_type_name()->append(message_type()->full_name());
2736
0
  } else if (cpp_type() == CPPTYPE_ENUM) {
2737
0
    if (!enum_type()->is_unqualified_placeholder_) {
2738
0
      proto->set_type_name(".");
2739
0
    }
2740
0
    proto->mutable_type_name()->append(enum_type()->full_name());
2741
0
  }
2742
2743
0
  if (has_default_value()) {
2744
0
    proto->set_default_value(DefaultValueAsString(false));
2745
0
  }
2746
2747
0
  if (containing_oneof() != nullptr && !is_extension()) {
2748
0
    proto->set_oneof_index(containing_oneof()->index());
2749
0
  }
2750
2751
0
  if (&options() != &FieldOptions::default_instance()) {
2752
0
    proto->mutable_options()->CopyFrom(options());
2753
0
  }
2754
0
}
2755
2756
0
void FieldDescriptor::CopyJsonNameTo(FieldDescriptorProto* proto) const {
2757
0
  proto->set_json_name(json_name());
2758
0
}
2759
2760
0
void OneofDescriptor::CopyTo(OneofDescriptorProto* proto) const {
2761
0
  proto->set_name(name());
2762
0
  if (&options() != &OneofOptions::default_instance()) {
2763
0
    proto->mutable_options()->CopyFrom(options());
2764
0
  }
2765
0
}
2766
2767
0
void EnumDescriptor::CopyTo(EnumDescriptorProto* proto) const {
2768
0
  proto->set_name(name());
2769
2770
0
  for (int i = 0; i < value_count(); i++) {
2771
0
    value(i)->CopyTo(proto->add_value());
2772
0
  }
2773
0
  for (int i = 0; i < reserved_range_count(); i++) {
2774
0
    EnumDescriptorProto::EnumReservedRange* range = proto->add_reserved_range();
2775
0
    range->set_start(reserved_range(i)->start);
2776
0
    range->set_end(reserved_range(i)->end);
2777
0
  }
2778
0
  for (int i = 0; i < reserved_name_count(); i++) {
2779
0
    proto->add_reserved_name(reserved_name(i));
2780
0
  }
2781
2782
0
  if (&options() != &EnumOptions::default_instance()) {
2783
0
    proto->mutable_options()->CopyFrom(options());
2784
0
  }
2785
0
}
2786
2787
0
void EnumValueDescriptor::CopyTo(EnumValueDescriptorProto* proto) const {
2788
0
  proto->set_name(name());
2789
0
  proto->set_number(number());
2790
2791
0
  if (&options() != &EnumValueOptions::default_instance()) {
2792
0
    proto->mutable_options()->CopyFrom(options());
2793
0
  }
2794
0
}
2795
2796
0
void ServiceDescriptor::CopyTo(ServiceDescriptorProto* proto) const {
2797
0
  proto->set_name(name());
2798
2799
0
  for (int i = 0; i < method_count(); i++) {
2800
0
    method(i)->CopyTo(proto->add_method());
2801
0
  }
2802
2803
0
  if (&options() != &ServiceOptions::default_instance()) {
2804
0
    proto->mutable_options()->CopyFrom(options());
2805
0
  }
2806
0
}
2807
2808
0
void MethodDescriptor::CopyTo(MethodDescriptorProto* proto) const {
2809
0
  proto->set_name(name());
2810
2811
0
  if (!input_type()->is_unqualified_placeholder_) {
2812
0
    proto->set_input_type(".");
2813
0
  }
2814
0
  proto->mutable_input_type()->append(input_type()->full_name());
2815
2816
0
  if (!output_type()->is_unqualified_placeholder_) {
2817
0
    proto->set_output_type(".");
2818
0
  }
2819
0
  proto->mutable_output_type()->append(output_type()->full_name());
2820
2821
0
  if (&options() != &MethodOptions::default_instance()) {
2822
0
    proto->mutable_options()->CopyFrom(options());
2823
0
  }
2824
2825
0
  if (client_streaming_) {
2826
0
    proto->set_client_streaming(true);
2827
0
  }
2828
0
  if (server_streaming_) {
2829
0
    proto->set_server_streaming(true);
2830
0
  }
2831
0
}
2832
2833
// DebugString methods ===============================================
2834
2835
namespace {
2836
2837
bool RetrieveOptionsAssumingRightPool(
2838
    int depth, const Message& options,
2839
0
    std::vector<std::string>* option_entries) {
2840
0
  option_entries->clear();
2841
0
  const Reflection* reflection = options.GetReflection();
2842
0
  std::vector<const FieldDescriptor*> fields;
2843
0
  reflection->ListFields(options, &fields);
2844
0
  for (const FieldDescriptor* field : fields) {
2845
0
    int count = 1;
2846
0
    bool repeated = false;
2847
0
    if (field->is_repeated()) {
2848
0
      count = reflection->FieldSize(options, field);
2849
0
      repeated = true;
2850
0
    }
2851
0
    for (int j = 0; j < count; j++) {
2852
0
      std::string fieldval;
2853
0
      if (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) {
2854
0
        std::string tmp;
2855
0
        TextFormat::Printer printer;
2856
0
        printer.SetExpandAny(true);
2857
0
        printer.SetInitialIndentLevel(depth + 1);
2858
0
        printer.PrintFieldValueToString(options, field, repeated ? j : -1,
2859
0
                                        &tmp);
2860
0
        fieldval.append("{\n");
2861
0
        fieldval.append(tmp);
2862
0
        fieldval.append(depth * 2, ' ');
2863
0
        fieldval.append("}");
2864
0
      } else {
2865
0
        TextFormat::PrintFieldValueToString(options, field, repeated ? j : -1,
2866
0
                                            &fieldval);
2867
0
      }
2868
0
      std::string name;
2869
0
      if (field->is_extension()) {
2870
0
        name = absl::StrCat("(.", field->full_name(), ")");
2871
0
      } else {
2872
0
        name = field->name();
2873
0
      }
2874
0
      option_entries->push_back(absl::StrCat(name, " = ", fieldval));
2875
0
    }
2876
0
  }
2877
0
  return !option_entries->empty();
2878
0
}
2879
2880
// Used by each of the option formatters.
2881
bool RetrieveOptions(int depth, const Message& options,
2882
                     const DescriptorPool* pool,
2883
0
                     std::vector<std::string>* option_entries) {
2884
  // When printing custom options for a descriptor, we must use an options
2885
  // message built on top of the same DescriptorPool where the descriptor
2886
  // is coming from. This is to ensure we are interpreting custom options
2887
  // against the right pool.
2888
0
  if (options.GetDescriptor()->file()->pool() == pool) {
2889
0
    return RetrieveOptionsAssumingRightPool(depth, options, option_entries);
2890
0
  } else {
2891
0
    const Descriptor* option_descriptor =
2892
0
        pool->FindMessageTypeByName(options.GetDescriptor()->full_name());
2893
0
    if (option_descriptor == nullptr) {
2894
      // descriptor.proto is not in the pool. This means no custom options are
2895
      // used so we are safe to proceed with the compiled options message type.
2896
0
      return RetrieveOptionsAssumingRightPool(depth, options, option_entries);
2897
0
    }
2898
0
    DynamicMessageFactory factory;
2899
0
    std::unique_ptr<Message> dynamic_options(
2900
0
        factory.GetPrototype(option_descriptor)->New());
2901
0
    std::string serialized = options.SerializeAsString();
2902
0
    io::CodedInputStream input(
2903
0
        reinterpret_cast<const uint8_t*>(serialized.c_str()),
2904
0
        serialized.size());
2905
0
    input.SetExtensionRegistry(pool, &factory);
2906
0
    if (dynamic_options->ParseFromCodedStream(&input)) {
2907
0
      return RetrieveOptionsAssumingRightPool(depth, *dynamic_options,
2908
0
                                              option_entries);
2909
0
    } else {
2910
0
      ABSL_LOG(ERROR) << "Found invalid proto option data for: "
2911
0
                      << options.GetDescriptor()->full_name();
2912
0
      return RetrieveOptionsAssumingRightPool(depth, options, option_entries);
2913
0
    }
2914
0
  }
2915
0
}
2916
2917
// Formats options that all appear together in brackets. Does not include
2918
// brackets.
2919
bool FormatBracketedOptions(int depth, const Message& options,
2920
0
                            const DescriptorPool* pool, std::string* output) {
2921
0
  std::vector<std::string> all_options;
2922
0
  if (RetrieveOptions(depth, options, pool, &all_options)) {
2923
0
    output->append(absl::StrJoin(all_options, ", "));
2924
0
  }
2925
0
  return !all_options.empty();
2926
0
}
2927
2928
// Formats options one per line
2929
bool FormatLineOptions(int depth, const Message& options,
2930
0
                       const DescriptorPool* pool, std::string* output) {
2931
0
  std::string prefix(depth * 2, ' ');
2932
0
  std::vector<std::string> all_options;
2933
0
  if (RetrieveOptions(depth, options, pool, &all_options)) {
2934
0
    for (const std::string& option : all_options) {
2935
0
      absl::SubstituteAndAppend(output, "$0option $1;\n", prefix, option);
2936
0
    }
2937
0
  }
2938
0
  return !all_options.empty();
2939
0
}
2940
2941
class SourceLocationCommentPrinter {
2942
 public:
2943
  template <typename DescType>
2944
  SourceLocationCommentPrinter(const DescType* desc, const std::string& prefix,
2945
                               const DebugStringOptions& options)
2946
0
      : options_(options), prefix_(prefix) {
2947
    // Perform the SourceLocation lookup only if we're including user comments,
2948
    // because the lookup is fairly expensive.
2949
0
    have_source_loc_ =
2950
0
        options.include_comments && desc->GetSourceLocation(&source_loc_);
2951
0
  }
Unexecuted instantiation: descriptor.cc:google::protobuf::(anonymous namespace)::SourceLocationCommentPrinter::SourceLocationCommentPrinter<google::protobuf::FileDescriptor>(google::protobuf::FileDescriptor const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, google::protobuf::DebugStringOptions const&)
Unexecuted instantiation: descriptor.cc:google::protobuf::(anonymous namespace)::SourceLocationCommentPrinter::SourceLocationCommentPrinter<google::protobuf::Descriptor>(google::protobuf::Descriptor const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, google::protobuf::DebugStringOptions const&)
Unexecuted instantiation: descriptor.cc:google::protobuf::(anonymous namespace)::SourceLocationCommentPrinter::SourceLocationCommentPrinter<google::protobuf::FieldDescriptor>(google::protobuf::FieldDescriptor const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, google::protobuf::DebugStringOptions const&)
Unexecuted instantiation: descriptor.cc:google::protobuf::(anonymous namespace)::SourceLocationCommentPrinter::SourceLocationCommentPrinter<google::protobuf::OneofDescriptor>(google::protobuf::OneofDescriptor const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, google::protobuf::DebugStringOptions const&)
Unexecuted instantiation: descriptor.cc:google::protobuf::(anonymous namespace)::SourceLocationCommentPrinter::SourceLocationCommentPrinter<google::protobuf::EnumDescriptor>(google::protobuf::EnumDescriptor const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, google::protobuf::DebugStringOptions const&)
Unexecuted instantiation: descriptor.cc:google::protobuf::(anonymous namespace)::SourceLocationCommentPrinter::SourceLocationCommentPrinter<google::protobuf::EnumValueDescriptor>(google::protobuf::EnumValueDescriptor const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, google::protobuf::DebugStringOptions const&)
Unexecuted instantiation: descriptor.cc:google::protobuf::(anonymous namespace)::SourceLocationCommentPrinter::SourceLocationCommentPrinter<google::protobuf::ServiceDescriptor>(google::protobuf::ServiceDescriptor const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, google::protobuf::DebugStringOptions const&)
Unexecuted instantiation: descriptor.cc:google::protobuf::(anonymous namespace)::SourceLocationCommentPrinter::SourceLocationCommentPrinter<google::protobuf::MethodDescriptor>(google::protobuf::MethodDescriptor const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, google::protobuf::DebugStringOptions const&)
2952
  SourceLocationCommentPrinter(const FileDescriptor* file,
2953
                               const std::vector<int>& path,
2954
                               const std::string& prefix,
2955
                               const DebugStringOptions& options)
2956
0
      : options_(options), prefix_(prefix) {
2957
    // Perform the SourceLocation lookup only if we're including user comments,
2958
    // because the lookup is fairly expensive.
2959
0
    have_source_loc_ =
2960
0
        options.include_comments && file->GetSourceLocation(path, &source_loc_);
2961
0
  }
2962
0
  void AddPreComment(std::string* output) {
2963
0
    if (have_source_loc_) {
2964
      // Detached leading comments.
2965
0
      for (const std::string& leading_detached_comment :
2966
0
           source_loc_.leading_detached_comments) {
2967
0
        absl::StrAppend(output, FormatComment(leading_detached_comment), "\n");
2968
0
      }
2969
      // Attached leading comments.
2970
0
      if (!source_loc_.leading_comments.empty()) {
2971
0
        absl::StrAppend(output, FormatComment(source_loc_.leading_comments));
2972
0
      }
2973
0
    }
2974
0
  }
2975
0
  void AddPostComment(std::string* output) {
2976
0
    if (have_source_loc_ && source_loc_.trailing_comments.size() > 0) {
2977
0
      absl::StrAppend(output, FormatComment(source_loc_.trailing_comments));
2978
0
    }
2979
0
  }
2980
2981
  // Format comment such that each line becomes a full-line C++-style comment in
2982
  // the DebugString() output.
2983
0
  std::string FormatComment(const std::string& comment_text) {
2984
0
    std::string stripped_comment = comment_text;
2985
0
    absl::StripAsciiWhitespace(&stripped_comment);
2986
0
    std::string output;
2987
0
    for (absl::string_view line : absl::StrSplit(stripped_comment, '\n')) {
2988
0
      absl::SubstituteAndAppend(&output, "$0// $1\n", prefix_, line);
2989
0
    }
2990
0
    return output;
2991
0
  }
2992
2993
 private:
2994
2995
  bool have_source_loc_;
2996
  SourceLocation source_loc_;
2997
  DebugStringOptions options_;
2998
  std::string prefix_;
2999
};
3000
3001
}  // anonymous namespace
3002
3003
0
std::string FileDescriptor::DebugString() const {
3004
0
  DebugStringOptions options;  // default options
3005
0
  return DebugStringWithOptions(options);
3006
0
}
3007
3008
std::string FileDescriptor::DebugStringWithOptions(
3009
0
    const DebugStringOptions& debug_string_options) const {
3010
0
  std::string contents;
3011
0
  {
3012
0
    std::vector<int> path;
3013
0
    path.push_back(FileDescriptorProto::kSyntaxFieldNumber);
3014
0
    SourceLocationCommentPrinter syntax_comment(this, path, "",
3015
0
                                                debug_string_options);
3016
0
    syntax_comment.AddPreComment(&contents);
3017
0
    absl::SubstituteAndAppend(
3018
0
        &contents, "syntax = \"$0\";\n\n",
3019
0
        FileDescriptorLegacy::SyntaxName(FileDescriptorLegacy(this).syntax()));
3020
0
    syntax_comment.AddPostComment(&contents);
3021
0
  }
3022
3023
0
  SourceLocationCommentPrinter comment_printer(this, "", debug_string_options);
3024
0
  comment_printer.AddPreComment(&contents);
3025
3026
0
  absl::flat_hash_set<int> public_dependencies(
3027
0
      public_dependencies_, public_dependencies_ + public_dependency_count_);
3028
0
  absl::flat_hash_set<int> weak_dependencies(
3029
0
      weak_dependencies_, weak_dependencies_ + weak_dependency_count_);
3030
3031
0
  for (int i = 0; i < dependency_count(); i++) {
3032
0
    if (public_dependencies.contains(i)) {
3033
0
      absl::SubstituteAndAppend(&contents, "import public \"$0\";\n",
3034
0
                                dependency(i)->name());
3035
0
    } else if (weak_dependencies.contains(i)) {
3036
0
      absl::SubstituteAndAppend(&contents, "import weak \"$0\";\n",
3037
0
                                dependency(i)->name());
3038
0
    } else {
3039
0
      absl::SubstituteAndAppend(&contents, "import \"$0\";\n",
3040
0
                                dependency(i)->name());
3041
0
    }
3042
0
  }
3043
3044
0
  if (!package().empty()) {
3045
0
    std::vector<int> path;
3046
0
    path.push_back(FileDescriptorProto::kPackageFieldNumber);
3047
0
    SourceLocationCommentPrinter package_comment(this, path, "",
3048
0
                                                 debug_string_options);
3049
0
    package_comment.AddPreComment(&contents);
3050
0
    absl::SubstituteAndAppend(&contents, "package $0;\n\n", package());
3051
0
    package_comment.AddPostComment(&contents);
3052
0
  }
3053
3054
0
  if (FormatLineOptions(0, options(), pool(), &contents)) {
3055
0
    contents.append("\n");  // add some space if we had options
3056
0
  }
3057
3058
0
  for (int i = 0; i < enum_type_count(); i++) {
3059
0
    enum_type(i)->DebugString(0, &contents, debug_string_options);
3060
0
    contents.append("\n");
3061
0
  }
3062
3063
  // Find all the 'group' type extensions; we will not output their nested
3064
  // definitions (those will be done with their group field descriptor).
3065
0
  absl::flat_hash_set<const Descriptor*> groups;
3066
0
  for (int i = 0; i < extension_count(); i++) {
3067
0
    if (extension(i)->type() == FieldDescriptor::TYPE_GROUP) {
3068
0
      groups.insert(extension(i)->message_type());
3069
0
    }
3070
0
  }
3071
3072
0
  for (int i = 0; i < message_type_count(); i++) {
3073
0
    if (!groups.contains(message_type(i))) {
3074
0
      message_type(i)->DebugString(0, &contents, debug_string_options,
3075
0
                                   /* include_opening_clause */ true);
3076
0
      contents.append("\n");
3077
0
    }
3078
0
  }
3079
3080
0
  for (int i = 0; i < service_count(); i++) {
3081
0
    service(i)->DebugString(&contents, debug_string_options);
3082
0
    contents.append("\n");
3083
0
  }
3084
3085
0
  const Descriptor* containing_type = nullptr;
3086
0
  for (int i = 0; i < extension_count(); i++) {
3087
0
    if (extension(i)->containing_type() != containing_type) {
3088
0
      if (i > 0) contents.append("}\n\n");
3089
0
      containing_type = extension(i)->containing_type();
3090
0
      absl::SubstituteAndAppend(&contents, "extend .$0 {\n",
3091
0
                                containing_type->full_name());
3092
0
    }
3093
0
    extension(i)->DebugString(1, &contents, debug_string_options);
3094
0
  }
3095
0
  if (extension_count() > 0) contents.append("}\n\n");
3096
3097
0
  comment_printer.AddPostComment(&contents);
3098
3099
0
  return contents;
3100
0
}
3101
3102
0
std::string Descriptor::DebugString() const {
3103
0
  DebugStringOptions options;  // default options
3104
0
  return DebugStringWithOptions(options);
3105
0
}
3106
3107
std::string Descriptor::DebugStringWithOptions(
3108
0
    const DebugStringOptions& options) const {
3109
0
  std::string contents;
3110
0
  DebugString(0, &contents, options, /* include_opening_clause */ true);
3111
0
  return contents;
3112
0
}
3113
3114
void Descriptor::DebugString(int depth, std::string* contents,
3115
                             const DebugStringOptions& debug_string_options,
3116
0
                             bool include_opening_clause) const {
3117
0
  if (options().map_entry()) {
3118
    // Do not generate debug string for auto-generated map-entry type.
3119
0
    return;
3120
0
  }
3121
0
  std::string prefix(depth * 2, ' ');
3122
0
  ++depth;
3123
3124
0
  SourceLocationCommentPrinter comment_printer(this, prefix,
3125
0
                                               debug_string_options);
3126
0
  comment_printer.AddPreComment(contents);
3127
3128
0
  if (include_opening_clause) {
3129
0
    absl::SubstituteAndAppend(contents, "$0message $1", prefix, name());
3130
0
  }
3131
0
  contents->append(" {\n");
3132
3133
0
  FormatLineOptions(depth, options(), file()->pool(), contents);
3134
3135
  // Find all the 'group' types for fields and extensions; we will not output
3136
  // their nested definitions (those will be done with their group field
3137
  // descriptor).
3138
0
  absl::flat_hash_set<const Descriptor*> groups;
3139
0
  for (int i = 0; i < field_count(); i++) {
3140
0
    if (field(i)->type() == FieldDescriptor::TYPE_GROUP) {
3141
0
      groups.insert(field(i)->message_type());
3142
0
    }
3143
0
  }
3144
0
  for (int i = 0; i < extension_count(); i++) {
3145
0
    if (extension(i)->type() == FieldDescriptor::TYPE_GROUP) {
3146
0
      groups.insert(extension(i)->message_type());
3147
0
    }
3148
0
  }
3149
3150
0
  for (int i = 0; i < nested_type_count(); i++) {
3151
0
    if (!groups.contains(nested_type(i))) {
3152
0
      nested_type(i)->DebugString(depth, contents, debug_string_options,
3153
0
                                  /* include_opening_clause */ true);
3154
0
    }
3155
0
  }
3156
0
  for (int i = 0; i < enum_type_count(); i++) {
3157
0
    enum_type(i)->DebugString(depth, contents, debug_string_options);
3158
0
  }
3159
0
  for (int i = 0; i < field_count(); i++) {
3160
0
    if (field(i)->real_containing_oneof() == nullptr) {
3161
0
      field(i)->DebugString(depth, contents, debug_string_options);
3162
0
    } else if (field(i)->containing_oneof()->field(0) == field(i)) {
3163
      // This is the first field in this oneof, so print the whole oneof.
3164
0
      field(i)->containing_oneof()->DebugString(depth, contents,
3165
0
                                                debug_string_options);
3166
0
    }
3167
0
  }
3168
3169
0
  for (int i = 0; i < extension_range_count(); i++) {
3170
0
    absl::SubstituteAndAppend(contents, "$0  extensions $1", prefix,
3171
0
                              extension_range(i)->start);
3172
0
    if (extension_range(i)->end > extension_range(i)->start + 1) {
3173
0
      absl::SubstituteAndAppend(contents, " to $0",
3174
0
                                extension_range(i)->end - 1);
3175
0
    }
3176
0
    if (extension_range(i)->options_ != nullptr) {
3177
0
      if (extension_range(i)->options_->declaration_size() > 0) {
3178
0
        absl::StrAppend(contents, " [");
3179
0
        for (int j = 0; j < extension_range(i)->options_->declaration_size();
3180
0
             ++j) {
3181
0
          if (j > 0) {
3182
0
            absl::StrAppend(contents, ",");
3183
0
          }
3184
0
          absl::SubstituteAndAppend(
3185
0
              contents, " declaration = { $0 }",
3186
0
              extension_range(i)->options_->declaration(j).ShortDebugString());
3187
0
        }
3188
0
        absl::StrAppend(contents, " ] ");
3189
0
      }
3190
0
    }
3191
0
    absl::StrAppend(contents, ";\n");
3192
0
  }
3193
3194
  // Group extensions by what they extend, so they can be printed out together.
3195
0
  const Descriptor* containing_type = nullptr;
3196
0
  for (int i = 0; i < extension_count(); i++) {
3197
0
    if (extension(i)->containing_type() != containing_type) {
3198
0
      if (i > 0) absl::SubstituteAndAppend(contents, "$0  }\n", prefix);
3199
0
      containing_type = extension(i)->containing_type();
3200
0
      absl::SubstituteAndAppend(contents, "$0  extend .$1 {\n", prefix,
3201
0
                                containing_type->full_name());
3202
0
    }
3203
0
    extension(i)->DebugString(depth + 1, contents, debug_string_options);
3204
0
  }
3205
0
  if (extension_count() > 0)
3206
0
    absl::SubstituteAndAppend(contents, "$0  }\n", prefix);
3207
3208
0
  if (reserved_range_count() > 0) {
3209
0
    absl::SubstituteAndAppend(contents, "$0  reserved ", prefix);
3210
0
    for (int i = 0; i < reserved_range_count(); i++) {
3211
0
      const Descriptor::ReservedRange* range = reserved_range(i);
3212
0
      if (range->end == range->start + 1) {
3213
0
        absl::SubstituteAndAppend(contents, "$0, ", range->start);
3214
0
      } else if (range->end > FieldDescriptor::kMaxNumber) {
3215
0
        absl::SubstituteAndAppend(contents, "$0 to max, ", range->start);
3216
0
      } else {
3217
0
        absl::SubstituteAndAppend(contents, "$0 to $1, ", range->start,
3218
0
                                  range->end - 1);
3219
0
      }
3220
0
    }
3221
0
    contents->replace(contents->size() - 2, 2, ";\n");
3222
0
  }
3223
3224
0
  if (reserved_name_count() > 0) {
3225
0
    absl::SubstituteAndAppend(contents, "$0  reserved ", prefix);
3226
0
    for (int i = 0; i < reserved_name_count(); i++) {
3227
0
      absl::SubstituteAndAppend(contents, "\"$0\", ",
3228
0
                                absl::CEscape(reserved_name(i)));
3229
0
    }
3230
0
    contents->replace(contents->size() - 2, 2, ";\n");
3231
0
  }
3232
3233
0
  absl::SubstituteAndAppend(contents, "$0}\n", prefix);
3234
0
  comment_printer.AddPostComment(contents);
3235
0
}
3236
3237
0
std::string FieldDescriptor::DebugString() const {
3238
0
  DebugStringOptions options;  // default options
3239
0
  return DebugStringWithOptions(options);
3240
0
}
3241
3242
std::string FieldDescriptor::DebugStringWithOptions(
3243
0
    const DebugStringOptions& debug_string_options) const {
3244
0
  std::string contents;
3245
0
  int depth = 0;
3246
0
  if (is_extension()) {
3247
0
    absl::SubstituteAndAppend(&contents, "extend .$0 {\n",
3248
0
                              containing_type()->full_name());
3249
0
    depth = 1;
3250
0
  }
3251
0
  DebugString(depth, &contents, debug_string_options);
3252
0
  if (is_extension()) {
3253
0
    contents.append("}\n");
3254
0
  }
3255
0
  return contents;
3256
0
}
3257
3258
// The field type string used in FieldDescriptor::DebugString()
3259
0
std::string FieldDescriptor::FieldTypeNameDebugString() const {
3260
0
  switch (type()) {
3261
0
    case TYPE_MESSAGE:
3262
0
      return absl::StrCat(".", message_type()->full_name());
3263
0
    case TYPE_ENUM:
3264
0
      return absl::StrCat(".", enum_type()->full_name());
3265
0
    default:
3266
0
      return kTypeToName[type()];
3267
0
  }
3268
0
}
3269
3270
void FieldDescriptor::DebugString(
3271
    int depth, std::string* contents,
3272
0
    const DebugStringOptions& debug_string_options) const {
3273
0
  std::string prefix(depth * 2, ' ');
3274
0
  std::string field_type;
3275
3276
  // Special case map fields.
3277
0
  if (is_map()) {
3278
0
    absl::SubstituteAndAppend(
3279
0
        &field_type, "map<$0, $1>",
3280
0
        message_type()->field(0)->FieldTypeNameDebugString(),
3281
0
        message_type()->field(1)->FieldTypeNameDebugString());
3282
0
  } else {
3283
0
    field_type = FieldTypeNameDebugString();
3284
0
  }
3285
3286
0
  std::string label = absl::StrCat(kLabelToName[this->label()], " ");
3287
3288
  // Label is omitted for maps, oneof, and plain proto3 fields.
3289
0
  if (is_map() || real_containing_oneof() ||
3290
0
      (is_optional() && !FieldDescriptorLegacy(this).has_optional_keyword())) {
3291
0
    label.clear();
3292
0
  }
3293
3294
0
  SourceLocationCommentPrinter comment_printer(this, prefix,
3295
0
                                               debug_string_options);
3296
0
  comment_printer.AddPreComment(contents);
3297
3298
0
  absl::SubstituteAndAppend(
3299
0
      contents, "$0$1$2 $3 = $4", prefix, label, field_type,
3300
0
      type() == TYPE_GROUP ? message_type()->name() : name(), number());
3301
3302
0
  bool bracketed = false;
3303
0
  if (has_default_value()) {
3304
0
    bracketed = true;
3305
0
    absl::SubstituteAndAppend(contents, " [default = $0",
3306
0
                              DefaultValueAsString(true));
3307
0
  }
3308
0
  if (has_json_name_) {
3309
0
    if (!bracketed) {
3310
0
      bracketed = true;
3311
0
      contents->append(" [");
3312
0
    } else {
3313
0
      contents->append(", ");
3314
0
    }
3315
0
    contents->append("json_name = \"");
3316
0
    contents->append(absl::CEscape(json_name()));
3317
0
    contents->append("\"");
3318
0
  }
3319
3320
0
  std::string formatted_options;
3321
0
  if (FormatBracketedOptions(depth, options(), file()->pool(),
3322
0
                             &formatted_options)) {
3323
0
    contents->append(bracketed ? ", " : " [");
3324
0
    bracketed = true;
3325
0
    contents->append(formatted_options);
3326
0
  }
3327
3328
0
  if (bracketed) {
3329
0
    contents->append("]");
3330
0
  }
3331
3332
0
  if (type() == TYPE_GROUP) {
3333
0
    if (debug_string_options.elide_group_body) {
3334
0
      contents->append(" { ... };\n");
3335
0
    } else {
3336
0
      message_type()->DebugString(depth, contents, debug_string_options,
3337
0
                                  /* include_opening_clause */ false);
3338
0
    }
3339
0
  } else {
3340
0
    contents->append(";\n");
3341
0
  }
3342
3343
0
  comment_printer.AddPostComment(contents);
3344
0
}
3345
3346
0
std::string OneofDescriptor::DebugString() const {
3347
0
  DebugStringOptions options;  // default values
3348
0
  return DebugStringWithOptions(options);
3349
0
}
3350
3351
std::string OneofDescriptor::DebugStringWithOptions(
3352
0
    const DebugStringOptions& options) const {
3353
0
  std::string contents;
3354
0
  DebugString(0, &contents, options);
3355
0
  return contents;
3356
0
}
3357
3358
void OneofDescriptor::DebugString(
3359
    int depth, std::string* contents,
3360
0
    const DebugStringOptions& debug_string_options) const {
3361
0
  std::string prefix(depth * 2, ' ');
3362
0
  ++depth;
3363
0
  SourceLocationCommentPrinter comment_printer(this, prefix,
3364
0
                                               debug_string_options);
3365
0
  comment_printer.AddPreComment(contents);
3366
0
  absl::SubstituteAndAppend(contents, "$0oneof $1 {", prefix, name());
3367
3368
0
  FormatLineOptions(depth, options(), containing_type()->file()->pool(),
3369
0
                    contents);
3370
3371
0
  if (debug_string_options.elide_oneof_body) {
3372
0
    contents->append(" ... }\n");
3373
0
  } else {
3374
0
    contents->append("\n");
3375
0
    for (int i = 0; i < field_count(); i++) {
3376
0
      field(i)->DebugString(depth, contents, debug_string_options);
3377
0
    }
3378
0
    absl::SubstituteAndAppend(contents, "$0}\n", prefix);
3379
0
  }
3380
0
  comment_printer.AddPostComment(contents);
3381
0
}
3382
3383
0
std::string EnumDescriptor::DebugString() const {
3384
0
  DebugStringOptions options;  // default values
3385
0
  return DebugStringWithOptions(options);
3386
0
}
3387
3388
std::string EnumDescriptor::DebugStringWithOptions(
3389
0
    const DebugStringOptions& options) const {
3390
0
  std::string contents;
3391
0
  DebugString(0, &contents, options);
3392
0
  return contents;
3393
0
}
3394
3395
void EnumDescriptor::DebugString(
3396
    int depth, std::string* contents,
3397
0
    const DebugStringOptions& debug_string_options) const {
3398
0
  std::string prefix(depth * 2, ' ');
3399
0
  ++depth;
3400
3401
0
  SourceLocationCommentPrinter comment_printer(this, prefix,
3402
0
                                               debug_string_options);
3403
0
  comment_printer.AddPreComment(contents);
3404
3405
0
  absl::SubstituteAndAppend(contents, "$0enum $1 {\n", prefix, name());
3406
3407
0
  FormatLineOptions(depth, options(), file()->pool(), contents);
3408
3409
0
  for (int i = 0; i < value_count(); i++) {
3410
0
    value(i)->DebugString(depth, contents, debug_string_options);
3411
0
  }
3412
3413
0
  if (reserved_range_count() > 0) {
3414
0
    absl::SubstituteAndAppend(contents, "$0  reserved ", prefix);
3415
0
    for (int i = 0; i < reserved_range_count(); i++) {
3416
0
      const EnumDescriptor::ReservedRange* range = reserved_range(i);
3417
0
      if (range->end == range->start) {
3418
0
        absl::SubstituteAndAppend(contents, "$0, ", range->start);
3419
0
      } else if (range->end == INT_MAX) {
3420
0
        absl::SubstituteAndAppend(contents, "$0 to max, ", range->start);
3421
0
      } else {
3422
0
        absl::SubstituteAndAppend(contents, "$0 to $1, ", range->start,
3423
0
                                  range->end);
3424
0
      }
3425
0
    }
3426
0
    contents->replace(contents->size() - 2, 2, ";\n");
3427
0
  }
3428
3429
0
  if (reserved_name_count() > 0) {
3430
0
    absl::SubstituteAndAppend(contents, "$0  reserved ", prefix);
3431
0
    for (int i = 0; i < reserved_name_count(); i++) {
3432
0
      absl::SubstituteAndAppend(contents, "\"$0\", ",
3433
0
                                absl::CEscape(reserved_name(i)));
3434
0
    }
3435
0
    contents->replace(contents->size() - 2, 2, ";\n");
3436
0
  }
3437
3438
0
  absl::SubstituteAndAppend(contents, "$0}\n", prefix);
3439
3440
0
  comment_printer.AddPostComment(contents);
3441
0
}
3442
3443
0
std::string EnumValueDescriptor::DebugString() const {
3444
0
  DebugStringOptions options;  // default values
3445
0
  return DebugStringWithOptions(options);
3446
0
}
3447
3448
std::string EnumValueDescriptor::DebugStringWithOptions(
3449
0
    const DebugStringOptions& options) const {
3450
0
  std::string contents;
3451
0
  DebugString(0, &contents, options);
3452
0
  return contents;
3453
0
}
3454
3455
void EnumValueDescriptor::DebugString(
3456
    int depth, std::string* contents,
3457
0
    const DebugStringOptions& debug_string_options) const {
3458
0
  std::string prefix(depth * 2, ' ');
3459
3460
0
  SourceLocationCommentPrinter comment_printer(this, prefix,
3461
0
                                               debug_string_options);
3462
0
  comment_printer.AddPreComment(contents);
3463
3464
0
  absl::SubstituteAndAppend(contents, "$0$1 = $2", prefix, name(), number());
3465
3466
0
  std::string formatted_options;
3467
0
  if (FormatBracketedOptions(depth, options(), type()->file()->pool(),
3468
0
                             &formatted_options)) {
3469
0
    absl::SubstituteAndAppend(contents, " [$0]", formatted_options);
3470
0
  }
3471
0
  contents->append(";\n");
3472
3473
0
  comment_printer.AddPostComment(contents);
3474
0
}
3475
3476
0
std::string ServiceDescriptor::DebugString() const {
3477
0
  DebugStringOptions options;  // default values
3478
0
  return DebugStringWithOptions(options);
3479
0
}
3480
3481
std::string ServiceDescriptor::DebugStringWithOptions(
3482
0
    const DebugStringOptions& options) const {
3483
0
  std::string contents;
3484
0
  DebugString(&contents, options);
3485
0
  return contents;
3486
0
}
3487
3488
void ServiceDescriptor::DebugString(
3489
    std::string* contents,
3490
0
    const DebugStringOptions& debug_string_options) const {
3491
0
  SourceLocationCommentPrinter comment_printer(this, /* prefix */ "",
3492
0
                                               debug_string_options);
3493
0
  comment_printer.AddPreComment(contents);
3494
3495
0
  absl::SubstituteAndAppend(contents, "service $0 {\n", name());
3496
3497
0
  FormatLineOptions(1, options(), file()->pool(), contents);
3498
3499
0
  for (int i = 0; i < method_count(); i++) {
3500
0
    method(i)->DebugString(1, contents, debug_string_options);
3501
0
  }
3502
3503
0
  contents->append("}\n");
3504
3505
0
  comment_printer.AddPostComment(contents);
3506
0
}
3507
3508
0
std::string MethodDescriptor::DebugString() const {
3509
0
  DebugStringOptions options;  // default values
3510
0
  return DebugStringWithOptions(options);
3511
0
}
3512
3513
std::string MethodDescriptor::DebugStringWithOptions(
3514
0
    const DebugStringOptions& options) const {
3515
0
  std::string contents;
3516
0
  DebugString(0, &contents, options);
3517
0
  return contents;
3518
0
}
3519
3520
void MethodDescriptor::DebugString(
3521
    int depth, std::string* contents,
3522
0
    const DebugStringOptions& debug_string_options) const {
3523
0
  std::string prefix(depth * 2, ' ');
3524
0
  ++depth;
3525
3526
0
  SourceLocationCommentPrinter comment_printer(this, prefix,
3527
0
                                               debug_string_options);
3528
0
  comment_printer.AddPreComment(contents);
3529
3530
0
  absl::SubstituteAndAppend(
3531
0
      contents, "$0rpc $1($4.$2) returns ($5.$3)", prefix, name(),
3532
0
      input_type()->full_name(), output_type()->full_name(),
3533
0