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 "-aarch64-lfi-guard-elim\0"
29 "Enable the LFI guard elimination optimization\0"
30 "-aarch64-mark-bti-property\0"
31 "Add .note.gnu.property with BTI to assembly files\0"
32 "-aarch64-neon-syntax\0"
33 "Choose style of NEON code to emit from AArch64 backend:\0"
34 "<generic|apple>\0"
35 "generic,apple\0"
36 ;
37#ifdef __GNUC__
38#pragma GCC diagnostic pop
39#endif
40
41static constexpr llvm::StringTable
42OptionStrTable = OptionStrTableStorage;
43
44 static constexpr llvm::StringTable::Offset OptionPrefixesTable[] = {
45 0 /* prefixes */,
46 2 /* prefixes */, 1 /* '-' */, 3 /* '--' */
47 };
48
49 static constexpr llvm::opt::OptTable::HelpTextVariant OptionHelpTextVariantsTable[] = {
50 {0, 0},
51 };
52
53 static constexpr unsigned OptionSubCommandIDsTable[] = {
54 0 /* subcommands */
55 };
56
57 static constexpr llvm::opt::OptTable::InfoExtra OptionInfoExtrasTable[] = {
58 {0, 0, 0, 0, 0, 0, 0, 0},
59 {0, 0, 0, 0, static_cast<unsigned>(DefaultVis), 0, 0, 0},
60 {248, 0, 264, 0, static_cast<unsigned>(DefaultVis), 0, 0, 0},
61 };
62
63 static constexpr llvm::opt::OptTable::Info OptionInfoTable[] = {
64 {6 /* <input> */, 0, 0, 0, 1, 0, llvm::opt::Option::InputClass},
65 {14 /* <unknown> */, 0, 0, 0, 1, 0, llvm::opt::Option::UnknownClass},
66 {24 /* -aarch64-lfi-guard-elim */, 48, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
67 {94 /* -aarch64-mark-bti-property */, 121, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
68 {171 /* -aarch64-neon-syntax */, 192, 0, 0, 2, 1, llvm::opt::Option::SeparateOrEqClass},
69 };
70
71 return {OptionStrTable, OptionPrefixesTable,
72 OptionInfoTable, OptionInfoExtrasTable, OptionHelpTextVariantsTable, {}, OptionSubCommandIDsTable};
73}
74#undef OPTTABLE_CODE
75#endif // OPTTABLE_CODE || OPTIONS_STRUCT_DEFS
76
77
78#ifdef OPTIONS_STRUCT_DECL
79#undef OPTIONS_STRUCT_DECL
80#include "llvm/ADT/ArrayRef.h"
81#include "llvm/ADT/BoolOrDefault.h"
82#include "llvm/ADT/StringRef.h"
83#include "llvm/Support/Allocator.h"
84
85namespace llvm {
86namespace opt {
87class Arg;
88class OptTable;
89} // namespace opt
90} // namespace llvm
91
92namespace llvm {
93struct AArch64MCOptions {
94 std::optional<AArch64::AsmWriterVariantTy> neon_syntax{std::nullopt};
95 bool lfi_guard_elim{true};
96 bool mark_bti_property{false};
97
98 /// The instance cl::ParseCommandLineOptions sets.
99 static AArch64MCOptions Global;
100
101 static const llvm::opt::OptTable &optTable();
102 /// Sets the member that \p A names, allocating a list from \p Alloc.
103 /// Returns false if the value is invalid.
104 bool apply(const llvm::opt::Arg &A, llvm::BumpPtrAllocator &Alloc);
105};
106} // namespace llvm
107#endif // OPTIONS_STRUCT_DECL
108
109#ifdef OPTIONS_STRUCT_DEFS
110#undef OPTIONS_STRUCT_DEFS
111llvm::AArch64MCOptions llvm::AArch64MCOptions::Global;
112
113namespace {
114enum ID : unsigned {
115 OPT_INVALID = 0,
116 OPT_INPUT,
117 OPT_UNKNOWN,
118 OPT_aarch64_lfi_guard_elim,
119 OPT_aarch64_mark_bti_property,
120 OPT_aarch64_neon_syntax,
121};
122} // namespace
123
124const llvm::opt::OptTable &llvm::AArch64MCOptions::optTable() {
125 static const llvm::opt::LibraryOptTable T(optionTables());
126 return T;
127}
128
129bool llvm::AArch64MCOptions::apply(const llvm::opt::Arg &A, llvm::BumpPtrAllocator &Alloc) {
130 switch (A.getOption().getID()) {
131 case OPT_aarch64_lfi_guard_elim:
132 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", lfi_guard_elim, Alloc);
133 case OPT_aarch64_mark_bti_property:
134 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", mark_bti_property, Alloc);
135 case OPT_aarch64_neon_syntax:
136 return llvm::opt::parseArgValue(A.getValue(), neon_syntax, Alloc, [](llvm::StringRef V, auto &X) {
137 if (V == "generic") {
138 X = AArch64::Generic;
139 return true;
140 }
141 if (V == "apple") {
142 X = AArch64::Apple;
143 return true;
144 }
145 return false;
146 });
147 }
148 llvm_unreachable("option without a member");
149}
150#endif // OPTIONS_STRUCT_DEFS
151/////////
152// ValuesCode
153
154#ifdef OPTTABLE_VALUES_CODE
155static llvm::StringRef getOptionValuesCode(unsigned ID) {
156 switch (ID) {
157 }
158 return {};
159}
160#undef OPTTABLE_VALUES_CODE
161#endif // OPTTABLE_VALUES_CODE
162/////////
163// Groups
164
165#ifdef OPTION
166
167//////////
168// Options
169
170OPTION(0, 6 /* <input> */, INPUT, Input, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 0, 0, 0, 0, 0)
171OPTION(0, 14 /* <unknown> */, UNKNOWN, Unknown, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 0, 0, 0, 0, 0)
172OPTION(1, 24 /* -aarch64-lfi-guard-elim */, anonymous_1, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 48, 0, 0, 0, 0)
173OPTION(1, 94 /* -aarch64-mark-bti-property */, anonymous_2, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 121, 0, 0, 0, 0)
174OPTION(1, 171 /* -aarch64-neon-syntax */, anonymous_0, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 192, 0, 248, 264, 0)
175#endif // OPTION
176
177#ifdef SIMPLE_ENUM_VALUE_TABLE
178
179struct SimpleEnumValue {
180 const char *Name;
181 unsigned Value;
182};
183
184struct SimpleEnumValueTable {
185 const SimpleEnumValue *Table;
186 unsigned Size;
187};
188static const SimpleEnumValueTable SimpleEnumValueTables[] = {};
189static const unsigned SimpleEnumValueTablesSize = std::size(SimpleEnumValueTables);
190#endif // SIMPLE_ENUM_VALUE_TABLE
191