mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-25 17:20:48 +00:00
llvmc: make switch options ZeroOrMore by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121822 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user