[PATCH] D91851: [compiler-rt] [emutls] Add ifdefs around msvc specific pragmas

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 24 02:38:01 PST 2020


mstorsjo added subscribers: mcgov, marsupial.
mstorsjo added inline comments.


================
Comment at: compiler-rt/lib/builtins/emutls.c:33
 #pragma warning(push)
 #pragma warning(disable : 4206)
 #endif
----------------
I also noticed that we have a similar case elsewhere already in the same file, which uses `#if defined(_MSC_VER) && !defined(__clang__)`.


================
Comment at: compiler-rt/lib/builtins/emutls.c:187
 #pragma warning(push)
 #pragma warning(disable : 4100)
+#endif
----------------
I looked up warning 4100, https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-4-c4100, which is "unreferenced formal parameter". So I would guess one could silence that also just with a couple `(void)p0; (void)p1; (void)p2;` in the function...


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D91851/new/

https://reviews.llvm.org/D91851



More information about the llvm-commits mailing list