diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-10-07 15:00:30 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-10-07 15:00:30 +0000 |
commit | 6036264fb4a1ec4c72fdd4310396379a0d184bf4 (patch) | |
tree | 5fb53cd635a4bd2c5ad79b6b59bfc9103615f9d9 /clang/lib/Basic/Version.cpp | |
parent | 7bb159b33c2985585a2ee70094cfe68b97f7fe39 (diff) | |
download | bcm5719-llvm-6036264fb4a1ec4c72fdd4310396379a0d184bf4.tar.gz bcm5719-llvm-6036264fb4a1ec4c72fdd4310396379a0d184bf4.zip |
Driver: When clang is built with a VENDOR set, include the base LLVM version in
the version information, to help prevent user confusion about vendor version
numbers vs. LLVM version numbers.
llvm-svn: 115915
Diffstat (limited to 'clang/lib/Basic/Version.cpp')
-rw-r--r-- | clang/lib/Basic/Version.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/Basic/Version.cpp b/clang/lib/Basic/Version.cpp index 900b3e3859b..67c6c36c921 100644 --- a/clang/lib/Basic/Version.cpp +++ b/clang/lib/Basic/Version.cpp @@ -13,6 +13,7 @@ #include "clang/Basic/Version.h" #include "llvm/Support/raw_ostream.h" +#include "llvm/Config/config.h" #include <cstring> #include <cstdlib> @@ -69,6 +70,12 @@ std::string getClangFullVersion() { #endif OS << "clang version " CLANG_VERSION_STRING " (" << getClangFullRepositoryVersion() << ')'; + + // If vendor supplied, include the base LLVM version as well. +#ifdef CLANG_VENDOR + OS << " (based on LLVM " << PACKAGE_VERSION << ")"; +#endif + return OS.str(); } |