summaryrefslogtreecommitdiff
path: root/utils/TableGen/LLVMCConfigurationEmitter.cpp
diff options
context:
space:
mode:
authorMikhail Glushenkov <foldr@codedgers.com>2010-12-15 01:21:59 +0000
committerMikhail Glushenkov <foldr@codedgers.com>2010-12-15 01:21:59 +0000
commit87685e8e8feda36d14abe3b7803786cbbe61a01a (patch)
treef0e05835c435af74b9587a4d88b334d45129e1e1 /utils/TableGen/LLVMCConfigurationEmitter.cpp
parentbc4224bc6bc078b249b030c54f532215f61935c5 (diff)
downloadllvm-87685e8e8feda36d14abe3b7803786cbbe61a01a.tar.gz
llvm-87685e8e8feda36d14abe3b7803786cbbe61a01a.tar.bz2
llvm-87685e8e8feda36d14abe3b7803786cbbe61a01a.tar.xz
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/TableGen/LLVMCConfigurationEmitter.cpp')
-rw-r--r--utils/TableGen/LLVMCConfigurationEmitter.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/utils/TableGen/LLVMCConfigurationEmitter.cpp b/utils/TableGen/LLVMCConfigurationEmitter.cpp
index d57d499ba9..c40a39dff7 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);
}