[llvm] 57b76b4 - Revert "[Support] Silence function cast warning when building with Clang ToT targetting Windows"

Alexandre Ganea via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 6 09:01:07 PDT 2024


Author: Alexandre Ganea
Date: 2024-07-06T12:00:41-04:00
New Revision: 57b76b4210728a11a5a0c5ed869a251d5ad9742d

URL: https://github.com/llvm/llvm-project/commit/57b76b4210728a11a5a0c5ed869a251d5ad9742d
DIFF: https://github.com/llvm/llvm-project/commit/57b76b4210728a11a5a0c5ed869a251d5ad9742d.diff

LOG: Revert "[Support] Silence function cast warning when building with Clang ToT targetting Windows"

This reverts commit 593f708118aef792f434185547f74fedeaf51dd4.

Added: 
    

Modified: 
    llvm/lib/Support/Windows/Process.inc
    llvm/lib/Support/Windows/Signals.inc

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Support/Windows/Process.inc b/llvm/lib/Support/Windows/Process.inc
index b9110d4e414fff..34d294b232c32b 100644
--- a/llvm/lib/Support/Windows/Process.inc
+++ b/llvm/lib/Support/Windows/Process.inc
@@ -482,18 +482,9 @@ 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);

diff  --git a/llvm/lib/Support/Windows/Signals.inc b/llvm/lib/Support/Windows/Signals.inc
index d057981c1c84cf..29ebf7c696e04f 100644
--- a/llvm/lib/Support/Windows/Signals.inc
+++ b/llvm/lib/Support/Windows/Signals.inc
@@ -167,11 +167,6 @@ static bool isDebugHelpInitialized() {
   return fStackWalk64 && fSymInitialize && fSymSetOptions && fMiniDumpWriteDump;
 }
 
-#if defined(__clang__)
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wcast-function-type-mismatch"
-#endif
-
 static bool load64BitDebugHelp(void) {
   HMODULE hLib =
       ::LoadLibraryExA("Dbghelp.dll", NULL, LOAD_LIBRARY_SEARCH_SYSTEM32);
@@ -197,10 +192,6 @@ static bool load64BitDebugHelp(void) {
   return isDebugHelpInitialized();
 }
 
-#if defined(__clang__)
-#pragma clang diagnostic pop
-#endif
-
 using namespace llvm;
 
 // Forward declare.


        


More information about the llvm-commits mailing list