diff options
Diffstat (limited to 'tools/driver/driver.cpp')
-rw-r--r-- | tools/driver/driver.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/driver/driver.cpp b/tools/driver/driver.cpp index 0455ba029c654..51143e3d8cb75 100644 --- a/tools/driver/driver.cpp +++ b/tools/driver/driver.cpp @@ -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); } |