diff options
Diffstat (limited to 'llvm/lib/Support/Windows/Process.inc')
-rw-r--r-- | llvm/lib/Support/Windows/Process.inc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/Support/Windows/Process.inc b/llvm/lib/Support/Windows/Process.inc index 34d294b..b9110d4 100644 --- a/llvm/lib/Support/Windows/Process.inc +++ b/llvm/lib/Support/Windows/Process.inc @@ -482,9 +482,18 @@ static RTL_OSVERSIONINFOEXW GetWindowsVer() { HMODULE hMod = ::GetModuleHandleW(L"ntdll.dll"); assert(hMod); +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wcast-function-type-mismatch" +#endif + auto getVer = (RtlGetVersionPtr)::GetProcAddress(hMod, "RtlGetVersion"); assert(getVer); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + RTL_OSVERSIONINFOEXW info{}; info.dwOSVersionInfoSize = sizeof(info); NTSTATUS r = getVer((PRTL_OSVERSIONINFOW)&info); |