Explorar o código

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

Daniel Dunbar %!s(int64=15) %!d(string=hai) anos
pai
achega
ddb6c8df46
Modificáronse 1 ficheiros con 7 adicións e 0 borrados
  1. 7 0
      lib/Basic/Version.cpp

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