1 //===--- DriverOptions.cpp - Driver Options Table -------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #include "clang/Driver/Options.h"
11 #include "clang/Driver/OptTable.h"
12 #include "clang/Driver/Option.h"
14 using namespace clang::driver;
15 using namespace clang::driver::options;
17 #define PREFIX(NAME, VALUE) const char *const NAME[] = VALUE;
18 #define OPTION(PREFIX, NAME, ID, KIND, GROUP, ALIAS, FLAGS, PARAM, \
20 #include "clang/Driver/Options.inc"
24 static const OptTable::Info InfoTable[] = {
25 #define PREFIX(NAME, VALUE)
26 #define OPTION(PREFIX, NAME, ID, KIND, GROUP, ALIAS, FLAGS, PARAM, \
28 { PREFIX, NAME, HELPTEXT, METAVAR, OPT_##ID, Option::KIND##Class, PARAM, \
29 FLAGS, OPT_##GROUP, OPT_##ALIAS },
30 #include "clang/Driver/Options.inc"
35 class DriverOptTable : public OptTable {
38 : OptTable(InfoTable, sizeof(InfoTable) / sizeof(InfoTable[0])) {}
43 OptTable *clang::driver::createDriverOptTable() {
44 return new DriverOptTable();