[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 14:56:42 PST 2020

mstorsjo added a comment.

In D91851#2412382 <https://reviews.llvm.org/D91851#2412382>, @mstorsjo wrote:

> In D91851#2412367 <https://reviews.llvm.org/D91851#2412367>, @compnerd wrote:
>> Would be nice to actually mention that in the commit message and adjust the condition to indicate that (`!defined(__MINGW32__) && !defined(__MINGW64__)`).
> I think that's kind of inverts the logic IMO. We have an MSVC specific pragma in win32-generic code, and thus the ifdef should check for presence of `_MSC_VER`, not the absence of something else.

... and just to remind; clang in msvc mode also defines `_MSC_VER`, so it has the same effect as what you suggested (excluding the pragma in mingw mode), but with less inverted logic (and would also get rid of the warning for cygwin I think, if that target would end up in this codepath).

  rG LLVM Github Monorepo



More information about the llvm-commits mailing list