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 "llvm/ADT/STLExtras.h"
12 #include "llvm/Option/OptTable.h"
13 #include "llvm/Option/Option.h"
15 using namespace clang::driver;
16 using namespace clang::driver::options;
17 using namespace llvm::opt;
19 #define PREFIX(NAME, VALUE) static const char *const NAME[] = VALUE;
20 #include "clang/Driver/Options.inc"
23 static const OptTable::Info InfoTable[] = {
24 #define OPTION(PREFIX, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, \
26 { PREFIX, NAME, HELPTEXT, METAVAR, OPT_##ID, Option::KIND##Class, PARAM, \
27 FLAGS, OPT_##GROUP, OPT_##ALIAS, ALIASARGS },
28 #include "clang/Driver/Options.inc"
34 class DriverOptTable : public OptTable {
37 : OptTable(InfoTable, llvm::array_lengthof(InfoTable)) {}
42 OptTable *clang::driver::createDriverOptTable() {
43 return new DriverOptTable();