summaryrefslogtreecommitdiffstats
path: root/llvm/docs/CommandLine.html
diff options
context:
space:
mode:
authorBrian Gaeke <gaeke@uiuc.edu>2003-08-19 23:11:43 +0000
committerBrian Gaeke <gaeke@uiuc.edu>2003-08-19 23:11:43 +0000
commitf2ea9e0bdf1a6df019d5350e7ed657d150b237d3 (patch)
treee5500f2a6934562e64e31fa72ec4e8ca106b5ecd /llvm/docs/CommandLine.html
parent8b89b2bcbb08cc184827c362e8ec12a94717b881 (diff)
downloadbcm5719-llvm-f2ea9e0bdf1a6df019d5350e7ed657d150b237d3.tar.gz
bcm5719-llvm-f2ea9e0bdf1a6df019d5350e7ed657d150b237d3.zip
Add ParseEnvironmentOptions documentation
llvm-svn: 7978
Diffstat (limited to 'llvm/docs/CommandLine.html')
-rw-r--r--llvm/docs/CommandLine.html31
1 files changed, 31 insertions, 0 deletions
diff --git a/llvm/docs/CommandLine.html b/llvm/docs/CommandLine.html
index 8cc2dc8b585..1d46720f3be 100644
--- a/llvm/docs/CommandLine.html
+++ b/llvm/docs/CommandLine.html
@@ -42,6 +42,8 @@
<ul>
<li><a href="#cl::ParseCommandLineOptions">The
<tt>cl::ParseCommandLineOptions</tt> function</a>
+ <li><a href="#cl::ParseEnvironmentOptions">The
+ <tt>cl::ParseEnvironmentOptions</tt> function</a>
<li><a href="#cl::opt">The <tt>cl::opt</tt> class</a>
<li><a href="#cl::list">The <tt>cl::list</tt> class</a>
<li><a href="#cl::alias">The <tt>cl::alias</tt> class</a>
@@ -1214,6 +1216,35 @@ which holds <a href="#description">additional extra text</a> to emit when the
<!-- _______________________________________________________________________ -->
+</ul><a name="cl::ParseEnvironmentOptions"><h4><hr size=0>The
+<tt>cl::ParseEnvironmentOptions</tt> function</h4><ul>
+
+The <tt>cl::ParseEnvironmentOptions</tt>
+function has mostly the same effects as
+<a href="#cl::ParseCommandLineOptions"><tt>cl::ParseCommandLineOptions</tt></a>,
+except that it is designed to take values for options from an
+environment variable, for those cases in which reading the
+command line is not convenient or not desired. It fills in
+the values of all the command line option variables just like
+<a href="#cl::ParseCommandLineOptions"><tt>cl::ParseCommandLineOptions</tt></a>
+does.<p>
+
+It takes three parameters: first, the name of the program (since <tt>argv</tt>
+may not be available, it can't just look in <tt>argv[0]</tt>), second,
+the name of the environment variable to examine, and third, the optional
+<a href="#description">additional extra text</a> to emit when the
+<tt>--help</tt> option is invoked.<p>
+
+<tt>cl::ParseEnvironmentOptions</tt> will break the environment
+variable's value up into words and then process them using
+<a href="#cl::ParseCommandLineOptions"><tt>cl::ParseCommandLineOptions</tt></a>.
+<b>Note:</b> Currently <tt>cl::ParseEnvironmentOptions</tt> does not support
+quoting, so an environment variable containing <tt>-option "foo bar"</tt> will
+be parsed as three words, <tt>-option</tt>, <tt>"foo</tt>, and <tt>bar"</tt>,
+which is different from what you would get from the shell with the same
+input.<p>
+
+<!-- _______________________________________________________________________ -->
</ul><a name="cl::opt"><h4><hr size=0>The <tt>cl::opt</tt> class</h4><ul>
The <tt>cl::opt</tt> class is the class used to represent scalar command line
OpenPOWER on IntegriCloud