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

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 10 04:10:20 PST 2020


mstorsjo 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
----------------
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).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D72399





More information about the llvm-commits mailing list