diff options
author | Mikhail Glushenkov <foldr@codedgers.com> | 2010-12-15 01:21:59 +0000 |
---|---|---|
committer | Mikhail Glushenkov <foldr@codedgers.com> | 2010-12-15 01:21:59 +0000 |
commit | 87685e8e8feda36d14abe3b7803786cbbe61a01a (patch) | |
tree | f0e05835c435af74b9587a4d88b334d45129e1e1 /utils | |
parent | bc4224bc6bc078b249b030c54f532215f61935c5 (diff) | |
download | external_llvm-87685e8e8feda36d14abe3b7803786cbbe61a01a.zip external_llvm-87685e8e8feda36d14abe3b7803786cbbe61a01a.tar.gz external_llvm-87685e8e8feda36d14abe3b7803786cbbe61a01a.tar.bz2 |
llvmc: make switch options ZeroOrMore by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121822 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r-- | utils/TableGen/LLVMCConfigurationEmitter.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/utils/TableGen/LLVMCConfigurationEmitter.cpp b/utils/TableGen/LLVMCConfigurationEmitter.cpp index d57d499..c40a39d 100644 --- a/utils/TableGen/LLVMCConfigurationEmitter.cpp +++ b/utils/TableGen/LLVMCConfigurationEmitter.cpp @@ -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); } |