@@ -34,6 +34,7 @@ enum class OptionKind {
34
34
RemainingArgs,
35
35
CommaJoined,
36
36
JoinedOrSeparate,
37
+ MultiArg,
37
38
};
38
39
39
40
#define LLVM_MAKE_OPT_ID_WITH_ID_PREFIX (ID_PREFIX, PREFIX, NAME, ID, KIND, \
@@ -113,6 +114,7 @@ struct RawOption {
113
114
unsigned flags;
114
115
const char *helpText;
115
116
const char *metaVar;
117
+ unsigned numArgs;
116
118
117
119
bool isGroup () const {
118
120
return kind == OptionKind::Group;
@@ -135,7 +137,7 @@ static const RawOption rawOptions[] = {
135
137
#define OPTION (PREFIX, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, \
136
138
HELPTEXT, METAVAR, VALUES) \
137
139
{ OptionID::Opt_##ID, PREFIX, NAME, swiftify (#ID), OptionKind::KIND, \
138
- OptionID::Opt_##GROUP, OptionID::Opt_##ALIAS, FLAGS, HELPTEXT, METAVAR },
140
+ OptionID::Opt_##GROUP, OptionID::Opt_##ALIAS, FLAGS, HELPTEXT, METAVAR, PARAM },
139
141
#include " swift/Option/Options.inc"
140
142
#undef OPTION
141
143
};
@@ -291,6 +293,10 @@ int makeOptions_main() {
291
293
out << " .separate" ;
292
294
break ;
293
295
296
+ case OptionKind::MultiArg:
297
+ out << " .multiArg" ;
298
+ break ;
299
+
294
300
case OptionKind::Group:
295
301
case OptionKind::Unknown:
296
302
assert (false && " Should have been filtered out" );
@@ -350,6 +356,9 @@ int makeOptions_main() {
350
356
if (option.group != OptionID::Opt_INVALID) {
351
357
out << " , group: ." << groups[groupIndexByID[option.group ]].id ;
352
358
}
359
+ if (option.kind == OptionKind::MultiArg) {
360
+ out << " , numArgs: " << option.numArgs ;
361
+ }
353
362
out << " )\n " ;
354
363
});
355
364
});
0 commit comments