Skip to content

Commit 51adeae

Browse files
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
1 parent 43ae5f4 commit 51adeae

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

clang/lib/Basic/Version.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,6 @@ std::string getClangToolFullVersion(StringRef ToolName) {
127127
OS << ToolName << " version " CLANG_VERSION_STRING " "
128128
<< getClangFullRepositoryVersion();
129129

130-
// If vendor supplied, include the base LLVM version as well.
131-
#ifdef CLANG_VENDOR
132-
OS << " (based on " << BACKEND_PACKAGE_STRING << ")";
133-
#endif
134-
135130
return OS.str();
136131
}
137132

0 commit comments

Comments
 (0)