[llvm-commits] [llvm] r51758 - /llvm/trunk/tools/llvmc2/doc/LLVMC-Reference.rst
Mikhail Glushenkov
foldr at codedgers.com
Thu May 29 23:28:00 PDT 2008
Author: foldr
Date: Fri May 30 01:28:00 2008
New Revision: 51758
URL: http://llvm.org/viewvc/llvm-project?rev=51758&view=rev
Log:
Documentation update.
Modified:
llvm/trunk/tools/llvmc2/doc/LLVMC-Reference.rst
Modified: llvm/trunk/tools/llvmc2/doc/LLVMC-Reference.rst
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc2/doc/LLVMC-Reference.rst?rev=51758&r1=51757&r2=51758&view=diff
==============================================================================
--- llvm/trunk/tools/llvmc2/doc/LLVMC-Reference.rst (original)
+++ llvm/trunk/tools/llvmc2/doc/LLVMC-Reference.rst Fri May 30 01:28:00 2008
@@ -231,6 +231,11 @@
- ``prefix_list_option`` - same as the above, but more than one
occurence of the option is allowed; example: ``-lm -lpthread``.
+ - ``alias_option`` - a special option type for creating
+ aliases. Unlike other option types, aliases are not allowed to
+ have any properties besides the aliased option name. Usage
+ example: ``(alias_option "preprocess", "E")``
+
* Possible option properties:
@@ -254,6 +259,28 @@
- ``required`` - this option is obligatory.
+Option list - specifying all options in a single place
+======================================================
+
+It can be handy to have all information about options gathered in a
+single place to provide an overview. This can be achieved by using a
+so-called ``OptionList``::
+
+ def Options : OptionList<[
+ (switch_option "E", (help "Help string")),
+ (alias_option "quiet", "q")
+ ...
+ ]>;
+
+``OptionList`` is also a good place to specify option aliases.
+
+Tool-specific option properties like ``append_cmd`` have (obviously)
+no meaning in the context of ``OptionList``, so the only properties
+allowed there are ``help`` and ``required``.
+
+Option lists are used at the file scope. See file
+``examples/Clang.td`` for an example of ``OptionList`` usage.
+
Using hooks and environment variables in the ``cmd_line`` property
==================================================================
More information about the llvm-commits
mailing list