1/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
2|* *|
3|* Option Parsing Definitions *|
4|* *|
5|* Automatically generated file, do not edit! *|
6|* *|
7\*===----------------------------------------------------------------------===*/
8
9/////////
10// Tables
11
12#if defined(OPTTABLE_CODE) || defined(OPTIONS_STRUCT_DEFS)
13namespace {
14enum ID : unsigned {
15 OPT_INVALID = 0,
16 OPT_INPUT,
17 OPT_UNKNOWN,
18 OPT_bitcode_flush_threshold,
19 OPT_bitcode_mdindex_threshold,
20 OPT_preserve_bc_uselistorder,
21};
22} // namespace
23
24static llvm::opt::OptTable::Tables optionTables() {
25 using llvm::opt::DefaultVis, llvm::opt::HelpHidden,
26 llvm::opt::RenderAsInput, llvm::opt::RenderJoined,
27 llvm::opt::RenderSeparate;
28
29#ifdef __GNUC__
30#pragma GCC diagnostic push
31#pragma GCC diagnostic ignored "-Woverlength-strings"
32#endif
33static constexpr char OptionStrTableStorage[] =
34 "\0"
35 "-\0"
36 "--\0"
37 "<input>\0"
38 "<unknown>\0"
39 "-bitcode-flush-threshold\0"
40 "The threshold (unit M) for flushing LLVM bitcode\0"
41 "-bitcode-mdindex-threshold\0"
42 "Number of metadatas above which we emit an index to enable lazy-loading\0"
43 "-preserve-bc-uselistorder\0"
44 "Preserve use-list order when writing LLVM bitcode\0"
45 ;
46#ifdef __GNUC__
47#pragma GCC diagnostic pop
48#endif
49
50static constexpr llvm::StringTable
51OptionStrTable = OptionStrTableStorage;
52
53 static constexpr llvm::StringTable::Offset OptionPrefixesTable[] = {
54 0 /* prefixes */,
55 2 /* prefixes */, 1 /* '-' */, 3 /* '--' */
56 };
57
58 static constexpr llvm::opt::OptTable::HelpTextVariant OptionHelpTextVariantsTable[] = {
59 {0, 0},
60 };
61
62 static constexpr unsigned OptionSubCommandIDsTable[] = {
63 0 /* subcommands */
64 };
65
66 static constexpr llvm::opt::OptTable::InfoExtra OptionInfoExtrasTable[] = {
67 {0, 0, 0, 0, 0, 0, 0, 0},
68 {0, 0, 0, 0, static_cast<unsigned>(DefaultVis), 0, 0, 0},
69 };
70
71 static constexpr llvm::opt::OptTable::Info OptionInfoTable[] = {
72 {6 /* <input> */, 0, 0, 0, 1, 0, llvm::opt::Option::InputClass},
73 {14 /* <unknown> */, 0, 0, 0, 1, 0, llvm::opt::Option::UnknownClass},
74 {24 /* -bitcode-flush-threshold */, 49, 0, 0, 1, 1, llvm::opt::Option::SeparateOrEqClass},
75 {98 /* -bitcode-mdindex-threshold */, 125, 0, 0, 1, 1, llvm::opt::Option::SeparateOrEqClass},
76 {197 /* -preserve-bc-uselistorder */, 223, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
77 };
78
79 return {OptionStrTable, OptionPrefixesTable,
80 OptionInfoTable, OptionInfoExtrasTable, OptionHelpTextVariantsTable, {}, OptionSubCommandIDsTable};
81}
82#undef OPTTABLE_CODE
83#endif // OPTTABLE_CODE || OPTIONS_STRUCT_DEFS
84
85
86#ifdef OPTIONS_STRUCT_DECL
87#undef OPTIONS_STRUCT_DECL
88#include "llvm/ADT/ArrayRef.h"
89#include "llvm/ADT/BoolOrDefault.h"
90#include "llvm/ADT/StringRef.h"
91#include "llvm/Support/Allocator.h"
92#include "llvm/Support/LibraryOptionsContext.h"
93
94namespace llvm {
95namespace opt {
96class Arg;
97class LibraryOptionsParser;
98class OptTable;
99} // namespace opt
100} // namespace llvm
101
102namespace llvm {
103struct BitWriterOptions {
104 uint32_t bitcode_flush_threshold{512};
105 unsigned bitcode_mdindex_threshold{25};
106 llvm::BoolOrDefault preserve_bc_uselistorder{llvm::BoolOrDefault::Default};
107
108 static const llvm::opt::OptTable &optTable();
109 /// Sets the member that \p A names, allocating a list from \p Alloc.
110 /// Returns false if the value is invalid.
111 bool apply(const llvm::opt::Arg &A, llvm::BumpPtrAllocator &Alloc);
112
113private:
114 friend class llvm::cl::LibraryOptionsContext;
115 friend class llvm::opt::LibraryOptionsParser;
116
117 static const BitWriterOptions Default;
118};
119} // namespace llvm
120#endif // OPTIONS_STRUCT_DECL
121
122#ifdef OPTIONS_STRUCT_DEFS
123#undef OPTIONS_STRUCT_DEFS
124LLVM_REQUIRE_CONSTANT_INITIALIZATION const llvm::BitWriterOptions llvm::BitWriterOptions::Default;
125
126const llvm::opt::OptTable &llvm::BitWriterOptions::optTable() {
127 static const llvm::opt::LibraryOptTable T(optionTables());
128 return T;
129}
130
131bool llvm::BitWriterOptions::apply(const llvm::opt::Arg &A, llvm::BumpPtrAllocator &Alloc) {
132 switch (A.getOption().getID()) {
133 case OPT_bitcode_flush_threshold:
134 return llvm::opt::parseArgValue(A.getValue(), bitcode_flush_threshold, Alloc);
135 case OPT_bitcode_mdindex_threshold:
136 return llvm::opt::parseArgValue(A.getValue(), bitcode_mdindex_threshold, Alloc);
137 case OPT_preserve_bc_uselistorder:
138 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", preserve_bc_uselistorder, Alloc);
139 }
140 llvm_unreachable("option without a member");
141}
142#endif // OPTIONS_STRUCT_DEFS
143/////////
144// ValuesCode
145
146#ifdef OPTTABLE_VALUES_CODE
147static llvm::StringRef getOptionValuesCode(unsigned ID) {
148 switch (ID) {
149 }
150 return {};
151}
152#undef OPTTABLE_VALUES_CODE
153#endif // OPTTABLE_VALUES_CODE
154/////////
155// Groups
156
157#ifdef OPTION
158
159//////////
160// Options
161
162OPTION(0, 6 /* <input> */, INPUT, Input, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 0, 0, 0, 0, 0)
163OPTION(0, 14 /* <unknown> */, UNKNOWN, Unknown, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 0, 0, 0, 0, 0)
164OPTION(1, 24 /* -bitcode-flush-threshold */, anonymous_0, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 49, 0, 0, 0, 0)
165OPTION(1, 98 /* -bitcode-mdindex-threshold */, anonymous_1, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 125, 0, 0, 0, 0)
166OPTION(1, 197 /* -preserve-bc-uselistorder */, anonymous_2, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 223, 0, 0, 0, 0)
167#endif // OPTION
168
169#ifdef SIMPLE_ENUM_VALUE_TABLE
170
171struct SimpleEnumValue {
172 const char *Name;
173 unsigned Value;
174};
175
176struct SimpleEnumValueTable {
177 const SimpleEnumValue *Table;
178 unsigned Size;
179};
180static const SimpleEnumValueTable SimpleEnumValueTables[] = {};
181static const unsigned SimpleEnumValueTablesSize = std::size(SimpleEnumValueTables);
182#endif // SIMPLE_ENUM_VALUE_TABLE
183