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

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 23 12:32:52 PST 2020

mstorsjo added a comment.

In D91851#2411671 <https://reviews.llvm.org/D91851#2411671>, @compnerd wrote:

> I don't have an objection to the change, but would like more details added to the commit message.  It is unclear to me why the change is needed as clang does accept this I believe (and a quick test seems to indicate so as well).

While clang does support those pragmas, it only recognizes them in MSVC(/itanium) mode, it doesn't in mingw mode, where I currently get these warnings:

  ../lib/builtins/emutls.c:185:9: warning: unknown pragma ignored [-Wunknown-pragmas]
  #pragma warning(push)
  ../lib/builtins/emutls.c:186:9: warning: unknown pragma ignored [-Wunknown-pragmas]
  #pragma warning(disable : 4100)
  ../lib/builtins/emutls.c:254:9: warning: unknown pragma ignored [-Wunknown-pragmas]
  #pragma warning(pop)

I can amend the commit message to something similar to this.

  rG LLVM Github Monorepo



More information about the llvm-commits mailing list