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_asm_macro_max_nesting_depth,
19 OPT_dwarf_extended_loc,
20 OPT_lfi_enable_rewriter,
21 OPT_sched_model_reservation_station_scale_factor,
22 OPT_use_leb128_directives,
23};
24} // namespace
25
26static llvm::opt::OptTable::Tables optionTables() {
27 using llvm::opt::DefaultVis, llvm::opt::HelpHidden,
28 llvm::opt::RenderAsInput, llvm::opt::RenderJoined,
29 llvm::opt::RenderSeparate;
30
31#ifdef __GNUC__
32#pragma GCC diagnostic push
33#pragma GCC diagnostic ignored "-Woverlength-strings"
34#endif
35static constexpr char OptionStrTableStorage[] =
36 "\0"
37 "-\0"
38 "--\0"
39 "<input>\0"
40 "<unknown>\0"
41 "-asm-macro-max-nesting-depth\0"
42 "The maximum nesting depth allowed for assembly macros\0"
43 "-dwarf-extended-loc\0"
44 "Disable emission of the extended flags in .loc directives\0"
45 "<Default|Enable|Disable>\0"
46 "Default,Enable,Disable\0"
47 "-lfi-enable-rewriter\0"
48 "Enable rewriting for LFI\0"
49 "-sched-model-reservation-station-scale-factor\0"
50 "Scale the buffer size of all reservation stations by a positive factor. Buffer sizes of -1/0/1 (unlimited/unbuffered/in-order) are preserved. Likewise, if the scaled result is <= 1, the original size is kept. Computed sizes are truncated towards zero\0"
51 "-use-leb128-directives\0"
52 "Disable the usage of LEB128 directives, and generate .byte instead\0"
53 ;
54#ifdef __GNUC__
55#pragma GCC diagnostic pop
56#endif
57
58static constexpr llvm::StringTable
59OptionStrTable = OptionStrTableStorage;
60
61 static constexpr llvm::StringTable::Offset OptionPrefixesTable[] = {
62 0 /* prefixes */,
63 2 /* prefixes */, 1 /* '-' */, 3 /* '--' */
64 };
65
66 static constexpr llvm::opt::OptTable::HelpTextVariant OptionHelpTextVariantsTable[] = {
67 {0, 0},
68 };
69
70 static constexpr unsigned OptionSubCommandIDsTable[] = {
71 0 /* subcommands */
72 };
73
74 static constexpr llvm::opt::OptTable::InfoExtra OptionInfoExtrasTable[] = {
75 {0, 0, 0, 0, 0, 0, 0, 0},
76 {0, 0, 0, 0, static_cast<unsigned>(DefaultVis), 0, 0, 0},
77 {185, 0, 210, 0, static_cast<unsigned>(DefaultVis), 0, 0, 0},
78 };
79
80 static constexpr llvm::opt::OptTable::Info OptionInfoTable[] = {
81 {6 /* <input> */, 0, 0, 0, 1, 0, llvm::opt::Option::InputClass},
82 {14 /* <unknown> */, 0, 0, 0, 1, 0, llvm::opt::Option::UnknownClass},
83 {24 /* -asm-macro-max-nesting-depth */, 53, 0, 0, 1, 1, llvm::opt::Option::SeparateOrEqClass},
84 {107 /* -dwarf-extended-loc */, 127, 0, 0, 2, 1, llvm::opt::Option::SeparateOrEqClass},
85 {233 /* -lfi-enable-rewriter */, 254, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
86 {279 /* -sched-model-reservation-station-scale-factor */, 325, 0, 0, 1, 1, llvm::opt::Option::SeparateOrEqClass},
87 {576 /* -use-leb128-directives */, 599, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
88 };
89
90 return {OptionStrTable, OptionPrefixesTable,
91 OptionInfoTable, OptionInfoExtrasTable, OptionHelpTextVariantsTable, {}, OptionSubCommandIDsTable};
92}
93#undef OPTTABLE_CODE
94#endif // OPTTABLE_CODE || OPTIONS_STRUCT_DEFS
95
96
97#ifdef OPTIONS_STRUCT_DECL
98#undef OPTIONS_STRUCT_DECL
99#include "llvm/ADT/ArrayRef.h"
100#include "llvm/ADT/BoolOrDefault.h"
101#include "llvm/ADT/StringRef.h"
102#include "llvm/Support/Allocator.h"
103#include "llvm/Support/LibraryOptionsContext.h"
104
105namespace llvm {
106namespace opt {
107class Arg;
108class LibraryOptionsParser;
109class OptTable;
110} // namespace opt
111} // namespace llvm
112
113namespace llvm {
114struct MCCLOptions {
115 unsigned asm_macro_max_nesting_depth{100};
116 llvm::BoolOrDefault dwarf_extended_loc{llvm::BoolOrDefault::Default};
117 bool lfi_enable_rewriter{true};
118 float sched_model_reservation_station_scale_factor{1.0f};
119 llvm::BoolOrDefault use_leb128_directives{llvm::BoolOrDefault::Default};
120
121 static const llvm::opt::OptTable &optTable();
122 /// Sets the member that \p A names, allocating a list from \p Alloc.
123 /// Returns false if the value is invalid.
124 bool apply(const llvm::opt::Arg &A, llvm::BumpPtrAllocator &Alloc);
125
126private:
127 friend class llvm::cl::LibraryOptionsContext;
128 friend class llvm::opt::LibraryOptionsParser;
129
130 static const MCCLOptions Default;
131};
132} // namespace llvm
133#endif // OPTIONS_STRUCT_DECL
134
135#ifdef OPTIONS_STRUCT_DEFS
136#undef OPTIONS_STRUCT_DEFS
137LLVM_REQUIRE_CONSTANT_INITIALIZATION const llvm::MCCLOptions llvm::MCCLOptions::Default;
138
139const llvm::opt::OptTable &llvm::MCCLOptions::optTable() {
140 static const llvm::opt::LibraryOptTable T(optionTables());
141 return T;
142}
143
144bool llvm::MCCLOptions::apply(const llvm::opt::Arg &A, llvm::BumpPtrAllocator &Alloc) {
145 switch (A.getOption().getID()) {
146 case OPT_asm_macro_max_nesting_depth:
147 return llvm::opt::parseArgValue(A.getValue(), asm_macro_max_nesting_depth, Alloc);
148 case OPT_dwarf_extended_loc:
149 return llvm::opt::parseArgValue(A.getValue(), dwarf_extended_loc, Alloc, [](llvm::StringRef V, auto &X) {
150 if (V == "Default") {
151 X = llvm::BoolOrDefault::Default;
152 return true;
153 }
154 if (V == "Enable") {
155 X = llvm::BoolOrDefault::True;
156 return true;
157 }
158 if (V == "Disable") {
159 X = llvm::BoolOrDefault::False;
160 return true;
161 }
162 return false;
163 });
164 case OPT_lfi_enable_rewriter:
165 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", lfi_enable_rewriter, Alloc);
166 case OPT_sched_model_reservation_station_scale_factor:
167 return llvm::opt::parseArgValue(A.getValue(), sched_model_reservation_station_scale_factor, Alloc);
168 case OPT_use_leb128_directives:
169 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", use_leb128_directives, Alloc);
170 }
171 llvm_unreachable("option without a member");
172}
173#endif // OPTIONS_STRUCT_DEFS
174/////////
175// ValuesCode
176
177#ifdef OPTTABLE_VALUES_CODE
178static llvm::StringRef getOptionValuesCode(unsigned ID) {
179 switch (ID) {
180 }
181 return {};
182}
183#undef OPTTABLE_VALUES_CODE
184#endif // OPTTABLE_VALUES_CODE
185/////////
186// Groups
187
188#ifdef OPTION
189
190//////////
191// Options
192
193OPTION(0, 6 /* <input> */, INPUT, Input, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 0, 0, 0, 0, 0)
194OPTION(0, 14 /* <unknown> */, UNKNOWN, Unknown, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 0, 0, 0, 0, 0)
195OPTION(1, 24 /* -asm-macro-max-nesting-depth */, anonymous_0, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 53, 0, 0, 0, 0)
196OPTION(1, 107 /* -dwarf-extended-loc */, anonymous_1, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 127, 0, 185, 210, 0)
197OPTION(1, 233 /* -lfi-enable-rewriter */, anonymous_2, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 254, 0, 0, 0, 0)
198OPTION(1, 279 /* -sched-model-reservation-station-scale-factor */, anonymous_3, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 325, 0, 0, 0, 0)
199OPTION(1, 576 /* -use-leb128-directives */, anonymous_4, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 599, 0, 0, 0, 0)
200#endif // OPTION
201
202#ifdef SIMPLE_ENUM_VALUE_TABLE
203
204struct SimpleEnumValue {
205 const char *Name;
206 unsigned Value;
207};
208
209struct SimpleEnumValueTable {
210 const SimpleEnumValue *Table;
211 unsigned Size;
212};
213static const SimpleEnumValueTable SimpleEnumValueTables[] = {};
214static const unsigned SimpleEnumValueTablesSize = std::size(SimpleEnumValueTables);
215#endif // SIMPLE_ENUM_VALUE_TABLE
216