[PATCH] D51134: win: Omit ".exe" from clang and clang-cl driver-level diagnostics.
Nico Weber via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 22 15:43:42 PDT 2018
thakis created this revision.
thakis added a reviewer: hans.
Like https://reviews.llvm.org/D51133 but for clang.
https://reviews.llvm.org/D51134
Files:
clang/tools/driver/driver.cpp
Index: clang/tools/driver/driver.cpp
===================================================================
--- clang/tools/driver/driver.cpp
+++ clang/tools/driver/driver.cpp
@@ -260,9 +260,9 @@
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);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51134.162078.patch
Type: text/x-patch
Size: 722 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180822/6aed8988/attachment.bin>
More information about the cfe-commits
mailing list