Skip to content

[Support] Silence warnings when retrieving exported functions #97905

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion llvm/lib/Support/Windows/Process.inc
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,8 @@ static RTL_OSVERSIONINFOEXW GetWindowsVer() {
HMODULE hMod = ::GetModuleHandleW(L"ntdll.dll");
assert(hMod);

auto getVer = (RtlGetVersionPtr)::GetProcAddress(hMod, "RtlGetVersion");
auto getVer =
(RtlGetVersionPtr)(void *)::GetProcAddress(hMod, "RtlGetVersion");
assert(getVer);

RTL_OSVERSIONINFOEXW info{};
Expand Down
38 changes: 21 additions & 17 deletions llvm/lib/Support/Windows/Signals.inc
Original file line number Diff line number Diff line change
Expand Up @@ -171,23 +171,27 @@ static bool load64BitDebugHelp(void) {
HMODULE hLib =
::LoadLibraryExA("Dbghelp.dll", NULL, LOAD_LIBRARY_SEARCH_SYSTEM32);
if (hLib) {
fMiniDumpWriteDump =
(fpMiniDumpWriteDump)::GetProcAddress(hLib, "MiniDumpWriteDump");
fStackWalk64 = (fpStackWalk64)::GetProcAddress(hLib, "StackWalk64");
fSymGetModuleBase64 =
(fpSymGetModuleBase64)::GetProcAddress(hLib, "SymGetModuleBase64");
fSymGetSymFromAddr64 =
(fpSymGetSymFromAddr64)::GetProcAddress(hLib, "SymGetSymFromAddr64");
fSymGetLineFromAddr64 =
(fpSymGetLineFromAddr64)::GetProcAddress(hLib, "SymGetLineFromAddr64");
fSymGetModuleInfo64 =
(fpSymGetModuleInfo64)::GetProcAddress(hLib, "SymGetModuleInfo64");
fSymFunctionTableAccess64 = (fpSymFunctionTableAccess64)::GetProcAddress(
hLib, "SymFunctionTableAccess64");
fSymSetOptions = (fpSymSetOptions)::GetProcAddress(hLib, "SymSetOptions");
fSymInitialize = (fpSymInitialize)::GetProcAddress(hLib, "SymInitialize");
fEnumerateLoadedModules = (fpEnumerateLoadedModules)::GetProcAddress(
hLib, "EnumerateLoadedModules64");
fMiniDumpWriteDump = (fpMiniDumpWriteDump)(void *)::GetProcAddress(
hLib, "MiniDumpWriteDump");
fStackWalk64 = (fpStackWalk64)(void *)::GetProcAddress(hLib, "StackWalk64");
fSymGetModuleBase64 = (fpSymGetModuleBase64)(void *)::GetProcAddress(
hLib, "SymGetModuleBase64");
fSymGetSymFromAddr64 = (fpSymGetSymFromAddr64)(void *)::GetProcAddress(
hLib, "SymGetSymFromAddr64");
fSymGetLineFromAddr64 = (fpSymGetLineFromAddr64)(void *)::GetProcAddress(
hLib, "SymGetLineFromAddr64");
fSymGetModuleInfo64 = (fpSymGetModuleInfo64)(void *)::GetProcAddress(
hLib, "SymGetModuleInfo64");
fSymFunctionTableAccess64 =
(fpSymFunctionTableAccess64)(void *)::GetProcAddress(
hLib, "SymFunctionTableAccess64");
fSymSetOptions =
(fpSymSetOptions)(void *)::GetProcAddress(hLib, "SymSetOptions");
fSymInitialize =
(fpSymInitialize)(void *)::GetProcAddress(hLib, "SymInitialize");
fEnumerateLoadedModules =
(fpEnumerateLoadedModules)(void *)::GetProcAddress(
hLib, "EnumerateLoadedModules64");
}
return isDebugHelpInitialized();
}
Expand Down
Loading