llvm.org GIT mirror llvm / a15d5db
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187546 91177308-0d34-0410-b5e6-96231b3b80d8 Hans Wennborg 6 years ago
2 changed file(s) with 2 addition(s) and 16 deletion(s). Raw diff Collapse all Expand all
1515
1616 using namespace llvm;
1717 using namespace llvm::opt;
18
19 #define SUPPORT_ALIASARGS // FIXME: Remove when no longer necessary.
2018
2119 enum ID {
2220 OPT_INVALID = 0, // This is not an option ID.
151151 OS << "/////////\n";
152152 OS << "// Groups\n\n";
153153 OS << "#ifdef OPTION\n";
154
155 // FIXME: Remove when option parsing clients are updated.
156 OS << "#ifdef SUPPORT_ALIASARGS\n";
157 OS << "#define OPTIONX OPTION\n";
158 OS << "#else\n";
159 OS << "#define OPTIONX(prefix, name, id, kind, group, alias, aliasargs, "
160 << "flags, param, helptext, metavar) "
161 << "OPTION(prefix, name, id, kind, "
162 << "group, alias, flags, param, helptext, metavar)\n";
163 OS << "#endif\n";
164
165154 for (unsigned i = 0, e = Groups.size(); i != e; ++i) {
166155 const Record &R = *Groups[i];
167156
168157 // Start a single option entry.
169 OS << "OPTIONX(";
158 OS << "OPTION(";
170159
171160 // The option prefix;
172161 OS << "0";
209198 const Record &R = *Opts[i];
210199
211200 // Start a single option entry.
212 OS << "OPTIONX(";
201 OS << "OPTION(";
213202
214203 // The option prefix;
215204 std::vector prf = R.getValueAsListOfStrings("Prefixes");
286275
287276 OS << ")\n";
288277 }
289 OS << "#undef OPTIONX\n"; // FIXME: Remove when option clients are updated.
290278 OS << "#endif\n";
291279 }
292280 } // end namespace llvm