summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit9f9b7051c7b1d7f8a9ac98860a6f019fe815e27d (patch)
tree9175c5e554c4785c564f55a9d58a03cd7ca85f73 /llvm/utils/TableGen/LLVMCConfigurationEmitter.cpp
parent8c6b56f39d967347f28dd9c93f1cffddf6d7e4cd (diff)
downloadbcm5719-llvm-9f9b7051c7b1d7f8a9ac98860a6f019fe815e27d.tar.gz
bcm5719-llvm-9f9b7051c7b1d7f8a9ac98860a6f019fe815e27d.zip
llvmc: make switch options ZeroOrMore by default.
llvm-svn: 121822
Diffstat (limited to 'llvm/utils/TableGen/LLVMCConfigurationEmitter.cpp')
-rw-r--r--llvm/utils/TableGen/LLVMCConfigurationEmitter.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/llvm/utils/TableGen/LLVMCConfigurationEmitter.cpp b/llvm/utils/TableGen/LLVMCConfigurationEmitter.cpp
index d57d499ba9e..c40a39dff72 100644
--- a/llvm/utils/TableGen/LLVMCConfigurationEmitter.cpp
+++ b/llvm/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);
}
OpenPOWER on IntegriCloud