[llvm] r187546 - Option parsing: remove non-SUPPORT_ALIASARGS fall-back

Hans Wennborg hans at hanshq.net
Wed Jul 31 16:28:51 PDT 2013


Author: hans
Date: Wed Jul 31 18:28:51 2013
New Revision: 187546

URL: http://llvm.org/viewvc/llvm-project?rev=187546&view=rev
Log:
Option parsing: remove non-SUPPORT_ALIASARGS fall-back

The clients of this code have been updated to all support AliasArgs.

This depends on Clang r187538 and lld r187541.

Modified:
    llvm/trunk/unittests/Option/OptionParsingTest.cpp
    llvm/trunk/utils/TableGen/OptParserEmitter.cpp

Modified: llvm/trunk/unittests/Option/OptionParsingTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Option/OptionParsingTest.cpp?rev=187546&r1=187545&r2=187546&view=diff
==============================================================================
--- llvm/trunk/unittests/Option/OptionParsingTest.cpp (original)
+++ llvm/trunk/unittests/Option/OptionParsingTest.cpp Wed Jul 31 18:28:51 2013
@@ -17,8 +17,6 @@
 using namespace llvm;
 using namespace llvm::opt;
 
-#define SUPPORT_ALIASARGS // FIXME: Remove when no longer necessary.
-
 enum ID {
   OPT_INVALID = 0, // This is not an option ID.
 #define OPTION(PREFIX, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, \

Modified: llvm/trunk/utils/TableGen/OptParserEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/OptParserEmitter.cpp?rev=187546&r1=187545&r2=187546&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/OptParserEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/OptParserEmitter.cpp Wed Jul 31 18:28:51 2013
@@ -152,22 +152,11 @@ void EmitOptParser(RecordKeeper &Records
   OS << "/////////\n";
   OS << "// Groups\n\n";
   OS << "#ifdef OPTION\n";
-
-  // FIXME: Remove when option parsing clients are updated.
-  OS << "#ifdef SUPPORT_ALIASARGS\n";
-  OS << "#define OPTIONX OPTION\n";
-  OS << "#else\n";
-  OS << "#define OPTIONX(prefix, name, id, kind, group, alias, aliasargs, "
-     << "flags, param, helptext, metavar) "
-     << "OPTION(prefix, name, id, kind, "
-     << "group, alias, flags, param, helptext, metavar)\n";
-  OS << "#endif\n";
-
   for (unsigned i = 0, e = Groups.size(); i != e; ++i) {
     const Record &R = *Groups[i];
 
     // Start a single option entry.
-    OS << "OPTIONX(";
+    OS << "OPTION(";
 
     // The option prefix;
     OS << "0";
@@ -210,7 +199,7 @@ void EmitOptParser(RecordKeeper &Records
     const Record &R = *Opts[i];
 
     // Start a single option entry.
-    OS << "OPTIONX(";
+    OS << "OPTION(";
 
     // The option prefix;
     std::vector<std::string> prf = R.getValueAsListOfStrings("Prefixes");
@@ -287,7 +276,6 @@ void EmitOptParser(RecordKeeper &Records
 
     OS << ")\n";
   }
-  OS << "#undef OPTIONX\n"; // FIXME: Remove when option clients are updated.
   OS << "#endif\n";
 }
 } // end namespace llvm





More information about the llvm-commits mailing list