diff options
author | David Majnemer <david.majnemer@gmail.com> | 2013-10-07 09:52:36 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2013-10-07 09:52:36 +0000 |
commit | ae06a63be5a1279739e0c8a2006e72f4bc687d57 (patch) | |
tree | 636622c31be132769d0c843fb4cd9ce516e8399e /lib/Support/Windows/Program.inc | |
parent | c84c742eddc0c57c34271471f332c9857d79e672 (diff) | |
download | external_llvm-ae06a63be5a1279739e0c8a2006e72f4bc687d57.zip external_llvm-ae06a63be5a1279739e0c8a2006e72f4bc687d57.tar.gz external_llvm-ae06a63be5a1279739e0c8a2006e72f4bc687d57.tar.bz2 |
Windows: Be more explicit with Win32 APIs
This addresses several issues in a similar vein:
- Use the Unicode APIs when possible, running nm on clang shows that we
only use Unicode APIs except for FormatMessage, CreateSemaphore, and
GetModuleHandle. AFAICT, the latter two are coming from MinGW and
not LLVM itself.
- Make getMainExecutable more resilient. It previously considered
return values of zero from ::GetModuleFileNameA to be acceptable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192096 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/Windows/Program.inc')
-rw-r--r-- | lib/Support/Windows/Program.inc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Support/Windows/Program.inc b/lib/Support/Windows/Program.inc index e464e2f..7a3188b 100644 --- a/lib/Support/Windows/Program.inc +++ b/lib/Support/Windows/Program.inc @@ -335,7 +335,7 @@ static bool Execute(ProcessInfo &PI, StringRef Program, const char **args, // Assign the process to a job if a memory limit is defined. ScopedJobHandle hJob; if (memoryLimit != 0) { - hJob = CreateJobObject(0, 0); + hJob = CreateJobObjectW(0, 0); bool success = false; if (hJob) { JOBOBJECT_EXTENDED_LIMIT_INFORMATION jeli; |