| 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) |
| 13 | namespace { |
| 14 | enum ID : unsigned { |
| 15 | OPT_INVALID = 0, |
| 16 | OPT_INPUT, |
| 17 | OPT_UNKNOWN, |
| 18 | OPT_disable_ondemand_mds_loading, |
| 19 | OPT_expand_constant_exprs, |
| 20 | OPT_import_full_type_definitions, |
| 21 | OPT_ondemand_mds_loading, |
| 22 | }; |
| 23 | } // namespace |
| 24 | |
| 25 | static llvm::opt::OptTable::Tables optionTables() { |
| 26 | using llvm::opt::DefaultVis, llvm::opt::HelpHidden, |
| 27 | llvm::opt::RenderAsInput, llvm::opt::RenderJoined, |
| 28 | llvm::opt::RenderSeparate; |
| 29 | |
| 30 | #ifdef __GNUC__ |
| 31 | #pragma GCC diagnostic push |
| 32 | #pragma GCC diagnostic ignored "-Woverlength-strings" |
| 33 | #endif |
| 34 | static constexpr char OptionStrTableStorage[] = |
| 35 | "\0" |
| 36 | "-\0" |
| 37 | "--\0" |
| 38 | "<input>\0" |
| 39 | "<unknown>\0" |
| 40 | "-disable-ondemand-mds-loading\0" |
| 41 | "false\0" |
| 42 | "\0" |
| 43 | "-expand-constant-exprs\0" |
| 44 | "Expand constant expressions to instructions for testing purposes\0" |
| 45 | "-import-full-type-definitions\0" |
| 46 | "Import full type definitions for ThinLTO\0" |
| 47 | "-ondemand-mds-loading\0" |
| 48 | "Lazy-load metadata on demand when loading bitcode for importing\0" |
| 49 | ; |
| 50 | #ifdef __GNUC__ |
| 51 | #pragma GCC diagnostic pop |
| 52 | #endif |
| 53 | |
| 54 | static constexpr llvm::StringTable |
| 55 | OptionStrTable = OptionStrTableStorage; |
| 56 | |
| 57 | static constexpr llvm::StringTable::Offset OptionPrefixesTable[] = { |
| 58 | 0 /* prefixes */, |
| 59 | 2 /* prefixes */, 1 /* '-' */, 3 /* '--' */ |
| 60 | }; |
| 61 | |
| 62 | static constexpr llvm::opt::OptTable::HelpTextVariant OptionHelpTextVariantsTable[] = { |
| 63 | {0, 0}, |
| 64 | }; |
| 65 | |
| 66 | static constexpr unsigned OptionSubCommandIDsTable[] = { |
| 67 | 0 /* subcommands */ |
| 68 | }; |
| 69 | |
| 70 | static constexpr llvm::opt::OptTable::InfoExtra OptionInfoExtrasTable[] = { |
| 71 | {0, 0, 0, 0, 0, 0, 0, 0}, |
| 72 | {0, 0, 0, 0, static_cast<unsigned>(DefaultVis), 0, 0, 0}, |
| 73 | {0, 54, 0, 0, static_cast<unsigned>(DefaultVis), 0, 0, 0}, |
| 74 | }; |
| 75 | |
| 76 | static constexpr llvm::opt::OptTable::Info OptionInfoTable[] = { |
| 77 | {6 /* <input> */, 0, 0, 0, 1, 0, llvm::opt::Option::InputClass}, |
| 78 | {14 /* <unknown> */, 0, 0, 0, 1, 0, llvm::opt::Option::UnknownClass}, |
| 79 | {24 /* -disable-ondemand-mds-loading */, 0, 0, OPT_ondemand_mds_loading, 2, 1, llvm::opt::Option::FlagClass}, |
| 80 | {61 /* -expand-constant-exprs */, 84, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass}, |
| 81 | {149 /* -import-full-type-definitions */, 179, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass}, |
| 82 | {220 /* -ondemand-mds-loading */, 242, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass}, |
| 83 | }; |
| 84 | |
| 85 | return {OptionStrTable, OptionPrefixesTable, |
| 86 | OptionInfoTable, OptionInfoExtrasTable, OptionHelpTextVariantsTable, {}, OptionSubCommandIDsTable}; |
| 87 | } |
| 88 | #undef OPTTABLE_CODE |
| 89 | #endif // OPTTABLE_CODE || OPTIONS_STRUCT_DEFS |
| 90 | |
| 91 | |
| 92 | #ifdef OPTIONS_STRUCT_DECL |
| 93 | #undef OPTIONS_STRUCT_DECL |
| 94 | #include "llvm/ADT/ArrayRef.h" |
| 95 | #include "llvm/ADT/BoolOrDefault.h" |
| 96 | #include "llvm/ADT/StringRef.h" |
| 97 | #include "llvm/Support/Allocator.h" |
| 98 | #include "llvm/Support/LibraryOptionsContext.h" |
| 99 | |
| 100 | namespace llvm { |
| 101 | namespace opt { |
| 102 | class Arg; |
| 103 | class LibraryOptionsParser; |
| 104 | class OptTable; |
| 105 | } // namespace opt |
| 106 | } // namespace llvm |
| 107 | |
| 108 | namespace llvm { |
| 109 | struct BitReaderOptions { |
| 110 | bool expand_constant_exprs{false}; |
| 111 | bool import_full_type_definitions{false}; |
| 112 | bool ondemand_mds_loading{true}; |
| 113 | |
| 114 | static const llvm::opt::OptTable &optTable(); |
| 115 | /// Sets the member that \p A names, allocating a list from \p Alloc. |
| 116 | /// Returns false if the value is invalid. |
| 117 | bool apply(const llvm::opt::Arg &A, llvm::BumpPtrAllocator &Alloc); |
| 118 | |
| 119 | private: |
| 120 | friend class llvm::cl::LibraryOptionsContext; |
| 121 | friend class llvm::opt::LibraryOptionsParser; |
| 122 | |
| 123 | static const BitReaderOptions Default; |
| 124 | }; |
| 125 | } // namespace llvm |
| 126 | #endif // OPTIONS_STRUCT_DECL |
| 127 | |
| 128 | #ifdef OPTIONS_STRUCT_DEFS |
| 129 | #undef OPTIONS_STRUCT_DEFS |
| 130 | LLVM_REQUIRE_CONSTANT_INITIALIZATION const llvm::BitReaderOptions llvm::BitReaderOptions::Default; |
| 131 | |
| 132 | const llvm::opt::OptTable &llvm::BitReaderOptions::optTable() { |
| 133 | static const llvm::opt::LibraryOptTable T(optionTables()); |
| 134 | return T; |
| 135 | } |
| 136 | |
| 137 | bool llvm::BitReaderOptions::apply(const llvm::opt::Arg &A, llvm::BumpPtrAllocator &Alloc) { |
| 138 | switch (A.getOption().getID()) { |
| 139 | case OPT_expand_constant_exprs: |
| 140 | return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true" , expand_constant_exprs, Alloc); |
| 141 | case OPT_import_full_type_definitions: |
| 142 | return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true" , import_full_type_definitions, Alloc); |
| 143 | case OPT_ondemand_mds_loading: |
| 144 | return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true" , ondemand_mds_loading, Alloc); |
| 145 | } |
| 146 | llvm_unreachable("option without a member" ); |
| 147 | } |
| 148 | #endif // OPTIONS_STRUCT_DEFS |
| 149 | ///////// |
| 150 | // ValuesCode |
| 151 | |
| 152 | #ifdef OPTTABLE_VALUES_CODE |
| 153 | static llvm::StringRef getOptionValuesCode(unsigned ID) { |
| 154 | switch (ID) { |
| 155 | } |
| 156 | return {}; |
| 157 | } |
| 158 | #undef OPTTABLE_VALUES_CODE |
| 159 | #endif // OPTTABLE_VALUES_CODE |
| 160 | ///////// |
| 161 | // Groups |
| 162 | |
| 163 | #ifdef OPTION |
| 164 | |
| 165 | ////////// |
| 166 | // Options |
| 167 | |
| 168 | OPTION(0, 6 /* <input> */, INPUT, Input, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 0, 0, 0, 0, 0) |
| 169 | OPTION(0, 14 /* <unknown> */, UNKNOWN, Unknown, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 0, 0, 0, 0, 0) |
| 170 | OPTION(1, 24 /* -disable-ondemand-mds-loading */, anonymous_3, Flag, INVALID, INVALID, 54, 0, static_cast<unsigned>(DefaultVis), 0, 0, 0, 0, 0, 0) |
| 171 | OPTION(1, 61 /* -expand-constant-exprs */, anonymous_0, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 84, 0, 0, 0, 0) |
| 172 | OPTION(1, 149 /* -import-full-type-definitions */, anonymous_1, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 179, 0, 0, 0, 0) |
| 173 | OPTION(1, 220 /* -ondemand-mds-loading */, anonymous_2, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 242, 0, 0, 0, 0) |
| 174 | #endif // OPTION |
| 175 | |
| 176 | #ifdef SIMPLE_ENUM_VALUE_TABLE |
| 177 | |
| 178 | struct SimpleEnumValue { |
| 179 | const char *Name; |
| 180 | unsigned Value; |
| 181 | }; |
| 182 | |
| 183 | struct SimpleEnumValueTable { |
| 184 | const SimpleEnumValue *Table; |
| 185 | unsigned Size; |
| 186 | }; |
| 187 | static const SimpleEnumValueTable SimpleEnumValueTables[] = {}; |
| 188 | static const unsigned SimpleEnumValueTablesSize = std::size(SimpleEnumValueTables); |
| 189 | #endif // SIMPLE_ENUM_VALUE_TABLE |
| 190 | |