[clang] 51adeae - remove redundant LLVM version from version string when setting CLANG_VENDOR
Nick Desaulniers via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 8 09:26:11 PST 2019
Author: Nick Desaulniers
Date: 2019-11-08T09:24:17-08:00
New Revision: 51adeae1c90c966f5ae7eb1aa8a380fcc7cd4806
URL: https://github.com/llvm/llvm-project/commit/51adeae1c90c966f5ae7eb1aa8a380fcc7cd4806
DIFF: https://github.com/llvm/llvm-project/commit/51adeae1c90c966f5ae7eb1aa8a380fcc7cd4806.diff
LOG: remove redundant LLVM version from version string when setting CLANG_VENDOR
Summary:
When downstream LLVM distributions (like AOSP) set the CLANG_VENDOR
cmake variable, the version string printed by the clang driver looks
like:
$ clang --version
[CLANG_VENDOR] clang version X.X.X ([CLANG_REPOSITORY_STRING] sha) (based on LLVM X.X.X)
Rather than the more standard:
$ clang --version
clang version X.X.X ([CLANG_REPOSITORY_STRING] sha)
Based on feedback the the version string is a little long, the trailing
"(based on LLVM X.X.X)" is redundant and makes less sense after moving
LLVM to the monorepo. And it is only added should vendors set the cmake
variable CLANG_VENDOR. Let's remove it.
Reviewers: jyknight, eli.friedman, rsmith, rjmccall, efriedma
Reviewed By: efriedma
Subscribers: arphaman, efriedma, cfe-commits, srhines
Tags: #clang
Differential Revision: https://reviews.llvm.org/D69925
Added:
Modified:
clang/lib/Basic/Version.cpp
Removed:
################################################################################
diff --git a/clang/lib/Basic/Version.cpp b/clang/lib/Basic/Version.cpp
index d6564582e772..c69d13b2f689 100644
--- a/clang/lib/Basic/Version.cpp
+++ b/clang/lib/Basic/Version.cpp
@@ -127,11 +127,6 @@ std::string getClangToolFullVersion(StringRef ToolName) {
OS << ToolName << " version " CLANG_VERSION_STRING " "
<< getClangFullRepositoryVersion();
- // If vendor supplied, include the base LLVM version as well.
-#ifdef CLANG_VENDOR
- OS << " (based on " << BACKEND_PACKAGE_STRING << ")";
-#endif
-
return OS.str();
}
More information about the cfe-commits
mailing list