blob: 715819d04b26dabf5a39188ec8cf8788d02f768c [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
Nuno Lopes68f7a242009-12-10 00:07:02 +000017static const OptTable::Info InfoTable[] = {
Daniel Dunbar27e738d2009-11-19 00:15:11 +000018#define OPTION(NAME, ID, KIND, GROUP, ALIAS, FLAGS, PARAM, \
19 HELPTEXT, METAVAR) \
Benjamin Kramerf634bce2011-10-22 15:40:28 +000020 { NAME, HELPTEXT, METAVAR, Option::KIND##Class, PARAM, FLAGS, \
Daniel Dunbar27e738d2009-11-19 00:15:11 +000021 OPT_##GROUP, OPT_##ALIAS },
Daniel Dunbar64bdce32009-11-19 01:03:50 +000022#include "clang/Driver/Options.inc"
Daniel Dunbar27e738d2009-11-19 00:15:11 +000023};
24
25namespace {
26
27class DriverOptTable : public OptTable {
28public:
29 DriverOptTable()
30 : OptTable(InfoTable, sizeof(InfoTable) / sizeof(InfoTable[0])) {}
31};
32
33}
34
35OptTable *clang::driver::createDriverOptTable() {
36 return new DriverOptTable();
37}