summaryrefslogtreecommitdiffstats
path: root/llvm/include
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2011-07-22 07:50:40 +0000
committerChandler Carruth <chandlerc@gmail.com>2011-07-22 07:50:40 +0000
commitea7e55272c7bdfdffc6f8b5bc8adc0f01574eb10 (patch)
tree9cf2bd974f716e5895b8302c6798e179d6406ea5 /llvm/include
parent516a79e32c6a17bb74f266b9aa36bbf51a767e09 (diff)
downloadbcm5719-llvm-ea7e55272c7bdfdffc6f8b5bc8adc0f01574eb10.tar.gz
bcm5719-llvm-ea7e55272c7bdfdffc6f8b5bc8adc0f01574eb10.zip
Add an extension point to the CommandLine library where clients can
register extra version information to be printed. This is designed to allow those tools which link in various targets to also print those registered targets under --version. Currently this printing logic is embedded into the Support library directly; a huge layering violation. This is the first step to hoisting it out into the tools without adding lots of duplicated code. llvm-svn: 135755
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/Support/CommandLine.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/include/llvm/Support/CommandLine.h b/llvm/include/llvm/Support/CommandLine.h
index d6098711a07..ba8fbee94fd 100644
--- a/llvm/include/llvm/Support/CommandLine.h
+++ b/llvm/include/llvm/Support/CommandLine.h
@@ -59,6 +59,15 @@ void ParseEnvironmentOptions(const char *progName, const char *envvar,
/// CommandLine utilities to print their own version string.
void SetVersionPrinter(void (*func)());
+///===---------------------------------------------------------------------===//
+/// AddExtraVersionPrinter - Add an extra printer to use in addition to the
+/// default one. This can be called multiple times,
+/// and each time it adds a new function to the list
+/// which will be called after the basic LLVM version
+/// printing is complete. Each can then add additional
+/// information specific to the tool.
+void AddExtraVersionPrinter(void (*func)());
+
// PrintOptionValues - Print option values.
// With -print-options print the difference between option values and defaults.
OpenPOWER on IntegriCloud