Daniel Dunbar | 41b5b17 | 2010-05-20 17:49:16 +0000 | [diff] [blame] | 1 | //===--- CC1AsOptions.cpp - Clang Assembler 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/CC1AsOptions.h" |
Craig Topper | b960232 | 2013-07-15 03:38:40 +0000 | [diff] [blame] | 11 | #include "llvm/ADT/STLExtras.h" |
Reid Kleckner | b1e25a1 | 2013-06-14 17:17:23 +0000 | [diff] [blame] | 12 | #include "llvm/Option/OptTable.h" |
| 13 | #include "llvm/Option/Option.h" |
Daniel Dunbar | 41b5b17 | 2010-05-20 17:49:16 +0000 | [diff] [blame] | 14 | using namespace clang; |
| 15 | using namespace clang::driver; |
Reid Kleckner | b1e25a1 | 2013-06-14 17:17:23 +0000 | [diff] [blame] | 16 | using namespace llvm::opt; |
Daniel Dunbar | 41b5b17 | 2010-05-20 17:49:16 +0000 | [diff] [blame] | 17 | using namespace clang::driver::cc1asoptions; |
| 18 | |
Hans Wennborg | b17a2c1 | 2013-07-17 16:54:06 +0000 | [diff] [blame] | 19 | #define PREFIX(NAME, VALUE) static const char *const NAME[] = VALUE; |
Michael J. Spencer | c635710 | 2012-10-22 22:13:48 +0000 | [diff] [blame] | 20 | #include "clang/Driver/CC1AsOptions.inc" |
Michael J. Spencer | c635710 | 2012-10-22 22:13:48 +0000 | [diff] [blame] | 21 | #undef PREFIX |
| 22 | |
Daniel Dunbar | 41b5b17 | 2010-05-20 17:49:16 +0000 | [diff] [blame] | 23 | static const OptTable::Info CC1AsInfoTable[] = { |
Hans Wennborg | 4382928 | 2013-07-31 23:07:21 +0000 | [diff] [blame] | 24 | #define OPTION(PREFIX, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, \ |
Daniel Dunbar | 41b5b17 | 2010-05-20 17:49:16 +0000 | [diff] [blame] | 25 | HELPTEXT, METAVAR) \ |
Michael J. Spencer | c635710 | 2012-10-22 22:13:48 +0000 | [diff] [blame] | 26 | { PREFIX, NAME, HELPTEXT, METAVAR, OPT_##ID, Option::KIND##Class, PARAM, \ |
Hans Wennborg | 4382928 | 2013-07-31 23:07:21 +0000 | [diff] [blame] | 27 | FLAGS, OPT_##GROUP, OPT_##ALIAS, ALIASARGS }, |
Daniel Dunbar | 41b5b17 | 2010-05-20 17:49:16 +0000 | [diff] [blame] | 28 | #include "clang/Driver/CC1AsOptions.inc" |
Hans Wennborg | b17a2c1 | 2013-07-17 16:54:06 +0000 | [diff] [blame] | 29 | #undef OPTION |
Daniel Dunbar | 41b5b17 | 2010-05-20 17:49:16 +0000 | [diff] [blame] | 30 | }; |
| 31 | |
| 32 | namespace { |
| 33 | |
| 34 | class CC1AsOptTable : public OptTable { |
| 35 | public: |
| 36 | CC1AsOptTable() |
Craig Topper | b960232 | 2013-07-15 03:38:40 +0000 | [diff] [blame] | 37 | : OptTable(CC1AsInfoTable, llvm::array_lengthof(CC1AsInfoTable)) {} |
Daniel Dunbar | 41b5b17 | 2010-05-20 17:49:16 +0000 | [diff] [blame] | 38 | }; |
| 39 | |
| 40 | } |
| 41 | |
| 42 | OptTable *clang::driver::createCC1AsOptTable() { |
| 43 | return new CC1AsOptTable(); |
| 44 | } |