clang 20.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::driver;
14using namespace clang::driver::options;
15using namespace llvm::opt;
16
17#define OPTTABLE_STR_TABLE_CODE
18#include "clang/Driver/Options.inc"
19#undef OPTTABLE_STR_TABLE_CODE
20
21#define OPTTABLE_VALUES_CODE
22#include "clang/Driver/Options.inc"
23#undef OPTTABLE_VALUES_CODE
24
25#define OPTTABLE_PREFIXES_TABLE_CODE
26#include "clang/Driver/Options.inc"
27#undef OPTTABLE_PREFIXES_TABLE_CODE
28
29#define OPTTABLE_PREFIXES_UNION_CODE
30#include "clang/Driver/Options.inc"
31#undef OPTTABLE_PREFIXES_UNION_CODE
32
33static constexpr OptTable::Info InfoTable[] = {
34#define OPTION(...) LLVM_CONSTRUCT_OPT_INFO(__VA_ARGS__),
35#include "clang/Driver/Options.inc"
36#undef OPTION
37};
38
39namespace {
40
41class DriverOptTable : public PrecomputedOptTable {
42public:
43 DriverOptTable()
44 : PrecomputedOptTable(OptionStrTable, OptionPrefixesTable, InfoTable,
45 OptionPrefixesUnion) {}
46};
47}
48
49const llvm::opt::OptTable &clang::driver::getDriverOptTable() {
50 static DriverOptTable Table;
51 return Table;
52}
static constexpr OptTable::Info InfoTable[]
const llvm::opt::OptTable & getDriverOptTable()