[llvm] r213894 - Windows: Don't wildcard expand /? or -?

Hans Wennborg hans at chromium.org
Tue Jul 29 16:37:11 PDT 2014


Merge committed in r214248.

On Thu, Jul 24, 2014 at 5:56 PM, Hans Wennborg <hans at chromium.org> wrote:
> Hi Bill,
>
> Can we merge this to 3.5?
>
> Cheers,
> Hans
>
> On Thu, Jul 24, 2014 at 2:09 PM, Hans Wennborg <hans at hanshq.net> wrote:
>> Author: hans
>> Date: Thu Jul 24 16:09:45 2014
>> New Revision: 213894
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=213894&view=rev
>> Log:
>> Windows: Don't wildcard expand /? or -?
>>
>> Even if there's a file called c:\a, we want /? to be preserved as
>> an option, not expanded to a filename.
>>
>> Modified:
>>     llvm/trunk/lib/Support/Windows/Process.inc
>>
>> Modified: llvm/trunk/lib/Support/Windows/Process.inc
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Windows/Process.inc?rev=213894&r1=213893&r2=213894&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Support/Windows/Process.inc (original)
>> +++ llvm/trunk/lib/Support/Windows/Process.inc Thu Jul 24 16:09:45 2014
>> @@ -213,6 +213,11 @@ WildcardExpand(const wchar_t *Arg, Small
>>      return ConvertAndPushArg(Arg, Args, Allocator);
>>    }
>>
>> +  if (wcscmp(Arg, L"/?") == 0 || wcscmp(Arg, L"-?") == 0) {
>> +    // Don't wildcard expand /?. Always treat it as an option.
>> +    return ConvertAndPushArg(Arg, Args, Allocator);
>> +  }
>> +
>>    // Extract any directory part of the argument.
>>    SmallVector<char, MAX_PATH> Dir;
>>    if (std::error_code ec = windows::UTF16ToUTF8(Arg, wcslen(Arg), Dir))
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits



More information about the llvm-commits mailing list