[llvm-commits] CVS: llvm/www/docs/CommandLine.html

Brian Gaeke gaeke at niobe.cs.uiuc.edu
Tue Aug 19 17:57:01 PDT 2003


Changes in directory llvm/www/docs:

CommandLine.html updated: 1.12 -> 1.13

---
Log message:

Add warning about how you have to put cl::init after cl::location, if both
appear for the same option.


---
Diffs of the changes:

Index: llvm/www/docs/CommandLine.html
diff -u llvm/www/docs/CommandLine.html:1.12 llvm/www/docs/CommandLine.html:1.13
--- llvm/www/docs/CommandLine.html:1.12	Fri Aug  1 16:30:37 2003
+++ llvm/www/docs/CommandLine.html	Tue Aug 19 17:56:22 2003
@@ -919,7 +919,12 @@
 <li><a name="cl::init">The <b><tt>cl::init</tt></b> attribute specifies an
 inital value for a <a href="#cl::opt">scalar</a> option.  If this attribute is
 not specified then the command line option value defaults to the value created
-by the default constructor for the type.<p>
+by the default constructor for the type. <b>Warning</b>: If you specify both
+<b><tt>cl::init</tt></b> and <b><tt>cl::location</tt></b> for an option,
+you must specify <b><tt>cl::location</tt></b> first, so that when the
+command-line parser sees <b><tt>cl::init</tt></b>, it knows where to put the
+initial value. (You will get an error at runtime if you don't put them in
+the right order.)<p>
 
 <li><a name="cl::location">The <b><tt>cl::location</tt></b> attribute where to
 store the value for a parsed command line option if using external storage.  See





More information about the llvm-commits mailing list