diff options
| author | Mikhail Glushenkov <foldr@codedgers.com> | 2008-05-30 06:28:00 +0000 | 
|---|---|---|
| committer | Mikhail Glushenkov <foldr@codedgers.com> | 2008-05-30 06:28:00 +0000 | 
| commit | 75ade50b1797016a9c7bc709727d7232f971be62 (patch) | |
| tree | 347fa01bff635403d26b0d1f6413d86df24b722b /tools/llvmc2 | |
| parent | e62df25ba7adca6ee60c4a5316ed64340c7fcf39 (diff) | |
| download | external_llvm-75ade50b1797016a9c7bc709727d7232f971be62.zip external_llvm-75ade50b1797016a9c7bc709727d7232f971be62.tar.gz external_llvm-75ade50b1797016a9c7bc709727d7232f971be62.tar.bz2 | |
Documentation update.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51758 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvmc2')
| -rw-r--r-- | tools/llvmc2/doc/LLVMC-Reference.rst | 27 | 
1 files changed, 27 insertions, 0 deletions
| diff --git a/tools/llvmc2/doc/LLVMC-Reference.rst b/tools/llvmc2/doc/LLVMC-Reference.rst index b0f88fc..f2c5a34 100644 --- a/tools/llvmc2/doc/LLVMC-Reference.rst +++ b/tools/llvmc2/doc/LLVMC-Reference.rst @@ -231,6 +231,11 @@ currently implemented option types and properties are described below:     - ``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 @@ currently implemented option types and properties are described below:     - ``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  ================================================================== | 
