forked from OSchip/llvm-project
Update documentation after r283671 ("Turn cl::values() (for enum) from a vararg function to using C++ variadic template")
llvm-svn: 283782
This commit is contained in:
parent
03344b3bdc
commit
ed76706008
|
@ -363,8 +363,7 @@ library fill it in with the appropriate level directly, which is used like this:
|
||||||
|
|
||||||
This declaration defines a variable "``OptimizationLevel``" of the
|
This declaration defines a variable "``OptimizationLevel``" of the
|
||||||
"``OptLevel``" enum type. This variable can be assigned any of the values that
|
"``OptLevel``" enum type. This variable can be assigned any of the values that
|
||||||
are listed in the declaration (Note that the declaration list must be terminated
|
are listed in the declaration. The CommandLine library enforces that
|
||||||
with the "``clEnumValEnd``" argument!). The CommandLine library enforces that
|
|
||||||
the user can only specify one of the options, and it ensure that only valid enum
|
the user can only specify one of the options, and it ensure that only valid enum
|
||||||
values can be specified. The "``clEnumVal``" macros ensure that the command
|
values can be specified. The "``clEnumVal``" macros ensure that the command
|
||||||
line arguments matched the enum values. With this option added, our help output
|
line arguments matched the enum values. With this option added, our help output
|
||||||
|
@ -962,11 +961,10 @@ This section describes the basic attributes that you can specify on options.
|
||||||
.. _cl::values:
|
.. _cl::values:
|
||||||
|
|
||||||
* The **cl::values** attribute specifies the string-to-value mapping to be used
|
* The **cl::values** attribute specifies the string-to-value mapping to be used
|
||||||
by the generic parser. It takes a **clEnumValEnd terminated** list of
|
by the generic parser. It takes a list of (option, value, description)
|
||||||
(option, value, description) triplets that specify the option name, the value
|
triplets that specify the option name, the value mapped to, and the
|
||||||
mapped to, and the description shown in the ``-help`` for the tool. Because
|
description shown in the ``-help`` for the tool. Because the generic parser
|
||||||
the generic parser is used most frequently with enum values, two macros are
|
is used most frequently with enum values, two macros are often useful:
|
||||||
often useful:
|
|
||||||
|
|
||||||
#. The **clEnumVal** macro is used as a nice simple way to specify a triplet
|
#. The **clEnumVal** macro is used as a nice simple way to specify a triplet
|
||||||
for an enum. This macro automatically makes the option name be the same as
|
for an enum. This macro automatically makes the option name be the same as
|
||||||
|
|
Loading…
Reference in New Issue