Author: ericwf
Date: Thu May 25 18:39:29 2017
New Revision: 303936

URL: http://llvm.org/viewvc/llvm-project?rev=303936&view=rev
Log:
Re-add <experimental/coroutine> to the module map.

The original issues were caused because <experimental/coroutine>
didn't correctly #ifdef out enough of the header, which caused incomplete
types to be used.

This patch fixes the `#if defined(__cpp_coroutines)` guard and re-adds
the headers to the module map.

It also uglifies some incorrectly non-reserved names.

Modified:
    libcxx/trunk/include/experimental/coroutine
    libcxx/trunk/include/module.modulemap

Modified: libcxx/trunk/include/experimental/coroutine
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/experimental/coroutine?rev=303936&r1=303935&r2=303936&view=diff
==============================================================================
--- libcxx/trunk/include/experimental/coroutine (original)
+++ libcxx/trunk/include/experimental/coroutine Thu May 25 18:39:29 2017
@@ -85,7 +85,7 @@ struct _LIBCPP_TEMPLATE_VIS coroutine_tr
 {
 };
 
-template <typename Promise = void>
+template <typename _Promise = void>
 class _LIBCPP_TEMPLATE_VIS coroutine_handle;
 
 #if defined(__cpp_coroutines)
@@ -217,8 +217,6 @@ public:
     }
 };
 
-#endif // defined(__cpp_coroutines)
-
 struct _LIBCPP_TYPE_VIS suspend_never {
   _LIBCPP_ALWAYS_INLINE
   bool await_ready() const noexcept { return true; }
@@ -237,6 +235,8 @@ struct _LIBCPP_TYPE_VIS suspend_always {
   void await_resume() const noexcept {}
 };
 
+#endif // defined(__cpp_coroutines)
+
 _LIBCPP_END_NAMESPACE_EXPERIMENTAL_COROUTINES
 
 _LIBCPP_BEGIN_NAMESPACE_STD

Modified: libcxx/trunk/include/module.modulemap
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/module.modulemap?rev=303936&r1=303935&r2=303936&view=diff
==============================================================================
--- libcxx/trunk/include/module.modulemap (original)
+++ libcxx/trunk/include/module.modulemap Thu May 25 18:39:29 2017
@@ -501,12 +501,10 @@ module std [system] {
       header "experimental/chrono"
       export *
     }
-    // FIXME: This module only works when -fcoroutines-ts is enabled and it
-    // breaks the modules build otherwise.
-    // module coroutine {
-    //  header "experimental/coroutine"
-    //  export *
-    // }
+     module coroutine {
+      header "experimental/coroutine"
+      export *
+    }
     module deque {
       header "experimental/deque"
       export *


_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to