update clang driver code to 8.0.0rc3

This commit is contained in:
Andrew Kelley
2019-02-28 09:27:07 -05:00
parent 2dcf1a2392
commit ea73b8e2b8
3 changed files with 32 additions and 7 deletions

View File

@@ -258,9 +258,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);
}