win: Omit ".exe" from clang and clang-cl driver-level diagnostics.

Like https://reviews.llvm.org/D51133 but for clang.
https://reviews.llvm.org/D51134

llvm-svn: 340498
This commit is contained in:
Nico Weber 2018-08-22 23:53:39 +00:00
parent 386bf1216e
commit a2761e437f
1 changed files with 3 additions and 3 deletions

View File

@ -260,9 +260,9 @@ static void FixupDiagPrefixExeName(TextDiagnosticPrinter *DiagClient,
const std::string &Path) {
// If the clang binary happens to be named cl.exe for compatibility reasons,
// use clang-cl.exe as the prefix to avoid confusion between clang and MSVC.
StringRef ExeBasename(llvm::sys::path::filename(Path));
if (ExeBasename.equals_lower("cl.exe"))
ExeBasename = "clang-cl.exe";
StringRef ExeBasename(llvm::sys::path::stem(Path));
if (ExeBasename.equals_lower("cl"))
ExeBasename = "clang-cl";
DiagClient->setPrefix(ExeBasename);
}