aboutsummaryrefslogtreecommitdiffstats
path: root/docs/CommandLine.html
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-07-16 00:10:54 +0000
committerChris Lattner <sabre@nondot.org>2004-07-16 00:10:54 +0000
commitb406eadfe3ef0e70ec7f68cca3d45628bf1c19f8 (patch)
tree7e413e9af10c8585859d2061f0956fecba0aecb8 /docs/CommandLine.html
parent4d143ee01988e1b52e106ffccbb313937ca5e886 (diff)
downloadexternal_llvm-b406eadfe3ef0e70ec7f68cca3d45628bf1c19f8.zip
external_llvm-b406eadfe3ef0e70ec7f68cca3d45628bf1c19f8.tar.gz
external_llvm-b406eadfe3ef0e70ec7f68cca3d45628bf1c19f8.tar.bz2
For 64-bit platform support, we now use the clEnumValEnd macro to terminate
cl::values lists git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14869 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs/CommandLine.html')
-rw-r--r--docs/CommandLine.html14
1 files changed, 8 insertions, 6 deletions
diff --git a/docs/CommandLine.html b/docs/CommandLine.html
index 855c1e9..7353375 100644
--- a/docs/CommandLine.html
+++ b/docs/CommandLine.html
@@ -493,7 +493,7 @@ enum OptLevel {
clEnumVal(O1, "<i>Enable trivial optimizations</i>"),
clEnumVal(O2, "<i>Enable default optimizations</i>"),
clEnumVal(O3, "<i>Enable expensive optimizations</i>"),
- 0));
+ clEnumValEnd));
...
if (OptimizationLevel &gt;= O2) doPartialRedundancyElimination(...);
@@ -503,7 +503,8 @@ enum OptLevel {
<p>This declaration defines a variable "<tt>OptimizationLevel</tt>" of the
"<tt>OptLevel</tt>" 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 with the "<tt>0</tt>" argument!). The CommandLine library enforces
+terminated with the "<tt>clEnumValEnd</tt>" argument!). The CommandLine
+library enforces
that the user can only specify one of the options, and it ensure that only valid
enum values can be specified. The "<tt>clEnumVal</tt>" macros ensure that the
command line arguments matched the enum values. With this option added, our
@@ -540,7 +541,7 @@ enum OptLevel {
clEnumVal(O1 , "<i>Enable trivial optimizations</i>"),
clEnumVal(O2 , "<i>Enable default optimizations</i>"),
clEnumVal(O3 , "<i>Enable expensive optimizations</i>"),
- 0));
+ clEnumValEnd));
...
if (OptimizationLevel == Debug) outputDebugInfo(...);
@@ -581,7 +582,7 @@ enum DebugLev {
clEnumValN(nodebuginfo, "none", "<i>disable debug information</i>"),
clEnumVal(quick, "<i>enable quick debug information</i>"),
clEnumVal(detailed, "<i>enable detailed debug information</i>"),
- 0));
+ clEnumValEnd));
</pre>
<p>This definition defines an enumerated command line variable of type "<tt>enum
@@ -648,7 +649,7 @@ enum Opts {
clEnumVal(constprop , "<i>Constant Propagation</i>"),
clEnumValN(inlining, "<i>inline</i>", "<i>Procedure Integration</i>"),
clEnumVal(strip , "<i>Strip Symbols</i>"),
- 0));
+ clEnumValEnd));
</pre>
<p>This defines a variable that is conceptually of the type
@@ -998,7 +999,8 @@ for.</li>
<li><a name="cl::values">The <b><tt>cl::values</tt></b></a> attribute specifies
the string-to-value mapping to be used by the generic parser. It takes a
-<b>null terminated</b> list of (option, value, description) triplets that
+<b>clEnumValEnd terminated</b> list of (option, value, description) triplets
+that
specify the option name, the value mapped to, and the description shown in the
<tt>--help</tt> for the tool. Because the generic parser is used most
frequently with enum values, two macros are often useful: