[llvm] 172ccfe - [Support] [Windows] Stop redefining _WIN32_IE (#102307)

via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 7 11:57:31 PDT 2024


Author: Martin Storsjö
Date: 2024-08-07T21:57:28+03:00
New Revision: 172ccfeeb4a037f2f5e42aafd597f0f019ad6fc0

URL: https://github.com/llvm/llvm-project/commit/172ccfeeb4a037f2f5e42aafd597f0f019ad6fc0
DIFF: https://github.com/llvm/llvm-project/commit/172ccfeeb4a037f2f5e42aafd597f0f019ad6fc0.diff

LOG: [Support] [Windows] Stop redefining _WIN32_IE (#102307)

This was added in 181fd8cd89ff97fe654fabbb2032e0ad6607b4d0, where the
shlobj.h header was taken into use. The shlobj.h header does have some
APIs conditionally visible based on the _WIN32_IE define, but none of
the calls added in that commit seem to need any specific version.

fd6cb64c4891301648e5ab814afdafa118977c3d and
6b129bd464831194da957b3462d7ddd27a0b2a08 further bumped the version it
is set to, while the latter also added a FIXME to check whether it still
is needed.

It doesn't seem to be needed currently; the code currently builds fine
without this define, both with mingw-w64 and MSVC.

Additionally, to show that the value of _WIN32_IE doesn't seem to be
relevant to our builds these days - if the current define is changed to
hardcode _WIN32_IE to an ancient value like 0x0400, our code still
builds fine, both with mingw-w64 and MSVC. Therefore, overriding this
define no longer seem to be relevant.

Added: 
    

Modified: 
    llvm/include/llvm/Support/Windows/WindowsSupport.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/Support/Windows/WindowsSupport.h b/llvm/include/llvm/Support/Windows/WindowsSupport.h
index d3aacd14b2097b..6f5aae2485c525 100644
--- a/llvm/include/llvm/Support/Windows/WindowsSupport.h
+++ b/llvm/include/llvm/Support/Windows/WindowsSupport.h
@@ -23,11 +23,9 @@
 
 // mingw-w64 tends to define it as 0x0502 in its headers.
 #undef _WIN32_WINNT
-#undef _WIN32_IE
 
 // Require at least Windows 7 API.
 #define _WIN32_WINNT 0x0601
-#define _WIN32_IE    0x0800 // MinGW at it again. FIXME: verify if still needed.
 #define WIN32_LEAN_AND_MEAN
 #ifndef NOMINMAX
 #define NOMINMAX


        


More information about the llvm-commits mailing list