blob: 3925b8aa35c5338b3a63652857394bbd42220b1d [file] [log] [blame]
Nick Lewycky3fdcc6f2010-12-31 17:31:54 +00001//===--- DriverOptions.cpp - Driver Options Table -------------------------===//
Daniel Dunbar27e738d2009-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"
11#include "clang/Driver/OptTable.h"
12#include "clang/Driver/Option.h"
13
14using namespace clang::driver;
15using namespace clang::driver::options;
16
Michael J. Spencerc6357102012-10-22 22:13:48 +000017#define PREFIX(NAME, VALUE) const char *const NAME[] = VALUE;
18#define OPTION(PREFIX, NAME, ID, KIND, GROUP, ALIAS, FLAGS, PARAM, \
19 HELPTEXT, METAVAR)
20#include "clang/Driver/Options.inc"
21#undef OPTION
22#undef PREFIX
23
Nuno Lopes68f7a242009-12-10 00:07:02 +000024static const OptTable::Info InfoTable[] = {
Michael J. Spencerc6357102012-10-22 22:13:48 +000025#define PREFIX(NAME, VALUE)
26#define OPTION(PREFIX, NAME, ID, KIND, GROUP, ALIAS, FLAGS, PARAM, \
Daniel Dunbar27e738d2009-11-19 00:15:11 +000027 HELPTEXT, METAVAR) \
Michael J. Spencerc6357102012-10-22 22:13:48 +000028 { PREFIX, NAME, HELPTEXT, METAVAR, OPT_##ID, Option::KIND##Class, PARAM, \
29 FLAGS, OPT_##GROUP, OPT_##ALIAS },
Daniel Dunbar64bdce32009-11-19 01:03:50 +000030#include "clang/Driver/Options.inc"
Daniel Dunbar27e738d2009-11-19 00:15:11 +000031};
32
33namespace {
34
35class DriverOptTable : public OptTable {
36public:
37 DriverOptTable()
38 : OptTable(InfoTable, sizeof(InfoTable) / sizeof(InfoTable[0])) {}
39};
40
41}
42
43OptTable *clang::driver::createDriverOptTable() {
44 return new DriverOptTable();
45}