]> granicus.if.org Git - clang/commitdiff
Be case sensitive when determining driver mode based on argv[0] except on Windows
authorHans Wennborg <hans@hanshq.net>
Tue, 11 Mar 2014 23:42:29 +0000 (23:42 +0000)
committerHans Wennborg <hans@hanshq.net>
Tue, 11 Mar 2014 23:42:29 +0000 (23:42 +0000)
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

index b4b970397eb5cef06e76dcb4016393ea2b734833..e8860a21567b540d0a336fea05330fff846df5d6 100644 (file)
@@ -227,8 +227,11 @@ static void ParseProgName(SmallVectorImpl<const char *> &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;