r188833 - Look at lowercase version of argv[0] when determining driver mode

Dimitry Andric dimitry at andric.com
Tue Mar 11 13:58:06 PDT 2014


Hi Hans,

I realize it's a little late to react on this commit. :-)

But in any case, on FreeBSD we do have case sensitive filesystems, just like Linux and most other Unixes, and we are using a custom patch to detect "CC" as being an alias for "c++".  (This is for compatibility with a lot of existing build systems out there, which assume "CC" is the C++ compiler, and "cc" is the regular C compiler.)

So I would appreciate it, if the toLowerCase transformation was surrounded with e.g. #ifdef _WIN32.  It is probably the only OS that has semi-random case for filenames?  (Or maybe OSX too, since that defaults to a case insensitive filesystem.)

-Dimitry

On 20 Aug 2013, at 23:47, Hans Wennborg <hans at hanshq.net> wrote:

> Author: hans
> Date: Tue Aug 20 16:47:50 2013
> New Revision: 188833
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=188833&view=rev
> Log:
> Look at lowercase version of argv[0] when determining driver mode
> 
> 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=188833&r1=188832&r2=188833&view=diff
> ==============================================================================
> --- cfe/trunk/tools/driver/driver.cpp (original)
> +++ cfe/trunk/tools/driver/driver.cpp Tue Aug 20 16:47:50 2013
> @@ -226,6 +226,8 @@ static void ParseProgName(SmallVectorImp
>     { "++",        "--driver-mode=g++" },
>   };
>   std::string ProgName(llvm::sys::path::stem(ArgVector[0]));
> +  std::transform(ProgName.begin(), ProgName.end(), ProgName.begin(),
> +                 toLowercase);
>   StringRef ProgNameRef(ProgName);
>   StringRef Prefix;
> 
> 
> 
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 203 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140311/d62ad5db/attachment.sig>


More information about the cfe-commits mailing list