[PATCH] D72399: [Support] Replace Windows __declspec(thread) with thread_local in LLVM_THREAD_LOCAL

Russell Gallop via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 10 05:26:32 PST 2020


russell.gallop marked 2 inline comments as done.
russell.gallop added inline comments.


================
Comment at: llvm/include/llvm/Support/Compiler.h:516
 #if LLVM_ENABLE_THREADS
-#if __has_feature(cxx_thread_local)
+#if __has_feature(cxx_thread_local) or defined(_MSC_VER)
 #define LLVM_THREAD_LOCAL thread_local
----------------
mstorsjo wrote:
> I'd suggest using `||` instead of `or` here, for consistency, even if both probably(?) are supported (I wasn't aware of this existing at all before).
Sorry, I'd fixed that locally but uploaded an old patch. Thanks for spotting this. Fixed now.


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

https://reviews.llvm.org/D72399





More information about the llvm-commits mailing list