brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · d91e929 Raw
52 lines · cpp
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-exception6//7//===----------------------------------------------------------------------===//8 9#include "clang/Options/Options.h"10#include "llvm/Option/OptTable.h"11#include <cassert>12 13using namespace clang::options;14using namespace llvm::opt;15 16#define OPTTABLE_STR_TABLE_CODE17#include "clang/Options/Options.inc"18#undef OPTTABLE_STR_TABLE_CODE19 20#define OPTTABLE_VALUES_CODE21#include "clang/Options/Options.inc"22#undef OPTTABLE_VALUES_CODE23 24#define OPTTABLE_PREFIXES_TABLE_CODE25#include "clang/Options/Options.inc"26#undef OPTTABLE_PREFIXES_TABLE_CODE27 28#define OPTTABLE_PREFIXES_UNION_CODE29#include "clang/Options/Options.inc"30#undef OPTTABLE_PREFIXES_UNION_CODE31 32static constexpr OptTable::Info InfoTable[] = {33#define OPTION(...) LLVM_CONSTRUCT_OPT_INFO(__VA_ARGS__),34#include "clang/Options/Options.inc"35#undef OPTION36};37 38namespace {39 40class DriverOptTable : public PrecomputedOptTable {41public:42  DriverOptTable()43      : PrecomputedOptTable(OptionStrTable, OptionPrefixesTable, InfoTable,44                            OptionPrefixesUnion) {}45};46} // anonymous namespace47 48const llvm::opt::OptTable &clang::getDriverOptTable() {49  static DriverOptTable Table;50  return Table;51}52