From: Hans Wennborg Date: Thu, 24 Jul 2014 21:09:45 +0000 (+0000) Subject: Windows: Don't wildcard expand /? or -? X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e34a71aa91b68853a95d74bd9f0e249cb1d6a42e;p=platform%2Fupstream%2Fllvm.git 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. llvm-svn: 213894 --- diff --git a/llvm/lib/Support/Windows/Process.inc b/llvm/lib/Support/Windows/Process.inc index 9eeca62d..61749a7 100644 --- a/llvm/lib/Support/Windows/Process.inc +++ b/llvm/lib/Support/Windows/Process.inc @@ -213,6 +213,11 @@ WildcardExpand(const wchar_t *Arg, SmallVectorImpl &Args, 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 Dir; if (std::error_code ec = windows::UTF16ToUTF8(Arg, wcslen(Arg), Dir))