[libcxx] [Coroutine] Conform Coroutine Implementation
Since coroutine is merged in C++ standard and the support for coroutine
seems relatively stable. It's the time to move the implementation of
coroutine out of the experimental directory and the std::experimental
namespace. This patch creates header <coroutine> with conformed
implementation with C++ standard. To avoid breaking user's code too
fast, the <experimental/coroutine> header is remained. Note that
<experimental/coroutine> is deprecated and it would be removed in
LLVM15.
Reviewed By: Quuxplusone, ldionne
Differential Revision: https://reviews.llvm.org/D109433
NOKEYCHECK=True
GitOrigin-RevId: 2e6ae1d3f2de1aa96ace695ddd6dc58ef259e248
diff --git a/include/module.modulemap b/include/module.modulemap
index 2f96f9a..39b8a66 100644
--- a/include/module.modulemap
+++ b/include/module.modulemap
@@ -417,6 +417,19 @@
header "condition_variable"
export *
}
+ module coroutine {
+ requires coroutines
+ header "coroutine"
+ export compare
+ export *
+
+ module __coroutine {
+ module coroutine_handle { private header "__coroutine/coroutine_handle.h" }
+ module coroutine_traits { private header "__coroutine/coroutine_traits.h" }
+ module trivial_awaitables { private header "__coroutine/trivial_awaitables.h" }
+ module noop_coroutine_handle { private header "__coroutine/noop_coroutine_handle.h" }
+ }
+ }
module deque {
header "deque"
export initializer_list