aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMikhail Glushenkov <foldr@codedgers.com>2010-03-05 04:46:39 +0000
committerMikhail Glushenkov <foldr@codedgers.com>2010-03-05 04:46:39 +0000
commitb5c4239606d3b34b5aac20b93d4c052ac4c39ce7 (patch)
treeb156f303e8550e0696f41e203c3a0d6e6f6f6704 /tools
parent0d61349dc3409056e590b966e7ca9b2cd9d2f76c (diff)
downloadexternal_llvm-b5c4239606d3b34b5aac20b93d4c052ac4c39ce7.zip
external_llvm-b5c4239606d3b34b5aac20b93d4c052ac4c39ce7.tar.gz
external_llvm-b5c4239606d3b34b5aac20b93d4c052ac4c39ce7.tar.bz2
Make it not an error to specify -O* options several times.
As in 'llvmc -O2 -O2 test.c'. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97787 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r--tools/llvmc/doc/LLVMC-Reference.rst26
-rw-r--r--tools/llvmc/plugins/Base/Base.td.in8
2 files changed, 20 insertions, 14 deletions
diff --git a/tools/llvmc/doc/LLVMC-Reference.rst b/tools/llvmc/doc/LLVMC-Reference.rst
index dfe3898..ca8500d 100644
--- a/tools/llvmc/doc/LLVMC-Reference.rst
+++ b/tools/llvmc/doc/LLVMC-Reference.rst
@@ -329,16 +329,22 @@ separate option groups syntactically.
- ``required`` - this option must be specified exactly once (or, in case of
the list options without the ``multi_val`` property, at least
- once). Incompatible with ``zero_or_one`` and ``one_or_more``.
-
- - ``one_or_more`` - the option must be specified at least one time. Useful
- only for list options in conjunction with ``multi_val``; for ordinary lists
- it is synonymous with ``required``. Incompatible with ``required`` and
- ``zero_or_one``.
-
- - ``optional`` - the option can be specified zero or one times. Useful only
- for list options in conjunction with ``multi_val``. Incompatible with
- ``required`` and ``one_or_more``.
+ once). Incompatible with ``optional`` and ``one_or_more``.
+
+ - ``optional`` - the option can be specified either zero times or exactly
+ once. The default for switch options. Useful only for list options in
+ conjunction with ``multi_val``. Incompatible with ``required``,
+ ``zero_or_more`` and ``one_or_more``.
+
+ - ``one_or_more`` - the option must be specified at least once. Can be useful
+ to allow switch options be both obligatory and be specified multiple
+ times. For list options is useful only in conjunction with ``multi_val``;
+ for ordinary it is synonymous with ``required``. Incompatible with
+ ``required``, ``optional`` and ``zero_or_more``.
+
+ - ``zero_or_more`` - the option can be specified zero or more times. Useful
+ to allow a single switch option to be specified more than
+ once. Incompatible with ``required``, ``optional`` and ``one_or_more``.
- ``hidden`` - the description of this option will not appear in
the ``--help`` output (but will appear in the ``--help-hidden``
diff --git a/tools/llvmc/plugins/Base/Base.td.in b/tools/llvmc/plugins/Base/Base.td.in
index 7b82313..ac0f665 100644
--- a/tools/llvmc/plugins/Base/Base.td.in
+++ b/tools/llvmc/plugins/Base/Base.td.in
@@ -25,13 +25,13 @@ def OptList : OptionList<[
(switch_option "opt",
(help "Enable opt")),
(switch_option "O0",
- (help "Turn off optimization")),
+ (help "Turn off optimization"), (zero_or_more)),
(switch_option "O1",
- (help "Optimization level 1")),
+ (help "Optimization level 1"), (zero_or_more)),
(switch_option "O2",
- (help "Optimization level 2")),
+ (help "Optimization level 2"), (zero_or_more)),
(switch_option "O3",
- (help "Optimization level 3")),
+ (help "Optimization level 3"), (zero_or_more)),
(switch_option "S",
(help "Stop after compilation, do not assemble")),
(switch_option "c",