clang 22.0.0git
DriverOptions.cpp
Go to the documentation of this file.
1//===--- DriverOptions.cpp - Driver Options Table -------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
10#include "llvm/Option/OptTable.h"
11#include <cassert>
12
13using namespace clang::options;
14using namespace llvm::opt;
15
16#define OPTTABLE_STR_TABLE_CODE
17#include "clang/Options/Options.inc"
18#undef OPTTABLE_STR_TABLE_CODE
19
20#define OPTTABLE_VALUES_CODE
21#include "clang/Options/Options.inc"
22#undef OPTTABLE_VALUES_CODE
23
24#define OPTTABLE_PREFIXES_TABLE_CODE
25#include "clang/Options/Options.inc"
26#undef OPTTABLE_PREFIXES_TABLE_CODE
27
28#define OPTTABLE_PREFIXES_UNION_CODE
29#include "clang/Options/Options.inc"
30#undef OPTTABLE_PREFIXES_UNION_CODE
31
32static constexpr OptTable::Info InfoTable[] = {
33#define OPTION(...) LLVM_CONSTRUCT_OPT_INFO(__VA_ARGS__),
34#include "clang/Options/Options.inc"
35#undef OPTION
36};
37
38namespace {
39
40class DriverOptTable : public PrecomputedOptTable {
41public:
42 DriverOptTable()
43 : PrecomputedOptTable(OptionStrTable, OptionPrefixesTable, InfoTable,
44 OptionPrefixesUnion) {}
45};
46} // anonymous namespace
47
48const llvm::opt::OptTable &clang::getDriverOptTable() {
49 static DriverOptTable Table;
50 return Table;
51}
static constexpr OptTable::Info InfoTable[]
const llvm::opt::OptTable & getDriverOptTable()