llvmc: Add a new option type (switch_list).
[oota-llvm.git] / tools / llvmc / doc / LLVMC-Reference.rst
index ca8500d615d70d83495ab620f1668a3970a08811..d160e758ea6248da3d5d5791d76095731728b5c8 100644 (file)
@@ -299,7 +299,7 @@ separate option groups syntactically.
 * Possible option types:
 
    - ``switch_option`` - a simple boolean switch without arguments, for example
-     ``-O2`` or ``-time``. At most one occurrence is allowed.
+     ``-O2`` or ``-time``. At most one occurrence is allowed by default.
 
    - ``parameter_option`` - option that takes one argument, for example
      ``-std=c99``. It is also allowed to use spaces instead of the equality
@@ -321,6 +321,13 @@ separate option groups syntactically.
      option types, aliases are not allowed to have any properties besides the
      aliased option name. Usage example: ``(alias_option "preprocess", "E")``
 
+   - ``switch_list_option`` - like ``switch_option`` with the ``zero_or_more``
+     property, but remembers how many times the switch was turned on. Useful
+     mostly for forwarding. Example: when ``-foo`` is a switch option (with the
+     ``zero_or_more`` property), the command ``driver -foo -foo`` is forwarded
+     as ``some-tool -foo``, but when ``-foo`` is a switch list, the same command
+     is forwarded as ``some-tool -foo -foo``.
+
 
 * Possible option properties: