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