[PATCH] D25468: [libcxx] Do not declare the thread api when __external_threading is present

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 11 14:35:31 PDT 2016


EricWF added inline comments.


================
Comment at: include/__threading_support:25
 // redundancy is intentional.
 #if defined(_LIBCPP_HAS_THREAD_API_EXTERNAL)
 #if !defined(__clang__) && (_GNUC_VER < 500)
----------------
If `_LIBCPP_HAS_THREAD_API_EXTERNAL` is defined can't we just assume that `<__external_threading> is present?


================
Comment at: include/__threading_support:35
 
-#if !defined(_LIBCPP_EXTERNAL_THREADING)
+#if !defined(_LIBCPP_HAS_EXTERNAL_THREADING_HEADER)
 #include <pthread.h>
----------------
Instead of using a new macro couldn't this just be `_LIBCPP_HAS_THREAD_API_EXTERNAL`?


https://reviews.llvm.org/D25468





More information about the cfe-commits mailing list