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_xcore_max_threads,
19};
20} // namespace
21
22static llvm::opt::OptTable::Tables optionTables() {
23 using llvm::opt::DefaultVis, llvm::opt::HelpHidden,
24 llvm::opt::RenderAsInput, llvm::opt::RenderJoined,
25 llvm::opt::RenderSeparate;
26
27#ifdef __GNUC__
28#pragma GCC diagnostic push
29#pragma GCC diagnostic ignored "-Woverlength-strings"
30#endif
31static constexpr char OptionStrTableStorage[] =
32 "\0"
33 "-\0"
34 "--\0"
35 "<input>\0"
36 "<unknown>\0"
37 "-xcore-max-threads\0"
38 "Maximum number of threads (for emulation thread-local storage)\0"
39 ;
40#ifdef __GNUC__
41#pragma GCC diagnostic pop
42#endif
43
44static constexpr llvm::StringTable
45OptionStrTable = OptionStrTableStorage;
46
47 static constexpr llvm::StringTable::Offset OptionPrefixesTable[] = {
48 0 /* prefixes */,
49 2 /* prefixes */, 1 /* '-' */, 3 /* '--' */
50 };
51
52 static constexpr llvm::opt::OptTable::HelpTextVariant OptionHelpTextVariantsTable[] = {
53 {0, 0},
54 };
55
56 static constexpr unsigned OptionSubCommandIDsTable[] = {
57 0 /* subcommands */
58 };
59
60 static constexpr llvm::opt::OptTable::InfoExtra OptionInfoExtrasTable[] = {
61 {0, 0, 0, 0, 0, 0, 0, 0},
62 {0, 0, 0, 0, static_cast<unsigned>(DefaultVis), 0, 0, 0},
63 };
64
65 static constexpr llvm::opt::OptTable::Info OptionInfoTable[] = {
66 {6 /* <input> */, 0, 0, 0, 1, 0, llvm::opt::Option::InputClass},
67 {14 /* <unknown> */, 0, 0, 0, 1, 0, llvm::opt::Option::UnknownClass},
68 {24 /* -xcore-max-threads */, 43, 0, 0, 1, 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#include "llvm/Support/LibraryOptionsContext.h"
85
86namespace llvm {
87namespace opt {
88class Arg;
89class LibraryOptionsParser;
90class OptTable;
91} // namespace opt
92} // namespace llvm
93
94namespace llvm {
95struct XCoreOptions {
96 unsigned max_threads{8};
97
98 static const llvm::opt::OptTable &optTable();
99 /// Sets the member that \p A names, allocating a list from \p Alloc.
100 /// Returns false if the value is invalid.
101 bool apply(const llvm::opt::Arg &A, llvm::BumpPtrAllocator &Alloc);
102
103private:
104 friend class llvm::cl::LibraryOptionsContext;
105 friend class llvm::opt::LibraryOptionsParser;
106
107 static const XCoreOptions Default;
108};
109} // namespace llvm
110#endif // OPTIONS_STRUCT_DECL
111
112#ifdef OPTIONS_STRUCT_DEFS
113#undef OPTIONS_STRUCT_DEFS
114LLVM_REQUIRE_CONSTANT_INITIALIZATION const llvm::XCoreOptions llvm::XCoreOptions::Default;
115
116const llvm::opt::OptTable &llvm::XCoreOptions::optTable() {
117 static const llvm::opt::LibraryOptTable T(optionTables());
118 return T;
119}
120
121bool llvm::XCoreOptions::apply(const llvm::opt::Arg &A, llvm::BumpPtrAllocator &Alloc) {
122 switch (A.getOption().getID()) {
123 case OPT_xcore_max_threads:
124 return llvm::opt::parseArgValue(A.getValue(), max_threads, Alloc);
125 }
126 llvm_unreachable("option without a member");
127}
128#endif // OPTIONS_STRUCT_DEFS
129/////////
130// ValuesCode
131
132#ifdef OPTTABLE_VALUES_CODE
133static llvm::StringRef getOptionValuesCode(unsigned ID) {
134 switch (ID) {
135 }
136 return {};
137}
138#undef OPTTABLE_VALUES_CODE
139#endif // OPTTABLE_VALUES_CODE
140/////////
141// Groups
142
143#ifdef OPTION
144
145//////////
146// Options
147
148OPTION(0, 6 /* <input> */, INPUT, Input, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 0, 0, 0, 0, 0)
149OPTION(0, 14 /* <unknown> */, UNKNOWN, Unknown, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 0, 0, 0, 0, 0)
150OPTION(1, 24 /* -xcore-max-threads */, anonymous_0, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 43, 0, 0, 0, 0)
151#endif // OPTION
152
153#ifdef SIMPLE_ENUM_VALUE_TABLE
154
155struct SimpleEnumValue {
156 const char *Name;
157 unsigned Value;
158};
159
160struct SimpleEnumValueTable {
161 const SimpleEnumValue *Table;
162 unsigned Size;
163};
164static const SimpleEnumValueTable SimpleEnumValueTables[] = {};
165static const unsigned SimpleEnumValueTablesSize = std::size(SimpleEnumValueTables);
166#endif // SIMPLE_ENUM_VALUE_TABLE
167