[llvm] r192561 - Windows: Don't bother with pinning Kernel32.dll
David Majnemer
david.majnemer at gmail.com
Sun Oct 13 17:06:58 PDT 2013
Author: majnemer
Date: Sun Oct 13 19:06:58 2013
New Revision: 192561
URL: http://llvm.org/viewvc/llvm-project?rev=192561&view=rev
Log:
Windows: Don't bother with pinning Kernel32.dll
We don't delay load it so it shouldn't be going anywhere.
Modified:
llvm/trunk/lib/Support/Windows/RWMutex.inc
Modified: llvm/trunk/lib/Support/Windows/RWMutex.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Windows/RWMutex.inc?rev=192561&r1=192560&r2=192561&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Windows/RWMutex.inc (original)
+++ llvm/trunk/lib/Support/Windows/RWMutex.inc Sun Oct 13 19:06:58 2013
@@ -48,9 +48,7 @@ static bool loadSRW() {
if (!sChecked) {
sChecked = true;
- HMODULE hLib;
- ::GetModuleHandleExW(GET_MODULE_HANDLE_EX_FLAG_PIN, L"Kernel32.dll", &hLib);
- if (hLib) {
+ if (HMODULE hLib = ::GetModuleHandleW(L"Kernel32.dll")) {
fpInitializeSRWLock =
(VOID (WINAPI *)(PSRWLOCK))::GetProcAddress(hLib,
"InitializeSRWLock");
More information about the llvm-commits
mailing list