diff options
author | David Majnemer <david.majnemer@gmail.com> | 2013-10-14 00:06:58 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2013-10-14 00:06:58 +0000 |
commit | 9f27a47ff1b00f4d34529ca4b7fbb84292c523c6 (patch) | |
tree | 377c7559163fe5ceba0107f0e1ed9a210026c4cf /lib/Support/Windows | |
parent | 4df7c5baa1dfe2d9de7eef2600c9ac325e9fdcd6 (diff) | |
download | llvm-9f27a47ff1b00f4d34529ca4b7fbb84292c523c6.tar.gz llvm-9f27a47ff1b00f4d34529ca4b7fbb84292c523c6.tar.bz2 llvm-9f27a47ff1b00f4d34529ca4b7fbb84292c523c6.tar.xz |
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
Diffstat (limited to 'lib/Support/Windows')
-rw-r--r-- | lib/Support/Windows/RWMutex.inc | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/Support/Windows/RWMutex.inc b/lib/Support/Windows/RWMutex.inc index 7d15828867..c4318448e7 100644 --- a/lib/Support/Windows/RWMutex.inc +++ b/lib/Support/Windows/RWMutex.inc @@ -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"); |