Another typo
[oota-llvm.git] / docs / CommandLine.html
index 3140b98ddf2fe220c68f3278f92593183837d06a..bf80ec07d458ad575b0420acc78f2094edd35e38 100644 (file)
@@ -60,6 +60,8 @@
             <tt>cl::ParseCommandLineOptions</tt> function</a></li>
         <li><a href="#cl::ParseEnvironmentOptions">The 
             <tt>cl::ParseEnvironmentOptions</tt> function</a></li>
+        <li><a href="#cl::SetVersionPrinter">The cl::SetVersionPrinter
+          function</a></li>
         <li><a href="#cl::opt">The <tt>cl::opt</tt> class</a></li>
         <li><a href="#cl::list">The <tt>cl::list</tt> class</a></li>
         <li><a href="#cl::bits">The <tt>cl::bits</tt> class</a></li>
@@ -73,6 +75,8 @@
             parser</a></li>
         <li><a href="#boolparser">The <tt>parser&lt;bool&gt;</tt>
             specialization</a></li>
+        <li><a href="#boolOrDefaultparser">The <tt>parser&lt;boolOrDefault&gt;</tt>
+            specialization</a></li>
         <li><a href="#stringparser">The <tt>parser&lt;string&gt;</tt>
             specialization</a></li>
         <li><a href="#intparser">The <tt>parser&lt;int&gt;</tt>
@@ -195,7 +199,7 @@ can do.</p>
 program:</p>
 
 <div class="doc_code"><pre>
-  #include "Support/CommandLine.h"
+  #include "llvm/Support/CommandLine.h"
 </pre></div>
 
 <p>Additionally, you need to add this as the first line of your main
@@ -1040,7 +1044,7 @@ extern bool DebugFlag;
 // debug build, then the code specified as the option to the macro will be
 // executed.  Otherwise it will not be.  Example:
 //
-// DEBUG(std::cerr &lt;&lt; "Bitset contains: " &lt;&lt; Bitset &lt;&lt; "\n");
+// DOUT &lt;&lt; "Bitset contains: " &lt;&lt; Bitset &lt;&lt; "\n";
 //</i>
 <span class="doc_hilite">#ifdef NDEBUG
 #define DEBUG(X)
@@ -1505,6 +1509,27 @@ input.</p>
 
 </div>
 
+<!-- _______________________________________________________________________ -->
+<div class="doc_subsubsection">
+  <a name="cl::SetVersionPrinter">The <tt>cl::SetVersionPrinter</tt>
+  function</a>
+</div>
+
+<div class="doc_text">
+
+<p>The <tt>cl::SetVersionPrinter</tt> function is designed to be called
+directly from <tt>main</tt>, and <i>before</i>
+<tt>cl::ParseCommandLineOptions</tt>. Its use is optional. It simply arranges
+for a function to be called in response to the <tt>--version</tt> option instead
+of having the <tt>CommandLine</tt> library print out the usual version string
+for LLVM. This is useful for programs that are not part of LLVM but wish to use
+the <tt>CommandLine</tt> facilities. Such programs should just define a small
+function that takes no arguments and returns <tt>void</tt> and that prints out
+whatever version information is appropriate for the program. Pass the address
+of that function to <tt>cl::SetVersionPrinter</tt> to arrange for it to be
+called when the <tt>--version</tt> option is given by the user.</p>
+
+</div>
 <!-- _______________________________________________________________________ -->
 <div class="doc_subsubsection">
   <a name="cl::opt">The <tt>cl::opt</tt> class</a>
@@ -1679,6 +1704,12 @@ is used to convert boolean strings to a boolean value.  Currently accepted
 strings are "<tt>true</tt>", "<tt>TRUE</tt>", "<tt>True</tt>", "<tt>1</tt>",
 "<tt>false</tt>", "<tt>FALSE</tt>", "<tt>False</tt>", and "<tt>0</tt>".</li>
 
+<li><a name="boolOrDefaultparser">The <b><tt>parser&lt;boolOrDefault&gt;</tt>
+ specialization</b></a> is used for cases where the value is boolean,
+but we also need to know whether the option was specified at all.  boolOrDefault
+is an enum with 3 values, BOU_UNSET, BOU_TRUE and BOU_FALSE.  This parser accepts
+the same strings as <b><tt>parser&lt;bool&gt;</tt></b>.</li>
+
 <li><a name="stringparser">The <b><tt>parser&lt;string&gt;</tt>
 specialization</b></a> simply stores the parsed string into the string value
 specified.  No conversion or modification of the data is performed.</li>
@@ -1740,7 +1771,7 @@ your custom data type.<p>
 <p>This approach has the advantage that users of your custom data type will
 automatically use your custom parser whenever they define an option with a value
 type of your data type.  The disadvantage of this approach is that it doesn't
-work if your fundemental data type is something that is already supported.</p>
+work if your fundamental data type is something that is already supported.</p>
 
 </li>
 
@@ -1899,7 +1930,7 @@ tutorial.</p>
   src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!"></a>
 
   <a href="mailto:sabre@nondot.org">Chris Lattner</a><br>
-  <a href="http://llvm.cs.uiuc.edu">LLVM Compiler Infrastructure</a><br>
+  <a href="http://llvm.org">LLVM Compiler Infrastructure</a><br>
   Last modified: $Date$
 </address>