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
This commit is contained in:
Daniel Dunbar 2010-10-07 15:00:30 +00:00
parent 7bb159b33c
commit 6036264fb4
1 changed files with 7 additions and 0 deletions

View File

@ -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();
}