forked from OSchip/llvm-project
llvmc: make switch options ZeroOrMore by default.
llvm-svn: 121822
This commit is contained in:
parent
8c6b56f39d
commit
9f9b7051c7
|
@ -768,14 +768,21 @@ public:
|
||||||
|
|
||||||
CheckNumberOfArguments(d, 2);
|
CheckNumberOfArguments(d, 2);
|
||||||
|
|
||||||
|
// Alias option store the aliased option name in the 'Help' field and do not
|
||||||
|
// have any properties.
|
||||||
if (OD.isAlias()) {
|
if (OD.isAlias()) {
|
||||||
// Aliases store the aliased option name in the 'Help' field.
|
|
||||||
OD.Help = InitPtrToString(d.getArg(1));
|
OD.Help = InitPtrToString(d.getArg(1));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
processOptionProperties(d, OD);
|
processOptionProperties(d, OD);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Switch options are ZeroOrMore by default.
|
||||||
|
if (OD.isSwitch()) {
|
||||||
|
if (!(OD.isOptional() || OD.isOneOrMore() || OD.isRequired()))
|
||||||
|
OD.setZeroOrMore();
|
||||||
|
}
|
||||||
|
|
||||||
OptDescs_.InsertDescription(OD);
|
OptDescs_.InsertDescription(OD);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue