Perform wildcard expansion in Process::GetArgumentVector on Windows (PR17098)
authorHans Wennborg <hans@hanshq.net>
Wed, 16 Jul 2014 00:52:11 +0000 (00:52 +0000)
committerHans Wennborg <hans@hanshq.net>
Wed, 16 Jul 2014 00:52:11 +0000 (00:52 +0000)
commitb464ec0536cb585d5c248a50963c52ef794b0bce
tree7d13be8329f551fda22e90192868200cae157e9f
parent77f03040d5989b6a905496b3777e112fc3f24c8e
Perform wildcard expansion in Process::GetArgumentVector on Windows (PR17098)

On Windows, wildcard expansion isn't performed by the shell, but left to the
program itself. The common way to do this is to link with setargv.obj, which
performs the expansion on argc/argv before main is entered. However, we don't
use argv in Clang on Windows, but instead call GetCommandLineW so we can handle
unicode arguments. This means we have to do wildcard expansion ourselves.

A test case will be added on the Clang side.

Differential Revision: http://reviews.llvm.org/D4529

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213114 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Support/Windows/Process.inc