[PATCH] D21420: Properly handle short file names on the command line in Windows

David Majnemer via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 15 17:41:20 PDT 2016


majnemer added a comment.

In http://reviews.llvm.org/D21420#459524, @amccarth wrote:

> In http://reviews.llvm.org/D21420#459506, @majnemer wrote:
>
> > Any reason not to perform the call to `ExpandShortFileName` in `GetArgumentVector`?  I think we only need to do this for the first argument.
>
>
> I was trying to be complete by treating all the arguments the same way.  Note that the existing code calls WildcardExpand on the first argument, even though that one seems really unlikely to have wildcards.  And, if it does, you need to expand wild cards before expanding the short file names.
>
> That said, I'm open to treating the first argument as a special case if you can convince me it is indeed special.


Here's my thinking:
argv[0] is special in that the compilers behavior is dependent on data before the extension suffix (.exe, etc.)
The compiler's behavior for the other argv[1..n] depends on the filename to suss out what mode the compiler should be in, this is not dependent on data before the suffix.

As an aside, I think it's quite strange that we look for wildcards in argv[0].


http://reviews.llvm.org/D21420





More information about the llvm-commits mailing list