]> granicus.if.org Git - clang/commitdiff
Driver: When clang is built with a VENDOR set, include the base LLVM version in
authorDaniel Dunbar <daniel@zuster.org>
Thu, 7 Oct 2010 15:00:30 +0000 (15:00 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Thu, 7 Oct 2010 15:00:30 +0000 (15:00 +0000)
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

lib/Basic/Version.cpp

index 900b3e3859bc7fbca85541166d77f9bd612527ba..67c6c36c92146c5b8304897dc079d896f56c4324 100644 (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();
 }