blob: 0bf7303aca72664d4181b6f93222a34ff0577bcf [file] [log] [blame]
Nick Lewycky6da90772010-12-31 17:31:54 +00001//===--- DriverOptions.cpp - Driver Options Table -------------------------===//
Daniel Dunbaraa767372009-11-19 00:15:11 +00002//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10#include "clang/Driver/Options.h"
Reid Kleckner898229a2013-06-14 17:17:23 +000011#include "llvm/Option/OptTable.h"
12#include "llvm/Option/Option.h"
Daniel Dunbaraa767372009-11-19 00:15:11 +000013
14using namespace clang::driver;
15using namespace clang::driver::options;
Reid Kleckner898229a2013-06-14 17:17:23 +000016using namespace llvm::opt;
Daniel Dunbaraa767372009-11-19 00:15:11 +000017
Michael J. Spencer929fccd2012-10-22 22:13:48 +000018#define PREFIX(NAME, VALUE) const char *const NAME[] = VALUE;
19#define OPTION(PREFIX, NAME, ID, KIND, GROUP, ALIAS, FLAGS, PARAM, \
20 HELPTEXT, METAVAR)
21#include "clang/Driver/Options.inc"
22#undef OPTION
23#undef PREFIX
24
Nuno Lopes221c1fd2009-12-10 00:07:02 +000025static const OptTable::Info InfoTable[] = {
Michael J. Spencer929fccd2012-10-22 22:13:48 +000026#define PREFIX(NAME, VALUE)
27#define OPTION(PREFIX, NAME, ID, KIND, GROUP, ALIAS, FLAGS, PARAM, \
Daniel Dunbaraa767372009-11-19 00:15:11 +000028 HELPTEXT, METAVAR) \
Michael J. Spencer929fccd2012-10-22 22:13:48 +000029 { PREFIX, NAME, HELPTEXT, METAVAR, OPT_##ID, Option::KIND##Class, PARAM, \
30 FLAGS, OPT_##GROUP, OPT_##ALIAS },
Daniel Dunbar46fffee2009-11-19 01:03:50 +000031#include "clang/Driver/Options.inc"
Daniel Dunbaraa767372009-11-19 00:15:11 +000032};
33
34namespace {
35
36class DriverOptTable : public OptTable {
37public:
38 DriverOptTable()
39 : OptTable(InfoTable, sizeof(InfoTable) / sizeof(InfoTable[0])) {}
40};
41
42}
43
44OptTable *clang::driver::createDriverOptTable() {
45 return new DriverOptTable();
46}