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_disable_sparc_delay_filler,
19 OPT_disable_sparc_leaf_proc,
20 OPT_sparc_bpcc_offset_bits,
21 OPT_sparc_bpr_offset_bits,
22 OPT_sparc_enable_branch_relax,
23 OPT_sparc_reserve_app_registers,
24};
25} // namespace
26
27static llvm::opt::OptTable::Tables optionTables() {
28 using llvm::opt::DefaultVis, llvm::opt::HelpHidden,
29 llvm::opt::RenderAsInput, llvm::opt::RenderJoined,
30 llvm::opt::RenderSeparate;
31
32#ifdef __GNUC__
33#pragma GCC diagnostic push
34#pragma GCC diagnostic ignored "-Woverlength-strings"
35#endif
36static constexpr char OptionStrTableStorage[] =
37 "\0"
38 "-\0"
39 "--\0"
40 "<input>\0"
41 "<unknown>\0"
42 "-disable-sparc-delay-filler\0"
43 "Disable the Sparc delay slot filler\0"
44 "-disable-sparc-leaf-proc\0"
45 "Disable Sparc leaf procedure optimization\0"
46 "-sparc-bpcc-offset-bits\0"
47 "Restrict range of BPcc/FBPfcc instructions (DEBUG)\0"
48 "-sparc-bpr-offset-bits\0"
49 "Restrict range of BPr instructions (DEBUG)\0"
50 "-sparc-enable-branch-relax\0"
51 "Relax out of range conditional branches\0"
52 "-sparc-reserve-app-registers\0"
53 "Reserve application registers (%g2-%g4)\0"
54 ;
55#ifdef __GNUC__
56#pragma GCC diagnostic pop
57#endif
58
59static constexpr llvm::StringTable
60OptionStrTable = OptionStrTableStorage;
61
62 static constexpr llvm::StringTable::Offset OptionPrefixesTable[] = {
63 0 /* prefixes */,
64 2 /* prefixes */, 1 /* '-' */, 3 /* '--' */
65 };
66
67 static constexpr llvm::opt::OptTable::HelpTextVariant OptionHelpTextVariantsTable[] = {
68 {0, 0},
69 };
70
71 static constexpr unsigned OptionSubCommandIDsTable[] = {
72 0 /* subcommands */
73 };
74
75 static constexpr llvm::opt::OptTable::InfoExtra OptionInfoExtrasTable[] = {
76 {0, 0, 0, 0, 0, 0, 0, 0},
77 {0, 0, 0, 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 /* -disable-sparc-delay-filler */, 52, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
84 {88 /* -disable-sparc-leaf-proc */, 113, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
85 {155 /* -sparc-bpcc-offset-bits */, 179, 0, 0, 1, 1, llvm::opt::Option::SeparateOrEqClass},
86 {230 /* -sparc-bpr-offset-bits */, 253, 0, 0, 1, 1, llvm::opt::Option::SeparateOrEqClass},
87 {296 /* -sparc-enable-branch-relax */, 323, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
88 {363 /* -sparc-reserve-app-registers */, 392, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
89 };
90
91 return {OptionStrTable, OptionPrefixesTable,
92 OptionInfoTable, OptionInfoExtrasTable, OptionHelpTextVariantsTable, {}, OptionSubCommandIDsTable};
93}
94#undef OPTTABLE_CODE
95#endif // OPTTABLE_CODE || OPTIONS_STRUCT_DEFS
96
97
98#ifdef OPTIONS_STRUCT_DECL
99#undef OPTIONS_STRUCT_DECL
100#include "llvm/ADT/ArrayRef.h"
101#include "llvm/ADT/BoolOrDefault.h"
102#include "llvm/ADT/StringRef.h"
103#include "llvm/Support/Allocator.h"
104#include "llvm/Support/LibraryOptionsContext.h"
105
106namespace llvm {
107namespace opt {
108class Arg;
109class LibraryOptionsParser;
110class OptTable;
111} // namespace opt
112} // namespace llvm
113
114namespace llvm {
115struct SparcOptions {
116 bool disable_sparc_delay_filler{false};
117 bool disable_sparc_leaf_proc{false};
118 unsigned bpcc_offset_bits{19};
119 unsigned bpr_offset_bits{16};
120 bool enable_branch_relax{true};
121 bool reserve_app_registers{false};
122
123 static constexpr bool PerContext = true;
124 static const llvm::opt::OptTable &optTable();
125 /// Sets the member that \p A names, allocating a list from \p Alloc.
126 /// Returns false if the value is invalid.
127 bool apply(const llvm::opt::Arg &A, llvm::BumpPtrAllocator &Alloc);
128
129private:
130 friend class llvm::cl::LibraryOptionsContext;
131 friend class llvm::opt::LibraryOptionsParser;
132
133 static SparcOptions Global;
134 static const SparcOptions Default;
135};
136} // namespace llvm
137#endif // OPTIONS_STRUCT_DECL
138
139#ifdef OPTIONS_STRUCT_DEFS
140#undef OPTIONS_STRUCT_DEFS
141llvm::SparcOptions llvm::SparcOptions::Global;
142LLVM_REQUIRE_CONSTANT_INITIALIZATION const llvm::SparcOptions llvm::SparcOptions::Default;
143
144const llvm::opt::OptTable &llvm::SparcOptions::optTable() {
145 static const llvm::opt::LibraryOptTable T(optionTables());
146 return T;
147}
148
149bool llvm::SparcOptions::apply(const llvm::opt::Arg &A, llvm::BumpPtrAllocator &Alloc) {
150 switch (A.getOption().getID()) {
151 case OPT_disable_sparc_delay_filler:
152 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", disable_sparc_delay_filler, Alloc);
153 case OPT_disable_sparc_leaf_proc:
154 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", disable_sparc_leaf_proc, Alloc);
155 case OPT_sparc_bpcc_offset_bits:
156 return llvm::opt::parseArgValue(A.getValue(), bpcc_offset_bits, Alloc);
157 case OPT_sparc_bpr_offset_bits:
158 return llvm::opt::parseArgValue(A.getValue(), bpr_offset_bits, Alloc);
159 case OPT_sparc_enable_branch_relax:
160 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", enable_branch_relax, Alloc);
161 case OPT_sparc_reserve_app_registers:
162 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", reserve_app_registers, Alloc);
163 }
164 llvm_unreachable("option without a member");
165}
166#endif // OPTIONS_STRUCT_DEFS
167/////////
168// ValuesCode
169
170#ifdef OPTTABLE_VALUES_CODE
171static llvm::StringRef getOptionValuesCode(unsigned ID) {
172 switch (ID) {
173 }
174 return {};
175}
176#undef OPTTABLE_VALUES_CODE
177#endif // OPTTABLE_VALUES_CODE
178/////////
179// Groups
180
181#ifdef OPTION
182
183//////////
184// Options
185
186OPTION(0, 6 /* <input> */, INPUT, Input, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 0, 0, 0, 0, 0)
187OPTION(0, 14 /* <unknown> */, UNKNOWN, Unknown, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 0, 0, 0, 0, 0)
188OPTION(1, 24 /* -disable-sparc-delay-filler */, anonymous_0, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 52, 0, 0, 0, 0)
189OPTION(1, 88 /* -disable-sparc-leaf-proc */, anonymous_1, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 113, 0, 0, 0, 0)
190OPTION(1, 155 /* -sparc-bpcc-offset-bits */, anonymous_2, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 179, 0, 0, 0, 0)
191OPTION(1, 230 /* -sparc-bpr-offset-bits */, anonymous_3, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 253, 0, 0, 0, 0)
192OPTION(1, 296 /* -sparc-enable-branch-relax */, anonymous_4, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 323, 0, 0, 0, 0)
193OPTION(1, 363 /* -sparc-reserve-app-registers */, anonymous_5, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 392, 0, 0, 0, 0)
194#endif // OPTION
195
196#ifdef SIMPLE_ENUM_VALUE_TABLE
197
198struct SimpleEnumValue {
199 const char *Name;
200 unsigned Value;
201};
202
203struct SimpleEnumValueTable {
204 const SimpleEnumValue *Table;
205 unsigned Size;
206};
207static const SimpleEnumValueTable SimpleEnumValueTables[] = {};
208static const unsigned SimpleEnumValueTablesSize = std::size(SimpleEnumValueTables);
209#endif // SIMPLE_ENUM_VALUE_TABLE
210