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