[PATCH] D54133: Fix `warning: unknown pragma ignored` for mingw target
Martin Storsjö via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 6 01:10:48 PST 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL346218: [Support] Fix `warning: unknown pragma ignored` for mingw target (authored by mstorsjo, committed by ).
Repository:
rL LLVM
https://reviews.llvm.org/D54133
Files:
llvm/trunk/lib/Support/Windows/WindowsSupport.h
Index: llvm/trunk/lib/Support/Windows/WindowsSupport.h
===================================================================
--- llvm/trunk/lib/Support/Windows/WindowsSupport.h
+++ llvm/trunk/lib/Support/Windows/WindowsSupport.h
@@ -92,15 +92,19 @@
OSVERSIONINFOEX info;
ZeroMemory(&info, sizeof(OSVERSIONINFOEX));
info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
+#if defined(_MSC_VER)
#pragma warning(push)
#pragma warning(disable : 4996)
+#endif // _MSC_VER
// Starting with Microsoft SDK for Windows 8.1, this function is deprecated
// in favor of the new Windows Version Helper APIs. Since we don't specify a
// minimum SDK version, it's easier to simply disable the warning rather than
// try to support both APIs.
if (GetVersionEx((LPOSVERSIONINFO)&info) == 0)
return llvm::VersionTuple();
+#if defined(_MSC_VER)
#pragma warning(pop)
+#endif // _MSC_VER
return llvm::VersionTuple(info.dwMajorVersion, info.dwMinorVersion, 0,
info.dwBuildNumber);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54133.172718.patch
Type: text/x-patch
Size: 1021 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181106/4d8dcf08/attachment.bin>
More information about the llvm-commits
mailing list