From: Daniel Dunbar Date: Thu, 7 Oct 2010 15:00:30 +0000 (+0000) Subject: Driver: When clang is built with a VENDOR set, include the base LLVM version in X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ddb6c8df46931374df0a57a534aabcaa3becb6aa;p=clang 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 --- 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 #include @@ -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(); }