summaryrefslogtreecommitdiffstats
path: root/llvm/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
commitb3171678ee47494ef3b62978dbe8fc36072b9f69 (patch)
treeb092c175f1afd5503a29d71c3c84322e82fd95c6 /llvm/include/llvm/Support/CommandLine.h
parenta31ac4eae9f8c6b75b61b3ab2708421dd7fb8c14 (diff)
downloadbcm5719-llvm-b3171678ee47494ef3b62978dbe8fc36072b9f69.tar.gz
bcm5719-llvm-b3171678ee47494ef3b62978dbe8fc36072b9f69.zip
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. llvm-svn: 28687
Diffstat (limited to 'llvm/include/llvm/Support/CommandLine.h')
-rw-r--r--llvm/include/llvm/Support/CommandLine.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/include/llvm/Support/CommandLine.h b/llvm/include/llvm/Support/CommandLine.h
index 19b5f29fb7f..8517032fefe 100644
--- a/llvm/include/llvm/Support/CommandLine.h
+++ b/llvm/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
//
OpenPOWER on IntegriCloud