Changes in directory llvm/include/llvm/Support:

CommandLine.h updated: 1.53 -> 1.54
---
Log message:

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. 


---
Diffs of the changes:  (+7 -0)

 CommandLine.h |    7 +++++++
 1 files changed, 7 insertions(+)


Index: llvm/include/llvm/Support/CommandLine.h
diff -u llvm/include/llvm/Support/CommandLine.h:1.53 
llvm/include/llvm/Support/CommandLine.h:1.54
--- llvm/include/llvm/Support/CommandLine.h:1.53        Fri May 12 14:20:55 2006
+++ llvm/include/llvm/Support/CommandLine.h     Mon Jun  5 11:22:56 2006
@@ -48,6 +48,13 @@
 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
 //



_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to