diff options
author | Nico Weber <nicolasweber@gmx.de> | 2018-08-22 23:53:39 +0000 |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2018-08-22 23:53:39 +0000 |
commit | a2761e437f220ec2cc4a5503bc427b317cc8c59d (patch) | |
tree | 98f0fe283f54fe15ddfd16c6be5944008f220669 /clang/tools/driver/driver.cpp | |
parent | 386bf1216e84f6522f746a6f64319569250c07e3 (diff) | |
download | bcm5719-llvm-a2761e437f220ec2cc4a5503bc427b317cc8c59d.tar.gz bcm5719-llvm-a2761e437f220ec2cc4a5503bc427b317cc8c59d.zip |
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
Diffstat (limited to 'clang/tools/driver/driver.cpp')
-rw-r--r-- | clang/tools/driver/driver.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/tools/driver/driver.cpp b/clang/tools/driver/driver.cpp index 0455ba029c6..51143e3d8cb 100644 --- a/clang/tools/driver/driver.cpp +++ b/clang/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); } |