Daniel Dunbar | 41b5b17 | 2010-05-20 17:49:16 +0000 | [diff] [blame] | 1 | //===--- CC1Options.cpp - Clang CC1 Options Table -------------------------===// |
Daniel Dunbar | 8adfcff | 2009-11-19 07:19:04 +0000 | [diff] [blame] | 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/CC1Options.h" |
Daniel Dunbar | 8adfcff | 2009-11-19 07:19:04 +0000 | [diff] [blame] | 11 | #include "clang/Driver/Option.h" |
Daniel Dunbar | 56ac85c | 2009-12-01 03:16:53 +0000 | [diff] [blame] | 12 | #include "clang/Driver/OptTable.h" |
Daniel Dunbar | 9e61240 | 2009-11-29 21:52:53 +0000 | [diff] [blame] | 13 | using namespace clang; |
Daniel Dunbar | 8adfcff | 2009-11-19 07:19:04 +0000 | [diff] [blame] | 14 | using namespace clang::driver; |
| 15 | using namespace clang::driver::options; |
| 16 | using namespace clang::driver::cc1options; |
| 17 | |
Nuno Lopes | 2550d70 | 2009-12-23 17:49:57 +0000 | [diff] [blame] | 18 | static const OptTable::Info CC1InfoTable[] = { |
Daniel Dunbar | 8adfcff | 2009-11-19 07:19:04 +0000 | [diff] [blame] | 19 | #define OPTION(NAME, ID, KIND, GROUP, ALIAS, FLAGS, PARAM, \ |
| 20 | HELPTEXT, METAVAR) \ |
| 21 | { NAME, HELPTEXT, METAVAR, Option::KIND##Class, FLAGS, PARAM, \ |
| 22 | OPT_##GROUP, OPT_##ALIAS }, |
| 23 | #include "clang/Driver/CC1Options.inc" |
| 24 | }; |
| 25 | |
| 26 | namespace { |
| 27 | |
| 28 | class CC1OptTable : public OptTable { |
| 29 | public: |
| 30 | CC1OptTable() |
| 31 | : OptTable(CC1InfoTable, sizeof(CC1InfoTable) / sizeof(CC1InfoTable[0])) {} |
| 32 | }; |
| 33 | |
| 34 | } |
| 35 | |
| 36 | OptTable *clang::driver::createCC1OptTable() { |
| 37 | return new CC1OptTable(); |
| 38 | } |