r187538 - Option parsing tables: pick up AliasArgs from the OPTION macro.

Hans Wennborg hans at hanshq.net
Wed Jul 31 16:07:21 PDT 2013


Author: hans
Date: Wed Jul 31 18:07:21 2013
New Revision: 187538

URL: http://llvm.org/viewvc/llvm-project?rev=187538&view=rev
Log:
Option parsing tables: pick up AliasArgs from the OPTION macro.

This depends on LLVM r187537.

The SUPPORT_ALIASARGS macro will be removed once all option parsing
clients have been updated.

Modified:
    cfe/trunk/include/clang/Driver/CC1AsOptions.h
    cfe/trunk/include/clang/Driver/Options.h
    cfe/trunk/lib/Driver/CC1AsOptions.cpp
    cfe/trunk/lib/Driver/DriverOptions.cpp

Modified: cfe/trunk/include/clang/Driver/CC1AsOptions.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/CC1AsOptions.h?rev=187538&r1=187537&r2=187538&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/CC1AsOptions.h (original)
+++ cfe/trunk/include/clang/Driver/CC1AsOptions.h Wed Jul 31 18:07:21 2013
@@ -22,10 +22,12 @@ namespace driver {
 namespace cc1asoptions {
   enum ID {
     OPT_INVALID = 0, // This is not an option ID.
-#define OPTION(PREFIX, NAME, ID, KIND, GROUP, ALIAS, FLAGS, PARAM, \
+#define OPTION(PREFIX, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, \
                HELPTEXT, METAVAR) OPT_##ID,
+#define SUPPORT_ALIASARGS // FIXME: Remove when LLVM is updated.
 #include "clang/Driver/CC1AsOptions.inc"
     LastOption
+#undef SUPPORT_ALIASARGS
 #undef OPTION
   };
 }

Modified: cfe/trunk/include/clang/Driver/Options.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.h?rev=187538&r1=187537&r2=187538&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/Options.h (original)
+++ cfe/trunk/include/clang/Driver/Options.h Wed Jul 31 18:07:21 2013
@@ -35,10 +35,12 @@ enum ClangFlags {
 
 enum ID {
     OPT_INVALID = 0, // This is not an option ID.
-#define OPTION(PREFIX, NAME, ID, KIND, GROUP, ALIAS, FLAGS, PARAM, \
+#define OPTION(PREFIX, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, \
                HELPTEXT, METAVAR) OPT_##ID,
+#define SUPPORT_ALIASARGS // FIXME: Remove when LLVM is updated.
 #include "clang/Driver/Options.inc"
     LastOption
+#undef SUPPORT_ALIASARGS
 #undef OPTION
   };
 }

Modified: cfe/trunk/lib/Driver/CC1AsOptions.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/CC1AsOptions.cpp?rev=187538&r1=187537&r2=187538&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/CC1AsOptions.cpp (original)
+++ cfe/trunk/lib/Driver/CC1AsOptions.cpp Wed Jul 31 18:07:21 2013
@@ -21,11 +21,13 @@ using namespace clang::driver::cc1asopti
 #undef PREFIX
 
 static const OptTable::Info CC1AsInfoTable[] = {
-#define OPTION(PREFIX, NAME, ID, KIND, GROUP, ALIAS, FLAGS, PARAM, \
+#define OPTION(PREFIX, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, \
                HELPTEXT, METAVAR)   \
   { PREFIX, NAME, HELPTEXT, METAVAR, OPT_##ID, Option::KIND##Class, PARAM, \
-    FLAGS, OPT_##GROUP, OPT_##ALIAS },
+    FLAGS, OPT_##GROUP, OPT_##ALIAS, ALIASARGS },
+#define SUPPORT_ALIASARGS // FIXME: Remove when LLVM is updated.
 #include "clang/Driver/CC1AsOptions.inc"
+#undef SUPPORT_ALIASARGS
 #undef OPTION
 };
 

Modified: cfe/trunk/lib/Driver/DriverOptions.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/DriverOptions.cpp?rev=187538&r1=187537&r2=187538&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/DriverOptions.cpp (original)
+++ cfe/trunk/lib/Driver/DriverOptions.cpp Wed Jul 31 18:07:21 2013
@@ -21,11 +21,13 @@ using namespace llvm::opt;
 #undef PREFIX
 
 static const OptTable::Info InfoTable[] = {
-#define OPTION(PREFIX, NAME, ID, KIND, GROUP, ALIAS, FLAGS, PARAM, \
+#define OPTION(PREFIX, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, \
                HELPTEXT, METAVAR)   \
   { PREFIX, NAME, HELPTEXT, METAVAR, OPT_##ID, Option::KIND##Class, PARAM, \
-    FLAGS, OPT_##GROUP, OPT_##ALIAS },
+    FLAGS, OPT_##GROUP, OPT_##ALIAS, ALIASARGS },
+#define SUPPORT_ALIASARGS // FIXME: Remove when LLVM is updated.
 #include "clang/Driver/Options.inc"
+#undef SUPPORT_ALIASARGS
 #undef OPTION
 };
 





More information about the cfe-commits mailing list