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_mips_jalr_reloc,
19 OPT_mips_round_section_sizes,
20 OPT_mno_check_zero_division,
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 "-mips-jalr-reloc\0"
40 "MIPS: Emit R_{MICRO}MIPS_JALR relocation with jalr\0"
41 "-mips-round-section-sizes\0"
42 "Round section sizes up to the section alignment\0"
43 "-mno-check-zero-division\0"
44 "MIPS: Don't trap on integer division by zero\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 /* -mips-jalr-reloc */, 41, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
75 {92 /* -mips-round-section-sizes */, 118, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
76 {166 /* -mno-check-zero-division */, 191, 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 MipsMCOptions {
104 bool jalr_reloc{true};
105 bool mno_check_zero_division{false};
106 bool round_section_sizes{false};
107
108 static constexpr bool PerContext = true;
109 static const llvm::opt::OptTable &optTable();
110 /// Sets the member that \p A names, allocating a list from \p Alloc.
111 /// Returns false if the value is invalid.
112 bool apply(const llvm::opt::Arg &A, llvm::BumpPtrAllocator &Alloc);
113
114private:
115 friend class llvm::cl::LibraryOptionsContext;
116 friend class llvm::opt::LibraryOptionsParser;
117
118 static MipsMCOptions Global;
119 static const MipsMCOptions Default;
120};
121} // namespace llvm
122#endif // OPTIONS_STRUCT_DECL
123
124#ifdef OPTIONS_STRUCT_DEFS
125#undef OPTIONS_STRUCT_DEFS
126llvm::MipsMCOptions llvm::MipsMCOptions::Global;
127LLVM_REQUIRE_CONSTANT_INITIALIZATION const llvm::MipsMCOptions llvm::MipsMCOptions::Default;
128
129const llvm::opt::OptTable &llvm::MipsMCOptions::optTable() {
130 static const llvm::opt::LibraryOptTable T(optionTables());
131 return T;
132}
133
134bool llvm::MipsMCOptions::apply(const llvm::opt::Arg &A, llvm::BumpPtrAllocator &Alloc) {
135 switch (A.getOption().getID()) {
136 case OPT_mips_jalr_reloc:
137 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", jalr_reloc, Alloc);
138 case OPT_mips_round_section_sizes:
139 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", round_section_sizes, Alloc);
140 case OPT_mno_check_zero_division:
141 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", mno_check_zero_division, Alloc);
142 }
143 llvm_unreachable("option without a member");
144}
145#endif // OPTIONS_STRUCT_DEFS
146/////////
147// ValuesCode
148
149#ifdef OPTTABLE_VALUES_CODE
150static llvm::StringRef getOptionValuesCode(unsigned ID) {
151 switch (ID) {
152 }
153 return {};
154}
155#undef OPTTABLE_VALUES_CODE
156#endif // OPTTABLE_VALUES_CODE
157/////////
158// Groups
159
160#ifdef OPTION
161
162//////////
163// Options
164
165OPTION(0, 6 /* <input> */, INPUT, Input, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 0, 0, 0, 0, 0)
166OPTION(0, 14 /* <unknown> */, UNKNOWN, Unknown, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 0, 0, 0, 0, 0)
167OPTION(1, 24 /* -mips-jalr-reloc */, anonymous_0, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 41, 0, 0, 0, 0)
168OPTION(1, 92 /* -mips-round-section-sizes */, anonymous_2, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 118, 0, 0, 0, 0)
169OPTION(1, 166 /* -mno-check-zero-division */, anonymous_1, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 191, 0, 0, 0, 0)
170#endif // OPTION
171
172#ifdef SIMPLE_ENUM_VALUE_TABLE
173
174struct SimpleEnumValue {
175 const char *Name;
176 unsigned Value;
177};
178
179struct SimpleEnumValueTable {
180 const SimpleEnumValue *Table;
181 unsigned Size;
182};
183static const SimpleEnumValueTable SimpleEnumValueTables[] = {};
184static const unsigned SimpleEnumValueTablesSize = std::size(SimpleEnumValueTables);
185#endif // SIMPLE_ENUM_VALUE_TABLE
186