diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2016-06-23 14:45:54 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2016-06-23 14:45:54 +0000 |
commit | 0da8b2ec09fc8a919ffaef9662cc2ba85e1fbd11 (patch) | |
tree | e41b99e28917d7c79a1e7a93b55aaea8e92c71c8 /llvm/lib/Support/Windows | |
parent | b06a359bebcc84052cff646ae90bd56c3f740608 (diff) | |
download | bcm5719-llvm-0da8b2ec09fc8a919ffaef9662cc2ba85e1fbd11.tar.gz bcm5719-llvm-0da8b2ec09fc8a919ffaef9662cc2ba85e1fbd11.zip |
Explicitly specify the ANSI version of these Win32 APIs. While these are seemingly unrelated changes, they are all NFC because we currently default to the ANSI versions of the APIs when building for Windows. This simply makes the ANSI usage explicit.
llvm-svn: 273564
Diffstat (limited to 'llvm/lib/Support/Windows')
-rw-r--r-- | llvm/lib/Support/Windows/Signals.inc | 6 | ||||
-rw-r--r-- | llvm/lib/Support/Windows/WindowsSupport.h | 10 |
2 files changed, 8 insertions, 8 deletions
diff --git a/llvm/lib/Support/Windows/Signals.inc b/llvm/lib/Support/Windows/Signals.inc index 834f50ad10e..1e2fa4210df 100644 --- a/llvm/lib/Support/Windows/Signals.inc +++ b/llvm/lib/Support/Windows/Signals.inc @@ -588,9 +588,9 @@ void llvm::sys::RunInterruptHandlers() { /// \returns a valid HKEY if the location exists, else NULL. static HKEY FindWERKey(const llvm::Twine &RegistryLocation) { HKEY Key; - if (ERROR_SUCCESS != ::RegOpenKeyEx(HKEY_LOCAL_MACHINE, - RegistryLocation.str().c_str(), 0, - KEY_QUERY_VALUE | KEY_READ, &Key)) + if (ERROR_SUCCESS != ::RegOpenKeyExA(HKEY_LOCAL_MACHINE, + RegistryLocation.str().c_str(), 0, + KEY_QUERY_VALUE | KEY_READ, &Key)) return NULL; return Key; diff --git a/llvm/lib/Support/Windows/WindowsSupport.h b/llvm/lib/Support/Windows/WindowsSupport.h index fa611a955af..18ecdf4e73d 100644 --- a/llvm/lib/Support/Windows/WindowsSupport.h +++ b/llvm/lib/Support/Windows/WindowsSupport.h @@ -68,15 +68,15 @@ inline bool RunningWindows8OrGreater() { Mask) != FALSE; } -inline bool MakeErrMsg(std::string* ErrMsg, const std::string& prefix) { +inline bool MakeErrMsg(std::string *ErrMsg, const std::string &prefix) { if (!ErrMsg) return true; char *buffer = NULL; DWORD LastError = GetLastError(); - DWORD R = FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | - FORMAT_MESSAGE_FROM_SYSTEM | - FORMAT_MESSAGE_MAX_WIDTH_MASK, - NULL, LastError, 0, (LPSTR)&buffer, 1, NULL); + DWORD R = FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER | + FORMAT_MESSAGE_FROM_SYSTEM | + FORMAT_MESSAGE_MAX_WIDTH_MASK, + NULL, LastError, 0, (LPSTR)&buffer, 1, NULL); if (R) *ErrMsg = prefix + ": " + buffer; else |