Automated rollback of commit 694d7935747a5b4eac351b757ad8ff22599c8077.
[google-protobuf.git] / upb_generator / minitable / names_internal.h
blobbe4fae82d77dcc06dd9c3e689fbef93c401bc21e
1 // Protocol Buffers - Google's data interchange format
2 // Copyright 2023 Google LLC. All rights reserved.
3 //
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file or at
6 // https://developers.google.com/open-source/licenses/bsd
8 #ifndef THIRD_PARTY_UPB_UPB_GENERATOR_MINITABLE_NAMES_INTERNAL_H_
9 #define THIRD_PARTY_UPB_UPB_GENERATOR_MINITABLE_NAMES_INTERNAL_H_
11 #include <string>
13 #include "absl/strings/string_view.h"
15 namespace upb {
16 namespace generator {
18 // Like the public MiniTableHeaderFilename, but also handles the case where we
19 // are generating a bootstrap header.
20 std::string MiniTableHeaderFilename(absl::string_view proto_filename,
21 bool bootstrap);
23 // Global static variables used in the generated .c file.
24 constexpr char kEnumsInit[] = "enums_layout";
25 constexpr char kExtensionsInit[] = "extensions_layout";
26 constexpr char kMessagesInit[] = "messages_layout";
28 // Per-message static variables used in the generated .c file.
29 std::string MiniTableFieldsVarName(absl::string_view msg_full_name);
30 std::string MiniTableSubMessagesVarName(absl::string_view msg_full_name);
32 } // namespace generator
33 } // namespace upb
35 #endif // THIRD_PARTY_UPB_UPB_GENERATOR_MINITABLE_NAMES_INTERNAL_H_