diff options
author | dim <dim@FreeBSD.org> | 2015-06-09 19:06:30 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2015-06-09 19:06:30 +0000 |
commit | 9b27354f6f3e9086d5f7abbc373b617209fc35b2 (patch) | |
tree | 1dc5e75ab222a9ead44c699eceafab7a6ca7b310 /tools/llvm-cov/llvm-cov.cpp | |
parent | 782067d0278612ee75d024b9b135c221c327e9e8 (diff) | |
download | FreeBSD-src-9b27354f6f3e9086d5f7abbc373b617209fc35b2.zip FreeBSD-src-9b27354f6f3e9086d5f7abbc373b617209fc35b2.tar.gz |
Vendor import of llvm trunk r239412:
https://llvm.org/svn/llvm-project/llvm/trunk@239412
Diffstat (limited to 'tools/llvm-cov/llvm-cov.cpp')
-rw-r--r-- | tools/llvm-cov/llvm-cov.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/llvm-cov/llvm-cov.cpp b/tools/llvm-cov/llvm-cov.cpp index bf66f58..8c5acae 100644 --- a/tools/llvm-cov/llvm-cov.cpp +++ b/tools/llvm-cov/llvm-cov.cpp @@ -13,6 +13,7 @@ #include "llvm/ADT/StringRef.h" #include "llvm/ADT/StringSwitch.h" +#include "llvm/Support/CommandLine.h" #include "llvm/Support/Path.h" #include "llvm/Support/Process.h" #include "llvm/Support/raw_ostream.h" @@ -43,6 +44,12 @@ static int helpMain(int argc, const char *argv[]) { return 0; } +/// \brief Top level version information. +static int versionMain(int argc, const char *argv[]) { + cl::PrintVersionMessage(); + return 0; +} + int main(int argc, const char **argv) { // If argv[0] is or ends with 'gcov', always be gcov compatible if (sys::path::stem(argv[0]).endswith_lower("gcov")) @@ -57,6 +64,7 @@ int main(int argc, const char **argv) { .Case("report", reportMain) .Case("show", showMain) .Cases("-h", "-help", "--help", helpMain) + .Cases("-version", "--version", versionMain) .Default(nullptr); if (Func) { |