Migrate to common OptTable macros

`OptTable` was a source of consistent churn due to new arguments to the
`OPTION` macro. LLVM 3f092f37b7362447cbb13f5502dae4bdd5762afd extracted
the handling of the common option parts (eg. an ID and an info) out into
separate macros to reduce this - use those here (since unsurprisingly,
more arguments were added).
This commit is contained in:
Ben Barham
2024-03-14 20:05:50 -07:00
parent 3105fe7726
commit acd0efa67f
7 changed files with 18 additions and 38 deletions

View File

@@ -1263,9 +1263,9 @@ static bool printSwiftFeature(CompilerInstance &instance) {
out << "}\n";
};
out << " \"SupportedArguments\": [\n";
#define OPTION(PREFIX, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, \
HELPTEXT, METAVAR, VALUES) \
printSingleFrontendOpt(*table, swift::options::OPT_##ID, out);
#define OPTION(...) \
printSingleFrontendOpt(*table, \
swift::options::LLVM_MAKE_OPT_ID(__VA_ARGS__), out);
#include "swift/Option/Options.inc"
#undef OPTION
out << " \"LastOption\"\n";