[libcxx-commits] [PATCH] D135274: [libc++] Remove _LIBCPP_HAS_NO_CXX20_COROUTINES

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Oct 5 08:36:49 PDT 2022


ldionne created this revision.
Herald added a subscriber: ChuanqiXu.
Herald added a project: All.
ldionne requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

As far as I can tell, all the compilers we support have support for
C++20 coroutines now.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D135274

Files:
  libcxx/include/__config
  libcxx/include/__coroutine/coroutine_handle.h
  libcxx/include/__coroutine/coroutine_traits.h
  libcxx/include/__coroutine/noop_coroutine_handle.h
  libcxx/include/__coroutine/trivial_awaitables.h


Index: libcxx/include/__coroutine/trivial_awaitables.h
===================================================================
--- libcxx/include/__coroutine/trivial_awaitables.h
+++ libcxx/include/__coroutine/trivial_awaitables.h
@@ -16,7 +16,7 @@
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CXX20_COROUTINES)
+#if _LIBCPP_STD_VER > 17
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 
@@ -41,6 +41,6 @@
 
 _LIBCPP_END_NAMESPACE_STD
 
-#endif // __LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CXX20_COROUTINES)
+#endif // __LIBCPP_STD_VER > 17
 
 #endif // __LIBCPP___COROUTINE_TRIVIAL_AWAITABLES_H
Index: libcxx/include/__coroutine/noop_coroutine_handle.h
===================================================================
--- libcxx/include/__coroutine/noop_coroutine_handle.h
+++ libcxx/include/__coroutine/noop_coroutine_handle.h
@@ -16,7 +16,7 @@
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CXX20_COROUTINES)
+#if _LIBCPP_STD_VER > 17
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 
@@ -107,6 +107,6 @@
 
 _LIBCPP_END_NAMESPACE_STD
 
-#endif // __LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CXX20_COROUTINES)
+#endif // __LIBCPP_STD_VER > 17
 
 #endif // _LIBCPP___COROUTINE_NOOP_COROUTINE_HANDLE_H
Index: libcxx/include/__coroutine/coroutine_traits.h
===================================================================
--- libcxx/include/__coroutine/coroutine_traits.h
+++ libcxx/include/__coroutine/coroutine_traits.h
@@ -16,7 +16,7 @@
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CXX20_COROUTINES)
+#if _LIBCPP_STD_VER > 17
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 
@@ -48,6 +48,6 @@
 
 _LIBCPP_END_NAMESPACE_STD
 
-#endif // __LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CXX20_COROUTINES)
+#endif // __LIBCPP_STD_VER > 17
 
 #endif // _LIBCPP___COROUTINE_COROUTINE_TRAITS_H
Index: libcxx/include/__coroutine/coroutine_handle.h
===================================================================
--- libcxx/include/__coroutine/coroutine_handle.h
+++ libcxx/include/__coroutine/coroutine_handle.h
@@ -20,7 +20,7 @@
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CXX20_COROUTINES)
+#if _LIBCPP_STD_VER > 17
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 
@@ -197,6 +197,6 @@
 
 _LIBCPP_END_NAMESPACE_STD
 
-#endif // __LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CXX20_COROUTINES)
+#endif // __LIBCPP_STD_VER > 17
 
 #endif // _LIBCPP___COROUTINE_COROUTINE_HANDLE_H
Index: libcxx/include/__config
===================================================================
--- libcxx/include/__config
+++ libcxx/include/__config
@@ -1080,10 +1080,6 @@
 #    define _LIBCPP_ENABLE_CXX20_REMOVED_TYPE_TRAITS
 #  endif // _LIBCPP_ENABLE_CXX20_REMOVED_FEATURES
 
-#  if !defined(__cpp_impl_coroutine) || __cpp_impl_coroutine < 201902L
-#    define _LIBCPP_HAS_NO_CXX20_COROUTINES
-#  endif
-
 #  define _LIBCPP_PUSH_MACROS _Pragma("push_macro(\"min\")") _Pragma("push_macro(\"max\")")
 #  define _LIBCPP_POP_MACROS _Pragma("pop_macro(\"min\")") _Pragma("pop_macro(\"max\")")
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D135274.465416.patch
Type: text/x-patch
Size: 3112 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20221005/07e95827/attachment.bin>


More information about the libcxx-commits mailing list