diff options
Diffstat (limited to 'contrib/llvm/tools/clang/lib/Basic/Version.cpp')
-rw-r--r-- | contrib/llvm/tools/clang/lib/Basic/Version.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/contrib/llvm/tools/clang/lib/Basic/Version.cpp b/contrib/llvm/tools/clang/lib/Basic/Version.cpp index bc09880..2b577d6 100644 --- a/contrib/llvm/tools/clang/lib/Basic/Version.cpp +++ b/contrib/llvm/tools/clang/lib/Basic/Version.cpp @@ -13,7 +13,7 @@ #include "clang/Basic/Version.h" #include "clang/Basic/LLVM.h" -#include "llvm/Config/config.h" +#include "clang/Config/config.h" #include "llvm/Support/raw_ostream.h" #include <cstdlib> #include <cstring> @@ -36,7 +36,7 @@ std::string getClangRepositoryPath() { // If the SVN_REPOSITORY is empty, try to use the SVN keyword. This helps us // pick up a tag in an SVN export, for example. - StringRef SVNRepository("$URL: https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_34/dot1-final/lib/Basic/Version.cpp $"); + StringRef SVNRepository("$URL: https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_350/final/lib/Basic/Version.cpp $"); if (URL.empty()) { URL = SVNRepository.slice(SVNRepository.find(':'), SVNRepository.find("/lib/Basic")); @@ -102,11 +102,11 @@ std::string getClangFullRepositoryVersion() { OS << Revision; } OS << ')'; - } + } // Support LLVM in a separate repository. std::string LLVMRev = getLLVMRevision(); if (!LLVMRev.empty() && LLVMRev != Revision) { - OS << " ("; + OS << " ("; std::string LLVMRepo = getLLVMRepositoryPath(); if (!LLVMRepo.empty()) OS << LLVMRepo << ' '; @@ -116,19 +116,23 @@ std::string getClangFullRepositoryVersion() { } std::string getClangFullVersion() { + return getClangToolFullVersion("clang"); +} + +std::string getClangToolFullVersion(StringRef ToolName) { std::string buf; llvm::raw_string_ostream OS(buf); #ifdef CLANG_VENDOR OS << CLANG_VENDOR; #endif - OS << "clang version " CLANG_VERSION_STRING " " + OS << ToolName << " version " CLANG_VERSION_STRING " " << getClangFullRepositoryVersion(); #ifdef CLANG_VENDOR_SUFFIX OS << CLANG_VENDOR_SUFFIX; #elif defined(CLANG_VENDOR) // If vendor supplied, include the base LLVM version as well. - OS << " (based on LLVM " << PACKAGE_VERSION << ")"; + OS << " (based on " << BACKEND_PACKAGE_STRING << ")"; #endif return OS.str(); |