Daniel Dunbar | 27e738d | 2009-11-19 00:15:11 +0000 | [diff] [blame] | 1 | //===--- DriverOptions.cpp - Driver Options Table -----------------------*-===// |
| 2 | // |
| 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 | |
| 14 | using namespace clang::driver; |
| 15 | using namespace clang::driver::options; |
| 16 | |
| 17 | static OptTable::Info InfoTable[] = { |
| 18 | // The InputOption info |
| 19 | { "<input>", 0, 0, Option::InputClass, DriverOption, 0, OPT_INVALID, OPT_INVALID }, |
| 20 | // The UnknownOption info |
| 21 | { "<unknown>", 0, 0, Option::UnknownClass, 0, 0, OPT_INVALID, OPT_INVALID }, |
| 22 | |
| 23 | #define OPTION(NAME, ID, KIND, GROUP, ALIAS, FLAGS, PARAM, \ |
| 24 | HELPTEXT, METAVAR) \ |
| 25 | { NAME, HELPTEXT, METAVAR, Option::KIND##Class, FLAGS, PARAM, \ |
| 26 | OPT_##GROUP, OPT_##ALIAS }, |
Daniel Dunbar | 64bdce3 | 2009-11-19 01:03:50 +0000 | [diff] [blame^] | 27 | #include "clang/Driver/Options.inc" |
Daniel Dunbar | 27e738d | 2009-11-19 00:15:11 +0000 | [diff] [blame] | 28 | }; |
| 29 | |
| 30 | namespace { |
| 31 | |
| 32 | class DriverOptTable : public OptTable { |
| 33 | public: |
| 34 | DriverOptTable() |
| 35 | : OptTable(InfoTable, sizeof(InfoTable) / sizeof(InfoTable[0])) {} |
| 36 | }; |
| 37 | |
| 38 | } |
| 39 | |
| 40 | OptTable *clang::driver::createDriverOptTable() { |
| 41 | return new DriverOptTable(); |
| 42 | } |