aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Support/CommandLine.h
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2006-06-05 16:22:56 +0000
committerReid Spencer <rspencer@reidspencer.com>2006-06-05 16:22:56 +0000
commit515b5b379f3508f36f647bfdafce409e28a3d90b (patch)
treeeb8a8e442294845b00b76aaf162a969d9d7474ae /include/llvm/Support/CommandLine.h
parentcdb08a3691b0949ea9fea690571631e1a842bf3a (diff)
Make it possible to override the standard version printer. Not all tools
built with CommandLine.h will want the --version option to report that the tool belongs to LLVM. To override simply pass a void func() to the cl::SetVersionPrinter() function and that void func() will be called when it is time to print the version information. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28687 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/CommandLine.h')
-rw-r--r--include/llvm/Support/CommandLine.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/llvm/Support/CommandLine.h b/include/llvm/Support/CommandLine.h
index 19b5f29fb7..8517032fef 100644
--- a/include/llvm/Support/CommandLine.h
+++ b/include/llvm/Support/CommandLine.h
@@ -48,6 +48,13 @@ void ParseCommandLineOptions(int &argc, char **argv,
void ParseEnvironmentOptions(const char *progName, const char *envvar,
const char *Overview = 0);
+///===---------------------------------------------------------------------===//
+/// SetVersionPrinter - Override the default (LLVM specific) version printer
+/// used to print out the version when --version is given
+/// on the command line. This gives other systems using the
+/// CommandLine utilities to print their own version string.
+void SetVersionPrinter(void (*func)());
+
//===----------------------------------------------------------------------===//
// Flags permitted to be passed to command line arguments
//