summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2018-11-06 21:40:32 +0000
committerReid Kleckner <rnk@google.com>2018-11-06 21:40:32 +0000
commit0d56edb9abe7f2206736ca9ac03999f7dcaf318d (patch)
treed273a6b099a88c3943f86934ba96e89a37f6ffcb
parent73bf0af32f7356cbeb22919ac21deff1c4b30855 (diff)
downloadbcm5719-llvm-0d56edb9abe7f2206736ca9ac03999f7dcaf318d.tar.gz
bcm5719-llvm-0d56edb9abe7f2206736ca9ac03999f7dcaf318d.zip
Silence deprecation warning for GetVersionEx with clang-cl
llvm-svn: 346268
-rw-r--r--llvm/lib/Support/Windows/WindowsSupport.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/Support/Windows/WindowsSupport.h b/llvm/lib/Support/Windows/WindowsSupport.h
index e05c3a73f2f..cfb5c0dd470 100644
--- a/llvm/lib/Support/Windows/WindowsSupport.h
+++ b/llvm/lib/Support/Windows/WindowsSupport.h
@@ -96,12 +96,19 @@ inline llvm::VersionTuple GetWindowsOSVersion() {
#pragma warning(push)
#pragma warning(disable : 4996)
#endif // _MSC_VER
+#if defined(__clang__)
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated"
+#endif // __clang__
// 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(__clang__)
+#pragma clang diagnostic pop
+#endif // __clang__
#if defined(_MSC_VER)
#pragma warning(pop)
#endif // _MSC_VER
OpenPOWER on IntegriCloud