mstorsjo created this revision.
mstorsjo added reviewers: mclow.lists, EricWF, ldionne, compnerd, smeenai, rnk.
Herald added a subscriber: libcxx-commits.
mstorsjo edited the summary of this revision.

GCC and Clang in MinGW mode don't support `__declspec(thread)`, which after 
expanding macros ends up as `__attribute__((thread))`. Use the GCC specific 
attribute `__thread` instead (the next one in the chain of alternatives).


Repository:
  rUNW libunwind

https://reviews.llvm.org/D56905

Files:
  src/Unwind-sjlj.c


Index: src/Unwind-sjlj.c
===================================================================
--- src/Unwind-sjlj.c
+++ src/Unwind-sjlj.c
@@ -52,7 +52,7 @@
 #else
 # if __STDC_VERSION__ >= 201112L
 #  define _LIBUNWIND_THREAD_LOCAL _Thread_local
-# elif defined(_WIN32)
+# elif defined(_MSC_VER)
 #  define _LIBUNWIND_THREAD_LOCAL __declspec(thread)
 # elif defined(__GNUC__) || defined(__clang__)
 #  define _LIBUNWIND_THREAD_LOCAL __thread


Index: src/Unwind-sjlj.c
===================================================================
--- src/Unwind-sjlj.c
+++ src/Unwind-sjlj.c
@@ -52,7 +52,7 @@
 #else
 # if __STDC_VERSION__ >= 201112L
 #  define _LIBUNWIND_THREAD_LOCAL _Thread_local
-# elif defined(_WIN32)
+# elif defined(_MSC_VER)
 #  define _LIBUNWIND_THREAD_LOCAL __declspec(thread)
 # elif defined(__GNUC__) || defined(__clang__)
 #  define _LIBUNWIND_THREAD_LOCAL __thread
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to