diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2006-06-05 17:30:16 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2006-06-05 17:30:16 +0000 |
commit | 0075b2f5b08db53861df912925b55047db0071d8 (patch) | |
tree | f88ab139b38c95bf1315339f9df6a33c2a516c35 /llvm/docs/CommandLine.html | |
parent | 9017064cc716ac4ca8c62333fcbf25933ab65e85 (diff) | |
download | bcm5719-llvm-0075b2f5b08db53861df912925b55047db0071d8.tar.gz bcm5719-llvm-0075b2f5b08db53861df912925b55047db0071d8.zip |
Document the cl::SetVersionPrinter function.
llvm-svn: 28690
Diffstat (limited to 'llvm/docs/CommandLine.html')
-rw-r--r-- | llvm/docs/CommandLine.html | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/llvm/docs/CommandLine.html b/llvm/docs/CommandLine.html index 7da06e8ddbf..5898bb31137 100644 --- a/llvm/docs/CommandLine.html +++ b/llvm/docs/CommandLine.html @@ -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> @@ -1507,6 +1509,27 @@ input.</p> <!-- _______________________________________________________________________ --> <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> </div> |