[cfe-commits] r115915 - /cfe/trunk/lib/Basic/Version.cpp

Daniel Dunbar daniel at zuster.org
Thu Oct 7 08:00:30 PDT 2010


Author: ddunbar
Date: Thu Oct  7 10:00:30 2010
New Revision: 115915

URL: http://llvm.org/viewvc/llvm-project?rev=115915&view=rev
Log:
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.

Modified:
    cfe/trunk/lib/Basic/Version.cpp

Modified: cfe/trunk/lib/Basic/Version.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Version.cpp?rev=115915&r1=115914&r2=115915&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Version.cpp (original)
+++ cfe/trunk/lib/Basic/Version.cpp Thu Oct  7 10:00:30 2010
@@ -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 @@
 #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();
 }
 





More information about the cfe-commits mailing list