Skip to content

Commit

Permalink
win: Omit ".exe" from clang and clang-cl driver-level diagnostics.
Browse files Browse the repository at this point in the history
  • Loading branch information
nico committed Aug 22, 2018
1 parent abd2f85 commit 4f1a245
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools/driver/driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 4f1a245

Please sign in to comment.