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