summaryrefslogtreecommitdiffstats
path: root/llvm/docs/CommandLine.html
diff options
context:
space:
mode:
authorBrian Gaeke <gaeke@uiuc.edu>2003-08-19 22:56:22 +0000
committerBrian Gaeke <gaeke@uiuc.edu>2003-08-19 22:56:22 +0000
commit8b89b2bcbb08cc184827c362e8ec12a94717b881 (patch)
tree4855d33bd8ebc6545a6eacf77e15178aee886096 /llvm/docs/CommandLine.html
parente90e4c4ec03064c807b38ac189863cd0b58c49af (diff)
downloadbcm5719-llvm-8b89b2bcbb08cc184827c362e8ec12a94717b881.tar.gz
bcm5719-llvm-8b89b2bcbb08cc184827c362e8ec12a94717b881.zip
Add warning about how you have to put cl::init after cl::location, if both
appear for the same option. llvm-svn: 7977
Diffstat (limited to 'llvm/docs/CommandLine.html')
-rw-r--r--llvm/docs/CommandLine.html7
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/docs/CommandLine.html b/llvm/docs/CommandLine.html
index abc6eb6823e..8cc2dc8b585 100644
--- a/llvm/docs/CommandLine.html
+++ b/llvm/docs/CommandLine.html
@@ -919,7 +919,12 @@ example.<p>
<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
OpenPOWER on IntegriCloud