summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2017-05-25 23:39:29 +0000
committerEric Fiselier <eric@efcs.ca>2017-05-25 23:39:29 +0000
commitea96891fb42866d099188d014169ab147217d4ef (patch)
treee75d0b66e16edf776dd9732eef13b4def29edd84
parentfed467eefb75e4af9ca1b534019eb5780aaf0984 (diff)
downloadbcm5719-llvm-ea96891fb42866d099188d014169ab147217d4ef.tar.gz
bcm5719-llvm-ea96891fb42866d099188d014169ab147217d4ef.zip
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. llvm-svn: 303936
-rw-r--r--libcxx/include/experimental/coroutine6
-rw-r--r--libcxx/include/module.modulemap10
2 files changed, 7 insertions, 9 deletions
diff --git a/libcxx/include/experimental/coroutine b/libcxx/include/experimental/coroutine
index f2b3e4edeaa..161f95bde55 100644
--- a/libcxx/include/experimental/coroutine
+++ b/libcxx/include/experimental/coroutine
@@ -85,7 +85,7 @@ struct _LIBCPP_TEMPLATE_VIS coroutine_traits
{
};
-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
diff --git a/libcxx/include/module.modulemap b/libcxx/include/module.modulemap
index ad765c07d48..462d4234ae6 100644
--- a/libcxx/include/module.modulemap
+++ b/libcxx/include/module.modulemap
@@ -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 *
OpenPOWER on IntegriCloud