diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2014-11-24 09:15:30 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2014-11-24 09:15:30 +0000 |
commit | 9f4dbff6669c8037f3b036bcf580d14f1a4f12a5 (patch) | |
tree | 47df2c12b57214af6c31e47404b005675b8b7ffc /lib/Basic/Version.cpp | |
parent | f73d5f23a889b93d89ddef61ac0995df40286bb8 (diff) |
Notes
Diffstat (limited to 'lib/Basic/Version.cpp')
-rw-r--r-- | lib/Basic/Version.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/lib/Basic/Version.cpp b/lib/Basic/Version.cpp index 2006878349a1..87ecac17649b 100644 --- a/lib/Basic/Version.cpp +++ b/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,17 +116,21 @@ 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(); // If vendor supplied, include the base LLVM version as well. #ifdef CLANG_VENDOR - OS << " (based on LLVM " << PACKAGE_VERSION << ")"; + OS << " (based on " << BACKEND_PACKAGE_STRING << ")"; #endif return OS.str(); |