From 32fccec20e4909978bef17a67e550ac52b99dd4b Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: Tue, 11 Mar 2014 23:42:29 +0000 Subject: [PATCH] Be case sensitive when determining driver mode based on argv[0] except on Windows This narrows the impact of r188833 after Dimitry pointed out that it's good to be able to tell the difference between 'cc' and 'CC'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203624 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/driver/driver.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/driver/driver.cpp b/tools/driver/driver.cpp index b4b970397e..e8860a2156 100644 --- a/tools/driver/driver.cpp +++ b/tools/driver/driver.cpp @@ -227,8 +227,11 @@ static void ParseProgName(SmallVectorImpl &ArgVector, { "++", "--driver-mode=g++" }, }; std::string ProgName(llvm::sys::path::stem(ArgVector[0])); +#ifdef _WIN32 + // Transform to lowercase for case insensitive file systems. std::transform(ProgName.begin(), ProgName.end(), ProgName.begin(), toLowercase); +#endif StringRef ProgNameRef(ProgName); StringRef Prefix; -- 2.40.0