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 | ddb6c8df46931374df0a57a534aabcaa3becb6aa (patch) | |
tree | e7a4d5600cfc1fa32c8aff22b4e76915a7eba381 /lib/Basic/Version.cpp | |
parent | dc4fc83df5e2f61fe31eab3d576a38071c992388 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115915 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic/Version.cpp')
-rw-r--r-- | lib/Basic/Version.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Basic/Version.cpp b/lib/Basic/Version.cpp index 900b3e3859..67c6c36c92 100644 --- a/lib/Basic/Version.cpp +++ b/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(); } |