mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 15:11:24 +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:
parent
bc4224bc6b
commit
87685e8e8f
@ -768,14 +768,21 @@ public:
|
||||
|
||||
CheckNumberOfArguments(d, 2);
|
||||
|
||||
// Alias option store the aliased option name in the 'Help' field and do not
|
||||
// have any properties.
|
||||
if (OD.isAlias()) {
|
||||
// Aliases store the aliased option name in the 'Help' field.
|
||||
OD.Help = InitPtrToString(d.getArg(1));
|
||||
}
|
||||
else {
|
||||
processOptionProperties(d, OD);
|
||||
}
|
||||
|
||||
// Switch options are ZeroOrMore by default.
|
||||
if (OD.isSwitch()) {
|
||||
if (!(OD.isOptional() || OD.isOneOrMore() || OD.isRequired()))
|
||||
OD.setZeroOrMore();
|
||||
}
|
||||
|
||||
OptDescs_.InsertDescription(OD);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user