[PATCH] D91851: [compiler-rt] [emutls] Add ifdefs around msvc specific pragmas
Martin Storsjö via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 20 01:41:15 PST 2020
mstorsjo created this revision.
mstorsjo added reviewers: compnerd, amccarth.
Herald added subscribers: Sanitizers, dberris.
Herald added a project: Sanitizers.
mstorsjo requested review of this revision.
This fixes warnings when building for mingw.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D91851
Files:
compiler-rt/lib/builtins/emutls.c
Index: compiler-rt/lib/builtins/emutls.c
===================================================================
--- compiler-rt/lib/builtins/emutls.c
+++ compiler-rt/lib/builtins/emutls.c
@@ -182,8 +182,10 @@
}
}
+#if defined(_MSC_VER)
#pragma warning(push)
#pragma warning(disable : 4100)
+#endif
static BOOL CALLBACK emutls_init(PINIT_ONCE p0, PVOID p1, PVOID *p2) {
emutls_mutex =
(LPCRITICAL_SECTION)_aligned_malloc(sizeof(CRITICAL_SECTION), 16);
@@ -251,7 +253,9 @@
#endif // __ATOMIC_RELEASE
+#if defined(_MSC_VER)
#pragma warning(pop)
+#endif
#endif // _WIN32
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91851.306622.patch
Type: text/x-patch
Size: 594 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201120/f1cda33a/attachment.bin>
More information about the llvm-commits
mailing list