From 2403b855cdd42db799052b30b286095d731f7646 Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Mon, 5 Jun 2006 17:30:16 +0000 Subject: [PATCH] Document the cl::SetVersionPrinter function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28690 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/CommandLine.html | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/docs/CommandLine.html b/docs/CommandLine.html index 7da06e8ddbf..5898bb31137 100644 --- a/docs/CommandLine.html +++ b/docs/CommandLine.html @@ -60,6 +60,8 @@ cl::ParseCommandLineOptions function
  • The cl::ParseEnvironmentOptions function
  • +
  • The cl::SetVersionPrinter + function
  • The cl::opt class
  • The cl::list class
  • The cl::bits class
  • @@ -1505,6 +1507,27 @@ input.

    + +
    + The cl::SetVersionPrinter + function +
    + +
    + +

    The cl::SetVersionPrinter function is designed to be called +directly from main, and before +cl::ParseCommandLineOptions. Its use is optional. It simply arranges +for a function to be called in response to the --version option instead +of having the CommandLine 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 CommandLine facilities. Such programs should just define a small +function that takes no arguments and returns void and that prints out +whatever version information is appropriate for the program. Pass the address +of that function to cl::SetVersionPrinter to arrange for it to be +called when the --version option is given by the user.

    + +
    The cl::opt class