Windows: Don't bother with pinning Kernel32.dll

We don't delay load it so it shouldn't be going anywhere.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192561 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Majnemer 2013-10-14 00:06:58 +00:00
parent 4df7c5baa1
commit 9f27a47ff1

View File

@ -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");