r203624 - Be case sensitive when determining driver mode based on argv[0] except on Windows
Hans Wennborg
hans at hanshq.net
Tue Mar 11 16:42:29 PDT 2014
Author: hans
Date: Tue Mar 11 18:42:29 2014
New Revision: 203624
URL: http://llvm.org/viewvc/llvm-project?rev=203624&view=rev
Log:
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'.
Modified:
cfe/trunk/tools/driver/driver.cpp
Modified: cfe/trunk/tools/driver/driver.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/driver/driver.cpp?rev=203624&r1=203623&r2=203624&view=diff
==============================================================================
--- cfe/trunk/tools/driver/driver.cpp (original)
+++ cfe/trunk/tools/driver/driver.cpp Tue Mar 11 18:42:29 2014
@@ -227,8 +227,11 @@ static void ParseProgName(SmallVectorImp
{ "++", "--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;
More information about the cfe-commits
mailing list