diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2014-11-24 18:11:16 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2014-11-24 18:11:16 +0000 |
| commit | 59d1ed5b206db2a86b3b5bb851f393c43b568ce2 (patch) | |
| tree | d4426858455f04d0d8c25a2f9eb9ea5582ffe1b6 /contrib/llvm/tools/clang/lib/Basic/Version.cpp | |
| parent | 91bc56ed825ba56b3cc264aa5c95ab84f86832ab (diff) | |
| parent | 9f4dbff6669c8037f3b036bcf580d14f1a4f12a5 (diff) | |
Notes
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 bc0988035639..2b577d6245a0 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(); |
