Windows: Be more explicit with Win32 APIs
authorDavid Majnemer <david.majnemer@gmail.com>
Mon, 7 Oct 2013 09:52:36 +0000 (09:52 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Mon, 7 Oct 2013 09:52:36 +0000 (09:52 +0000)
commitae06a63be5a1279739e0c8a2006e72f4bc687d57
tree636622c31be132769d0c843fb4cd9ce516e8399e
parentc84c742eddc0c57c34271471f332c9857d79e672
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
lib/Support/Windows/Path.inc
lib/Support/Windows/Program.inc
lib/Support/Windows/RWMutex.inc
lib/Support/Windows/Signals.inc