mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
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:
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user