[libc++] Remove <experimental/coroutine>
authorChuanqi Xu <yedeng.yd@linux.alibaba.com>
Thu, 23 Sep 2021 14:33:45 +0000 (10:33 -0400)
committerLouis Dionne <ldionne.2@gmail.com>
Mon, 30 Jan 2023 21:32:48 +0000 (16:32 -0500)
We've been shipping <coroutine> since LLVM 14, so LLVM 17 won't ship
the <experimental/coroutine> header per our policy for removing TSes.

Differential Revision: https://reviews.llvm.org/D108697

53 files changed:
libcxx/CMakeLists.txt
libcxx/docs/ReleaseNotes.rst
libcxx/include/CMakeLists.txt
libcxx/include/experimental/__config
libcxx/include/experimental/coroutine [deleted file]
libcxx/include/module.modulemap.in
libcxx/test/libcxx/assertions/headers_declare_verbose_abort.sh.cpp
libcxx/test/libcxx/clang_tidy.sh.cpp
libcxx/test/libcxx/double_include.sh.cpp
libcxx/test/libcxx/experimental/language.support/support.coroutines/dialect_support.pass.cpp [deleted file]
libcxx/test/libcxx/experimental/language.support/support.coroutines/version.pass.cpp [deleted file]
libcxx/test/libcxx/min_max_macros.compile.pass.cpp
libcxx/test/libcxx/modules_include.sh.cpp
libcxx/test/libcxx/nasty_macros.compile.pass.cpp
libcxx/test/libcxx/no_assert_include.compile.pass.cpp
libcxx/test/libcxx/transitive_includes.sh.cpp
libcxx/test/libcxx/transitive_includes/cxx03.csv
libcxx/test/libcxx/transitive_includes/cxx11.csv
libcxx/test/libcxx/transitive_includes/cxx14.csv
libcxx/test/libcxx/transitive_includes/cxx17.csv
libcxx/test/libcxx/transitive_includes/cxx20.csv
libcxx/test/libcxx/transitive_includes/cxx2b.csv
libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.capacity/operator_bool.pass.cpp [deleted file]
libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.compare/equal_comp.pass.cpp [deleted file]
libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.compare/less_comp.pass.cpp [deleted file]
libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.completion/done.pass.cpp [deleted file]
libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.con/assign.pass.cpp [deleted file]
libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.con/construct.pass.cpp [deleted file]
libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.export/address.pass.cpp [deleted file]
libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.export/from_address.fail.cpp [deleted file]
libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.export/from_address.pass.cpp [deleted file]
libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.hash/hash.pass.cpp [deleted file]
libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.noop/noop_coroutine.pass.cpp [deleted file]
libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.prom/promise.pass.cpp [deleted file]
libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.resumption/destroy.pass.cpp [deleted file]
libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.resumption/resume.pass.cpp [deleted file]
libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/void_handle.pass.cpp [deleted file]
libcxx/test/std/experimental/language.support/support.coroutines/coroutine.traits/promise_type.pass.cpp [deleted file]
libcxx/test/std/experimental/language.support/support.coroutines/coroutine.trivial.awaitables/suspend_always.pass.cpp [deleted file]
libcxx/test/std/experimental/language.support/support.coroutines/coroutine.trivial.awaitables/suspend_never.pass.cpp [deleted file]
libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/await_result.pass.cpp [deleted file]
libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/bool_await_suspend.pass.cpp [deleted file]
libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/expected.pass.cpp [deleted file]
libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/fullexpr-dtor.pass.cpp [deleted file]
libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/generator.pass.cpp [deleted file]
libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/go.pass.cpp [deleted file]
libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/multishot_func.pass.cpp [deleted file]
libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/oneshot_func.pass.cpp [deleted file]
libcxx/test/std/experimental/language.support/support.coroutines/includes.pass.cpp [deleted file]
libcxx/test/std/experimental/language.support/support.coroutines/lit.local.cfg [deleted file]
libcxx/utils/generate_header_tests.py
libcxx/utils/libcxx/test/features.py
libcxx/utils/libcxx/test/format.py

index f3b2c10..3a958e7 100644 (file)
@@ -538,11 +538,6 @@ function(cxx_add_basic_build_flags target)
     target_add_compile_flags_if_supported(${target} PRIVATE -fvisibility=hidden)
   endif()
 
-  if (LIBCXX_CONFIGURE_IDE)
-    # This simply allows IDE to process <experimental/coroutine>
-    target_add_compile_flags_if_supported(${target} PRIVATE -fcoroutines-ts)
-  endif()
-
   # Let the library headers know they are currently being used to build the
   # library.
   target_compile_definitions(${target} PRIVATE -D_LIBCPP_BUILDING_LIBRARY)
index 88a4859..268df3a 100644 (file)
@@ -44,6 +44,10 @@ Improvements and New Features
 Deprecations and Removals
 -------------------------
 
+- The ``<experimental/coroutine>`` header has been removed in this release. The ``<coroutine>`` header
+  has been shipping since LLVM 14, so the Coroutines TS implementation is being removed per our policy
+  for removing TSes.
+
 Upcoming Deprecations and Removals
 ----------------------------------
 
index 7b6ef9b..602d6e7 100644 (file)
@@ -773,7 +773,6 @@ set(files
   experimental/__config
   experimental/__memory
   experimental/algorithm
-  experimental/coroutine
   experimental/deque
   experimental/forward_list
   experimental/functional
index a71b348..839b80a 100644 (file)
 #define _LIBCPP_END_NAMESPACE_LFTS_PMR _LIBCPP_END_NAMESPACE_LFTS }
 #define _VSTD_LFTS_PMR _VSTD_LFTS::pmr
 
-#if !defined(__cpp_coroutines) || __cpp_coroutines < 201703L
-#define _LIBCPP_HAS_NO_EXPERIMENTAL_COROUTINES
-#endif
-
-#define _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL_COROUTINES \
-  _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL inline namespace coroutines_v1 {
-
-#define _LIBCPP_END_NAMESPACE_EXPERIMENTAL_COROUTINES \
-  } _LIBCPP_END_NAMESPACE_EXPERIMENTAL
-
-#define _VSTD_CORO _VSTD_EXPERIMENTAL::coroutines_v1
-
 #define _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL_SIMD \
     _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL inline namespace parallelism_v2 {
 
diff --git a/libcxx/include/experimental/coroutine b/libcxx/include/experimental/coroutine
deleted file mode 100644 (file)
index d9f3685..0000000
+++ /dev/null
@@ -1,344 +0,0 @@
-// -*- C++ -*-
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef _LIBCPP_EXPERIMENTAL_COROUTINE
-#define _LIBCPP_EXPERIMENTAL_COROUTINE
-
-/**
-    experimental/coroutine synopsis
-
-// C++next
-
-namespace std {
-namespace experimental {
-inline namespace coroutines_v1 {
-
-  // 18.11.1 coroutine traits
-template <typename R, typename... ArgTypes>
-class coroutine_traits;
-// 18.11.2 coroutine handle
-template <typename Promise = void>
-class coroutine_handle;
-// 18.11.2.7 comparison operators:
-bool operator==(coroutine_handle<> x, coroutine_handle<> y) _NOEXCEPT;
-bool operator!=(coroutine_handle<> x, coroutine_handle<> y) _NOEXCEPT;
-bool operator<(coroutine_handle<> x, coroutine_handle<> y) _NOEXCEPT;
-bool operator<=(coroutine_handle<> x, coroutine_handle<> y) _NOEXCEPT;
-bool operator>=(coroutine_handle<> x, coroutine_handle<> y) _NOEXCEPT;
-bool operator>(coroutine_handle<> x, coroutine_handle<> y) _NOEXCEPT;
-// 18.11.3 trivial awaitables
-struct suspend_never;
-struct suspend_always;
-// 18.11.2.8 hash support:
-template <class T> struct hash;
-template <class P> struct hash<coroutine_handle<P>>;
-
-} // namespace coroutines_v1
-} // namespace experimental
-} // namespace std
-
- */
-
-#include <__assert> // all public C++ headers provide the assertion handler
-#include <__functional/hash.h>
-#include <__functional/operations.h>
-#include <cstddef>
-#include <experimental/__config>
-#include <new>
-#include <type_traits>
-
-#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
-#  include <atomic>
-#  include <climits>
-#  include <cmath>
-#  include <compare>
-#  include <concepts>
-#  include <ctime>
-#  include <initializer_list>
-#  include <iosfwd>
-#  include <iterator>
-#  include <memory>
-#  include <ratio>
-#  include <stdexcept>
-#  include <tuple>
-#  include <typeinfo>
-#  include <utility>
-#  include <variant>
-#endif
-
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
-#  pragma GCC system_header
-#endif
-
-#ifndef _LIBCPP_HAS_NO_EXPERIMENTAL_COROUTINES
-
-_LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL_COROUTINES
-
-template <class _Tp, class = void>
-struct __coroutine_traits_sfinae {};
-
-template <class _Tp>
-struct __coroutine_traits_sfinae<_Tp, __void_t<typename _Tp::promise_type> >
-{
-  using promise_type = typename _Tp::promise_type;
-};
-
-template <typename _Ret, typename... _Args>
-struct coroutine_traits
-    : public __coroutine_traits_sfinae<_Ret>
-{
-};
-
-template <typename _Promise = void>
-class _LIBCPP_TEMPLATE_VIS coroutine_handle;
-
-template <>
-class _LIBCPP_TEMPLATE_VIS coroutine_handle<void> {
-public:
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR coroutine_handle() _NOEXCEPT : __handle_(nullptr) {}
-
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR coroutine_handle(nullptr_t) _NOEXCEPT : __handle_(nullptr) {}
-
-    _LIBCPP_INLINE_VISIBILITY
-    coroutine_handle& operator=(nullptr_t) _NOEXCEPT {
-        __handle_ = nullptr;
-        return *this;
-    }
-
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR void* address() const _NOEXCEPT { return __handle_; }
-
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR explicit operator bool() const _NOEXCEPT { return __handle_; }
-
-    _LIBCPP_INLINE_VISIBILITY
-    void operator()() { resume(); }
-
-    _LIBCPP_INLINE_VISIBILITY
-    void resume() {
-      _LIBCPP_ASSERT(__is_suspended(),
-                     "resume() can only be called on suspended coroutines");
-      _LIBCPP_ASSERT(!done(),
-                "resume() has undefined behavior when the coroutine is done");
-      __builtin_coro_resume(__handle_);
-    }
-
-    _LIBCPP_INLINE_VISIBILITY
-    void destroy() {
-      _LIBCPP_ASSERT(__is_suspended(),
-                     "destroy() can only be called on suspended coroutines");
-      __builtin_coro_destroy(__handle_);
-    }
-
-    _LIBCPP_INLINE_VISIBILITY
-    bool done() const {
-      _LIBCPP_ASSERT(__is_suspended(),
-                     "done() can only be called on suspended coroutines");
-      return __builtin_coro_done(__handle_);
-    }
-
-public:
-    _LIBCPP_INLINE_VISIBILITY
-    static coroutine_handle from_address(void* __addr) _NOEXCEPT {
-        coroutine_handle __tmp;
-        __tmp.__handle_ = __addr;
-        return __tmp;
-    }
-
-    // FIXME: Should from_address(nullptr) be allowed?
-    _LIBCPP_INLINE_VISIBILITY
-    static coroutine_handle from_address(nullptr_t) _NOEXCEPT {
-      return coroutine_handle(nullptr);
-    }
-
-    template <class _Tp, bool _CallIsValid = false>
-    static coroutine_handle from_address(_Tp*) {
-      static_assert(_CallIsValid,
-       "coroutine_handle<void>::from_address cannot be called with "
-        "non-void pointers");
-    }
-
-private:
-  bool __is_suspended() const _NOEXCEPT  {
-    // FIXME actually implement a check for if the coro is suspended.
-    return __handle_;
-  }
-
-  template <class _PromiseT> friend class coroutine_handle;
-  void* __handle_;
-};
-
-// 18.11.2.7 comparison operators:
-inline _LIBCPP_INLINE_VISIBILITY
-bool operator==(coroutine_handle<> __x, coroutine_handle<> __y) _NOEXCEPT {
-    return __x.address() == __y.address();
-}
-inline _LIBCPP_INLINE_VISIBILITY
-bool operator!=(coroutine_handle<> __x, coroutine_handle<> __y) _NOEXCEPT {
-    return !(__x == __y);
-}
-inline _LIBCPP_INLINE_VISIBILITY
-bool operator<(coroutine_handle<> __x, coroutine_handle<> __y) _NOEXCEPT {
-    return less<void*>()(__x.address(), __y.address());
-}
-inline _LIBCPP_INLINE_VISIBILITY
-bool operator>(coroutine_handle<> __x, coroutine_handle<> __y) _NOEXCEPT {
-    return __y < __x;
-}
-inline _LIBCPP_INLINE_VISIBILITY
-bool operator<=(coroutine_handle<> __x, coroutine_handle<> __y) _NOEXCEPT {
-    return !(__x > __y);
-}
-inline _LIBCPP_INLINE_VISIBILITY
-bool operator>=(coroutine_handle<> __x, coroutine_handle<> __y) _NOEXCEPT {
-    return !(__x < __y);
-}
-
-template <typename _Promise>
-class _LIBCPP_TEMPLATE_VIS coroutine_handle : public coroutine_handle<> {
-    using _Base = coroutine_handle<>;
-public:
-#ifndef _LIBCPP_CXX03_LANG
-    // 18.11.2.1 construct/reset
-    using coroutine_handle<>::coroutine_handle;
-#else
-    _LIBCPP_INLINE_VISIBILITY coroutine_handle() _NOEXCEPT : _Base() {}
-    _LIBCPP_INLINE_VISIBILITY coroutine_handle(nullptr_t) _NOEXCEPT : _Base(nullptr) {}
-#endif
-    _LIBCPP_INLINE_VISIBILITY
-    coroutine_handle& operator=(nullptr_t) _NOEXCEPT {
-        _Base::operator=(nullptr);
-        return *this;
-    }
-
-    _LIBCPP_INLINE_VISIBILITY
-    _Promise& promise() const {
-        return *static_cast<_Promise*>(
-            __builtin_coro_promise(this->__handle_, _LIBCPP_ALIGNOF(_Promise), false));
-    }
-
-public:
-    _LIBCPP_INLINE_VISIBILITY
-    static coroutine_handle from_address(void* __addr) _NOEXCEPT {
-        coroutine_handle __tmp;
-        __tmp.__handle_ = __addr;
-        return __tmp;
-    }
-
-    // NOTE: this overload isn't required by the standard but is needed so
-    // the deleted _Promise* overload doesn't make from_address(nullptr)
-    // ambiguous.
-    // FIXME: should from_address work with nullptr?
-    _LIBCPP_INLINE_VISIBILITY
-    static coroutine_handle from_address(nullptr_t) _NOEXCEPT {
-      return coroutine_handle(nullptr);
-    }
-
-    template <class _Tp, bool _CallIsValid = false>
-    static coroutine_handle from_address(_Tp*) {
-      static_assert(_CallIsValid,
-       "coroutine_handle<promise_type>::from_address cannot be called with "
-        "non-void pointers");
-    }
-
-    template <bool _CallIsValid = false>
-    static coroutine_handle from_address(_Promise*) {
-      static_assert(_CallIsValid,
-       "coroutine_handle<promise_type>::from_address cannot be used with "
-        "pointers to the coroutine's promise type; use 'from_promise' instead");
-    }
-
-    _LIBCPP_INLINE_VISIBILITY
-    static coroutine_handle from_promise(_Promise& __promise) _NOEXCEPT {
-        typedef __remove_cv_t<_Promise> _RawPromise;
-        coroutine_handle __tmp;
-        __tmp.__handle_ = __builtin_coro_promise(
-            _VSTD::addressof(const_cast<_RawPromise&>(__promise)),
-             _LIBCPP_ALIGNOF(_Promise), true);
-        return __tmp;
-    }
-};
-
-#if __has_builtin(__builtin_coro_noop)
-struct noop_coroutine_promise {};
-
-template <>
-class _LIBCPP_TEMPLATE_VIS coroutine_handle<noop_coroutine_promise>
-    : public coroutine_handle<> {
-  using _Base = coroutine_handle<>;
-  using _Promise = noop_coroutine_promise;
-public:
-
-  _LIBCPP_INLINE_VISIBILITY
-  _Promise& promise() const {
-    return *static_cast<_Promise*>(
-      __builtin_coro_promise(this->__handle_, _LIBCPP_ALIGNOF(_Promise), false));
-  }
-
-  _LIBCPP_CONSTEXPR explicit operator bool() const _NOEXCEPT { return true; }
-  _LIBCPP_CONSTEXPR bool done() const _NOEXCEPT { return false; }
-
-  _LIBCPP_CONSTEXPR_SINCE_CXX20 void operator()() const _NOEXCEPT {}
-  _LIBCPP_CONSTEXPR_SINCE_CXX20 void resume() const _NOEXCEPT {}
-  _LIBCPP_CONSTEXPR_SINCE_CXX20 void destroy() const _NOEXCEPT {}
-
-private:
-  _LIBCPP_INLINE_VISIBILITY
-  friend coroutine_handle<noop_coroutine_promise> noop_coroutine() _NOEXCEPT;
-
-  _LIBCPP_INLINE_VISIBILITY coroutine_handle() _NOEXCEPT {
-    this->__handle_ = __builtin_coro_noop();
-  }
-};
-
-using noop_coroutine_handle = coroutine_handle<noop_coroutine_promise>;
-
-inline _LIBCPP_INLINE_VISIBILITY
-noop_coroutine_handle noop_coroutine() _NOEXCEPT {
-  return noop_coroutine_handle();
-}
-#endif // __has_builtin(__builtin_coro_noop)
-
-struct suspend_never {
-  _LIBCPP_INLINE_VISIBILITY
-  bool await_ready() const _NOEXCEPT { return true; }
-  _LIBCPP_INLINE_VISIBILITY
-  void await_suspend(coroutine_handle<>) const _NOEXCEPT {}
-  _LIBCPP_INLINE_VISIBILITY
-  void await_resume() const _NOEXCEPT {}
-};
-
-struct suspend_always {
-  _LIBCPP_INLINE_VISIBILITY
-  bool await_ready() const _NOEXCEPT { return false; }
-  _LIBCPP_INLINE_VISIBILITY
-  void await_suspend(coroutine_handle<>) const _NOEXCEPT {}
-  _LIBCPP_INLINE_VISIBILITY
-  void await_resume() const _NOEXCEPT {}
-};
-
-_LIBCPP_END_NAMESPACE_EXPERIMENTAL_COROUTINES
-
-_LIBCPP_BEGIN_NAMESPACE_STD
-
-template <class _Tp>
-struct hash<_VSTD_CORO::coroutine_handle<_Tp> > {
-    using __arg_type = _VSTD_CORO::coroutine_handle<_Tp>;
-    _LIBCPP_INLINE_VISIBILITY
-    size_t operator()(__arg_type const& __v) const _NOEXCEPT
-    {return hash<void*>()(__v.address());}
-};
-
-_LIBCPP_END_NAMESPACE_STD
-
-#endif // !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_COROUTINES)
-
-#endif /* _LIBCPP_EXPERIMENTAL_COROUTINE */
index cd86006..17349f1 100644 (file)
@@ -775,7 +775,6 @@ module std [system] {
     export *
   }
   module coroutine {
-    requires coroutines
     header "coroutine"
     export compare
     export *
@@ -1644,11 +1643,6 @@ module std [system] {
       header "experimental/algorithm"
       export *
     }
-    module coroutine {
-      requires coroutines
-      header "experimental/coroutine"
-      export *
-    }
     module deque {
       header "experimental/deque"
       export *
index 80f3f25..525013a 100644 (file)
@@ -663,121 +663,115 @@ int main(int, char**) { return 0; }
 #endif
 
 // RUN: %{build} -DTEST_123
-#if defined(TEST_123) && __cplusplus >= 201103L && !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_COROUTINES)
-#   include <experimental/coroutine>
+#if defined(TEST_123) && __cplusplus >= 201103L
+#   include <experimental/deque>
     using HandlerType = decltype(std::__libcpp_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_124
 #if defined(TEST_124) && __cplusplus >= 201103L
-#   include <experimental/deque>
+#   include <experimental/forward_list>
     using HandlerType = decltype(std::__libcpp_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_125
 #if defined(TEST_125) && __cplusplus >= 201103L
-#   include <experimental/forward_list>
+#   include <experimental/functional>
     using HandlerType = decltype(std::__libcpp_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_126
 #if defined(TEST_126) && __cplusplus >= 201103L
-#   include <experimental/functional>
+#   include <experimental/iterator>
     using HandlerType = decltype(std::__libcpp_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_127
 #if defined(TEST_127) && __cplusplus >= 201103L
-#   include <experimental/iterator>
+#   include <experimental/list>
     using HandlerType = decltype(std::__libcpp_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_128
 #if defined(TEST_128) && __cplusplus >= 201103L
-#   include <experimental/list>
+#   include <experimental/map>
     using HandlerType = decltype(std::__libcpp_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_129
 #if defined(TEST_129) && __cplusplus >= 201103L
-#   include <experimental/map>
+#   include <experimental/memory_resource>
     using HandlerType = decltype(std::__libcpp_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_130
 #if defined(TEST_130) && __cplusplus >= 201103L
-#   include <experimental/memory_resource>
+#   include <experimental/propagate_const>
     using HandlerType = decltype(std::__libcpp_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_131
-#if defined(TEST_131) && __cplusplus >= 201103L
-#   include <experimental/propagate_const>
+#if defined(TEST_131) && !defined(_LIBCPP_HAS_NO_LOCALIZATION) && __cplusplus >= 201103L
+#   include <experimental/regex>
     using HandlerType = decltype(std::__libcpp_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_132
-#if defined(TEST_132) && !defined(_LIBCPP_HAS_NO_LOCALIZATION) && __cplusplus >= 201103L
-#   include <experimental/regex>
+#if defined(TEST_132) && __cplusplus >= 201103L
+#   include <experimental/set>
     using HandlerType = decltype(std::__libcpp_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_133
 #if defined(TEST_133) && __cplusplus >= 201103L
-#   include <experimental/set>
+#   include <experimental/simd>
     using HandlerType = decltype(std::__libcpp_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_134
 #if defined(TEST_134) && __cplusplus >= 201103L
-#   include <experimental/simd>
+#   include <experimental/string>
     using HandlerType = decltype(std::__libcpp_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_135
 #if defined(TEST_135) && __cplusplus >= 201103L
-#   include <experimental/string>
+#   include <experimental/type_traits>
     using HandlerType = decltype(std::__libcpp_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_136
 #if defined(TEST_136) && __cplusplus >= 201103L
-#   include <experimental/type_traits>
+#   include <experimental/unordered_map>
     using HandlerType = decltype(std::__libcpp_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_137
 #if defined(TEST_137) && __cplusplus >= 201103L
-#   include <experimental/unordered_map>
+#   include <experimental/unordered_set>
     using HandlerType = decltype(std::__libcpp_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_138
 #if defined(TEST_138) && __cplusplus >= 201103L
-#   include <experimental/unordered_set>
+#   include <experimental/utility>
     using HandlerType = decltype(std::__libcpp_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_139
 #if defined(TEST_139) && __cplusplus >= 201103L
-#   include <experimental/utility>
+#   include <experimental/vector>
     using HandlerType = decltype(std::__libcpp_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_140
-#if defined(TEST_140) && __cplusplus >= 201103L
-#   include <experimental/vector>
+#if defined(TEST_140)
+#   include <ext/hash_map>
     using HandlerType = decltype(std::__libcpp_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_141
 #if defined(TEST_141)
-#   include <ext/hash_map>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
-#endif
-
-// RUN: %{build} -DTEST_142
-#if defined(TEST_142)
 #   include <ext/hash_set>
     using HandlerType = decltype(std::__libcpp_verbose_abort);
 #endif
index 57cabf3..41891d0 100644 (file)
@@ -217,9 +217,6 @@ END-SCRIPT
 #if __cplusplus >= 201103L
 #   include <experimental/algorithm>
 #endif
-#if __cplusplus >= 201103L && !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_COROUTINES)
-#   include <experimental/coroutine>
-#endif
 #if __cplusplus >= 201103L
 #   include <experimental/deque>
 #endif
index ea9fc7b..28c91f8 100644 (file)
@@ -218,9 +218,6 @@ END-SCRIPT
 #if __cplusplus >= 201103L
 #   include <experimental/algorithm>
 #endif
-#if __cplusplus >= 201103L && !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_COROUTINES)
-#   include <experimental/coroutine>
-#endif
 #if __cplusplus >= 201103L
 #   include <experimental/deque>
 #endif
diff --git a/libcxx/test/libcxx/experimental/language.support/support.coroutines/dialect_support.pass.cpp b/libcxx/test/libcxx/experimental/language.support/support.coroutines/dialect_support.pass.cpp
deleted file mode 100644 (file)
index c237ca0..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// REQUIRES: fcoroutines-ts
-// ADDITIONAL_COMPILE_FLAGS: -fcoroutines-ts -Wno-coroutine
-
-// A simple "breathing" test that checks that <experimental/coroutine>
-// can be parsed and used in all dialects, including C++03 in order to match
-// Clang's behavior.
-
-#include <experimental/coroutine>
-
-#include "test_macros.h"
-
-namespace coro = std::experimental::coroutines_v1;
-
-coro::suspend_always sa;
-coro::suspend_never sn;
-
-struct MyFuture {
-  struct promise_type {
-    typedef coro::coroutine_handle<promise_type> HandleT;
-    coro::suspend_never initial_suspend() { return sn; }
-    coro::suspend_always final_suspend() TEST_NOEXCEPT { return sa; }
-    coro::suspend_never yield_value(int) { return sn; }
-    MyFuture get_return_object() {
-      MyFuture f(HandleT::from_promise(*this));
-      return f;
-    }
-    void return_void() {}
-    void unhandled_exception() {}
-  };
-  typedef promise_type::HandleT HandleT;
-  MyFuture() : p() {}
-  MyFuture(HandleT h) : p(h) {}
-
-  coro::coroutine_handle<promise_type> p;
-};
-
-MyFuture test_coro() {
-  co_await sn;
-  co_yield 42;
-  co_return;
-}
-
-int main(int, char**)
-{
-  MyFuture f = test_coro();
-  while (!f.p.done())
-    f.p.resume();
-  f.p.destroy();
-
-  return 0;
-}
diff --git a/libcxx/test/libcxx/experimental/language.support/support.coroutines/version.pass.cpp b/libcxx/test/libcxx/experimental/language.support/support.coroutines/version.pass.cpp
deleted file mode 100644 (file)
index 46cf345..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// UNSUPPORTED: c++03, c++11
-// REQUIRES: fcoroutines-ts
-// ADDITIONAL_COMPILE_FLAGS: -fcoroutines-ts
-
-#include <experimental/coroutine>
-
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION must be defined
-#endif
-
-int main(int, char**)
-{
-
-  return 0;
-}
index 0d9170b..e93eda6 100644 (file)
@@ -341,10 +341,6 @@ TEST_MACROS();
 #   include <experimental/algorithm>
 TEST_MACROS();
 #endif
-#if __cplusplus >= 201103L && !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_COROUTINES)
-#   include <experimental/coroutine>
-TEST_MACROS();
-#endif
 #if __cplusplus >= 201103L
 #   include <experimental/deque>
 TEST_MACROS();
index a45d3d4..af18106 100644 (file)
@@ -544,83 +544,79 @@ END-SCRIPT
 #include <experimental/algorithm>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_123
-#if defined(TEST_123) && __cplusplus >= 201103L && !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_COROUTINES)
-#include <experimental/coroutine>
+#if defined(TEST_123) && __cplusplus >= 201103L
+#include <experimental/deque>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_124
 #if defined(TEST_124) && __cplusplus >= 201103L
-#include <experimental/deque>
+#include <experimental/forward_list>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_125
 #if defined(TEST_125) && __cplusplus >= 201103L
-#include <experimental/forward_list>
+#include <experimental/functional>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_126
 #if defined(TEST_126) && __cplusplus >= 201103L
-#include <experimental/functional>
+#include <experimental/iterator>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_127
 #if defined(TEST_127) && __cplusplus >= 201103L
-#include <experimental/iterator>
+#include <experimental/list>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_128
 #if defined(TEST_128) && __cplusplus >= 201103L
-#include <experimental/list>
+#include <experimental/map>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_129
 #if defined(TEST_129) && __cplusplus >= 201103L
-#include <experimental/map>
+#include <experimental/memory_resource>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_130
 #if defined(TEST_130) && __cplusplus >= 201103L
-#include <experimental/memory_resource>
+#include <experimental/propagate_const>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_131
-#if defined(TEST_131) && __cplusplus >= 201103L
-#include <experimental/propagate_const>
+#if defined(TEST_131) && !defined(_LIBCPP_HAS_NO_LOCALIZATION) && __cplusplus >= 201103L
+#include <experimental/regex>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_132
-#if defined(TEST_132) && !defined(_LIBCPP_HAS_NO_LOCALIZATION) && __cplusplus >= 201103L
-#include <experimental/regex>
+#if defined(TEST_132) && __cplusplus >= 201103L
+#include <experimental/set>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_133
 #if defined(TEST_133) && __cplusplus >= 201103L
-#include <experimental/set>
+#include <experimental/simd>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_134
 #if defined(TEST_134) && __cplusplus >= 201103L
-#include <experimental/simd>
+#include <experimental/string>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_135
 #if defined(TEST_135) && __cplusplus >= 201103L
-#include <experimental/string>
+#include <experimental/type_traits>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_136
 #if defined(TEST_136) && __cplusplus >= 201103L
-#include <experimental/type_traits>
+#include <experimental/unordered_map>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_137
 #if defined(TEST_137) && __cplusplus >= 201103L
-#include <experimental/unordered_map>
+#include <experimental/unordered_set>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_138
 #if defined(TEST_138) && __cplusplus >= 201103L
-#include <experimental/unordered_set>
+#include <experimental/utility>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_139
 #if defined(TEST_139) && __cplusplus >= 201103L
-#include <experimental/utility>
+#include <experimental/vector>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_140
-#if defined(TEST_140) && __cplusplus >= 201103L
-#include <experimental/vector>
+#if defined(TEST_140)
+#include <ext/hash_map>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_141
 #if defined(TEST_141)
-#include <ext/hash_map>
-#endif
-// RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_142
-#if defined(TEST_142)
 #include <ext/hash_set>
 #endif
 // GENERATED-MARKER
index 7896b5e..3c0b45d 100644 (file)
@@ -342,9 +342,6 @@ END-SCRIPT
 #if __cplusplus >= 201103L
 #   include <experimental/algorithm>
 #endif
-#if __cplusplus >= 201103L && !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_COROUTINES)
-#   include <experimental/coroutine>
-#endif
 #if __cplusplus >= 201103L
 #   include <experimental/deque>
 #endif
index ce94592..a817d71 100644 (file)
@@ -215,9 +215,6 @@ END-SCRIPT
 #if __cplusplus >= 201103L
 #   include <experimental/algorithm>
 #endif
-#if __cplusplus >= 201103L && !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_COROUTINES)
-#   include <experimental/coroutine>
-#endif
 #if __cplusplus >= 201103L
 #   include <experimental/deque>
 #endif
index 5eaca97..92eb0b1 100644 (file)
@@ -485,84 +485,80 @@ END-SCRIPT
 #if defined(TEST_122)
 #include <experimental/algorithm>
 #endif
-// RUN: %{cxx} %s %{flags} %{compile_flags} --trace-includes -fshow-skipped-includes -fsyntax-only -DTEST_123 2> %t/header.experimental_coroutine
+// RUN: %{cxx} %s %{flags} %{compile_flags} --trace-includes -fshow-skipped-includes -fsyntax-only -DTEST_123 2> %t/header.experimental_deque
 #if defined(TEST_123)
-#include <experimental/coroutine>
-#endif
-// RUN: %{cxx} %s %{flags} %{compile_flags} --trace-includes -fshow-skipped-includes -fsyntax-only -DTEST_124 2> %t/header.experimental_deque
-#if defined(TEST_124)
 #include <experimental/deque>
 #endif
-// RUN: %{cxx} %s %{flags} %{compile_flags} --trace-includes -fshow-skipped-includes -fsyntax-only -DTEST_125 2> %t/header.experimental_forward_list
-#if defined(TEST_125)
+// RUN: %{cxx} %s %{flags} %{compile_flags} --trace-includes -fshow-skipped-includes -fsyntax-only -DTEST_124 2> %t/header.experimental_forward_list
+#if defined(TEST_124)
 #include <experimental/forward_list>
 #endif
-// RUN: %{cxx} %s %{flags} %{compile_flags} --trace-includes -fshow-skipped-includes -fsyntax-only -DTEST_126 2> %t/header.experimental_functional
-#if defined(TEST_126)
+// RUN: %{cxx} %s %{flags} %{compile_flags} --trace-includes -fshow-skipped-includes -fsyntax-only -DTEST_125 2> %t/header.experimental_functional
+#if defined(TEST_125)
 #include <experimental/functional>
 #endif
-// RUN: %{cxx} %s %{flags} %{compile_flags} --trace-includes -fshow-skipped-includes -fsyntax-only -DTEST_127 2> %t/header.experimental_iterator
-#if defined(TEST_127)
+// RUN: %{cxx} %s %{flags} %{compile_flags} --trace-includes -fshow-skipped-includes -fsyntax-only -DTEST_126 2> %t/header.experimental_iterator
+#if defined(TEST_126)
 #include <experimental/iterator>
 #endif
-// RUN: %{cxx} %s %{flags} %{compile_flags} --trace-includes -fshow-skipped-includes -fsyntax-only -DTEST_128 2> %t/header.experimental_list
-#if defined(TEST_128)
+// RUN: %{cxx} %s %{flags} %{compile_flags} --trace-includes -fshow-skipped-includes -fsyntax-only -DTEST_127 2> %t/header.experimental_list
+#if defined(TEST_127)
 #include <experimental/list>
 #endif
-// RUN: %{cxx} %s %{flags} %{compile_flags} --trace-includes -fshow-skipped-includes -fsyntax-only -DTEST_129 2> %t/header.experimental_map
-#if defined(TEST_129)
+// RUN: %{cxx} %s %{flags} %{compile_flags} --trace-includes -fshow-skipped-includes -fsyntax-only -DTEST_128 2> %t/header.experimental_map
+#if defined(TEST_128)
 #include <experimental/map>
 #endif
-// RUN: %{cxx} %s %{flags} %{compile_flags} --trace-includes -fshow-skipped-includes -fsyntax-only -DTEST_130 2> %t/header.experimental_memory_resource
-#if defined(TEST_130)
+// RUN: %{cxx} %s %{flags} %{compile_flags} --trace-includes -fshow-skipped-includes -fsyntax-only -DTEST_129 2> %t/header.experimental_memory_resource
+#if defined(TEST_129)
 #include <experimental/memory_resource>
 #endif
-// RUN: %{cxx} %s %{flags} %{compile_flags} --trace-includes -fshow-skipped-includes -fsyntax-only -DTEST_131 2> %t/header.experimental_propagate_const
-#if defined(TEST_131)
+// RUN: %{cxx} %s %{flags} %{compile_flags} --trace-includes -fshow-skipped-includes -fsyntax-only -DTEST_130 2> %t/header.experimental_propagate_const
+#if defined(TEST_130)
 #include <experimental/propagate_const>
 #endif
-// RUN: %{cxx} %s %{flags} %{compile_flags} --trace-includes -fshow-skipped-includes -fsyntax-only -DTEST_132 2> %t/header.experimental_regex
-#if defined(TEST_132)
+// RUN: %{cxx} %s %{flags} %{compile_flags} --trace-includes -fshow-skipped-includes -fsyntax-only -DTEST_131 2> %t/header.experimental_regex
+#if defined(TEST_131)
 #include <experimental/regex>
 #endif
-// RUN: %{cxx} %s %{flags} %{compile_flags} --trace-includes -fshow-skipped-includes -fsyntax-only -DTEST_133 2> %t/header.experimental_set
-#if defined(TEST_133)
+// RUN: %{cxx} %s %{flags} %{compile_flags} --trace-includes -fshow-skipped-includes -fsyntax-only -DTEST_132 2> %t/header.experimental_set
+#if defined(TEST_132)
 #include <experimental/set>
 #endif
-// RUN: %{cxx} %s %{flags} %{compile_flags} --trace-includes -fshow-skipped-includes -fsyntax-only -DTEST_134 2> %t/header.experimental_simd
-#if defined(TEST_134)
+// RUN: %{cxx} %s %{flags} %{compile_flags} --trace-includes -fshow-skipped-includes -fsyntax-only -DTEST_133 2> %t/header.experimental_simd
+#if defined(TEST_133)
 #include <experimental/simd>
 #endif
-// RUN: %{cxx} %s %{flags} %{compile_flags} --trace-includes -fshow-skipped-includes -fsyntax-only -DTEST_135 2> %t/header.experimental_string
-#if defined(TEST_135)
+// RUN: %{cxx} %s %{flags} %{compile_flags} --trace-includes -fshow-skipped-includes -fsyntax-only -DTEST_134 2> %t/header.experimental_string
+#if defined(TEST_134)
 #include <experimental/string>
 #endif
-// RUN: %{cxx} %s %{flags} %{compile_flags} --trace-includes -fshow-skipped-includes -fsyntax-only -DTEST_136 2> %t/header.experimental_type_traits
-#if defined(TEST_136)
+// RUN: %{cxx} %s %{flags} %{compile_flags} --trace-includes -fshow-skipped-includes -fsyntax-only -DTEST_135 2> %t/header.experimental_type_traits
+#if defined(TEST_135)
 #include <experimental/type_traits>
 #endif
-// RUN: %{cxx} %s %{flags} %{compile_flags} --trace-includes -fshow-skipped-includes -fsyntax-only -DTEST_137 2> %t/header.experimental_unordered_map
-#if defined(TEST_137)
+// RUN: %{cxx} %s %{flags} %{compile_flags} --trace-includes -fshow-skipped-includes -fsyntax-only -DTEST_136 2> %t/header.experimental_unordered_map
+#if defined(TEST_136)
 #include <experimental/unordered_map>
 #endif
-// RUN: %{cxx} %s %{flags} %{compile_flags} --trace-includes -fshow-skipped-includes -fsyntax-only -DTEST_138 2> %t/header.experimental_unordered_set
-#if defined(TEST_138)
+// RUN: %{cxx} %s %{flags} %{compile_flags} --trace-includes -fshow-skipped-includes -fsyntax-only -DTEST_137 2> %t/header.experimental_unordered_set
+#if defined(TEST_137)
 #include <experimental/unordered_set>
 #endif
-// RUN: %{cxx} %s %{flags} %{compile_flags} --trace-includes -fshow-skipped-includes -fsyntax-only -DTEST_139 2> %t/header.experimental_utility
-#if defined(TEST_139)
+// RUN: %{cxx} %s %{flags} %{compile_flags} --trace-includes -fshow-skipped-includes -fsyntax-only -DTEST_138 2> %t/header.experimental_utility
+#if defined(TEST_138)
 #include <experimental/utility>
 #endif
-// RUN: %{cxx} %s %{flags} %{compile_flags} --trace-includes -fshow-skipped-includes -fsyntax-only -DTEST_140 2> %t/header.experimental_vector
-#if defined(TEST_140)
+// RUN: %{cxx} %s %{flags} %{compile_flags} --trace-includes -fshow-skipped-includes -fsyntax-only -DTEST_139 2> %t/header.experimental_vector
+#if defined(TEST_139)
 #include <experimental/vector>
 #endif
-// RUN: %{cxx} %s %{flags} %{compile_flags} --trace-includes -fshow-skipped-includes -fsyntax-only -DTEST_141 2> %t/header.ext_hash_map
-#if defined(TEST_141)
+// RUN: %{cxx} %s %{flags} %{compile_flags} --trace-includes -fshow-skipped-includes -fsyntax-only -DTEST_140 2> %t/header.ext_hash_map
+#if defined(TEST_140)
 #include <ext/hash_map>
 #endif
-// RUN: %{cxx} %s %{flags} %{compile_flags} --trace-includes -fshow-skipped-includes -fsyntax-only -DTEST_142 2> %t/header.ext_hash_set
-#if defined(TEST_142)
+// RUN: %{cxx} %s %{flags} %{compile_flags} --trace-includes -fshow-skipped-includes -fsyntax-only -DTEST_141 2> %t/header.ext_hash_set
+#if defined(TEST_141)
 #include <ext/hash_set>
 #endif
 // RUN: %{python} %S/transitive_includes_to_csv.py %t > %t/transitive_includes.csv
index 58fe49c..f85f359 100644 (file)
@@ -215,28 +215,6 @@ expected version
 experimental/algorithm algorithm
 experimental/algorithm cstddef
 experimental/algorithm type_traits
-experimental/coroutine atomic
-experimental/coroutine climits
-experimental/coroutine cmath
-experimental/coroutine compare
-experimental/coroutine concepts
-experimental/coroutine cstddef
-experimental/coroutine cstdint
-experimental/coroutine cstring
-experimental/coroutine ctime
-experimental/coroutine initializer_list
-experimental/coroutine iosfwd
-experimental/coroutine iterator
-experimental/coroutine limits
-experimental/coroutine memory
-experimental/coroutine new
-experimental/coroutine ratio
-experimental/coroutine stdexcept
-experimental/coroutine tuple
-experimental/coroutine type_traits
-experimental/coroutine typeinfo
-experimental/coroutine utility
-experimental/coroutine variant
 experimental/deque deque
 experimental/deque experimental/memory_resource
 experimental/forward_list experimental/memory_resource
index 2f9ef7d..8cc3c7f 100644 (file)
@@ -215,28 +215,6 @@ expected version
 experimental/algorithm algorithm
 experimental/algorithm cstddef
 experimental/algorithm type_traits
-experimental/coroutine atomic
-experimental/coroutine climits
-experimental/coroutine cmath
-experimental/coroutine compare
-experimental/coroutine concepts
-experimental/coroutine cstddef
-experimental/coroutine cstdint
-experimental/coroutine cstring
-experimental/coroutine ctime
-experimental/coroutine initializer_list
-experimental/coroutine iosfwd
-experimental/coroutine iterator
-experimental/coroutine limits
-experimental/coroutine memory
-experimental/coroutine new
-experimental/coroutine ratio
-experimental/coroutine stdexcept
-experimental/coroutine tuple
-experimental/coroutine type_traits
-experimental/coroutine typeinfo
-experimental/coroutine utility
-experimental/coroutine variant
 experimental/deque deque
 experimental/deque experimental/memory_resource
 experimental/forward_list experimental/memory_resource
index 0d10e23..aa2a6fe 100644 (file)
@@ -215,28 +215,6 @@ expected version
 experimental/algorithm algorithm
 experimental/algorithm cstddef
 experimental/algorithm type_traits
-experimental/coroutine atomic
-experimental/coroutine climits
-experimental/coroutine cmath
-experimental/coroutine compare
-experimental/coroutine concepts
-experimental/coroutine cstddef
-experimental/coroutine cstdint
-experimental/coroutine cstring
-experimental/coroutine ctime
-experimental/coroutine initializer_list
-experimental/coroutine iosfwd
-experimental/coroutine iterator
-experimental/coroutine limits
-experimental/coroutine memory
-experimental/coroutine new
-experimental/coroutine ratio
-experimental/coroutine stdexcept
-experimental/coroutine tuple
-experimental/coroutine type_traits
-experimental/coroutine typeinfo
-experimental/coroutine utility
-experimental/coroutine variant
 experimental/deque deque
 experimental/deque experimental/memory_resource
 experimental/forward_list experimental/memory_resource
index 0d10e23..aa2a6fe 100644 (file)
@@ -215,28 +215,6 @@ expected version
 experimental/algorithm algorithm
 experimental/algorithm cstddef
 experimental/algorithm type_traits
-experimental/coroutine atomic
-experimental/coroutine climits
-experimental/coroutine cmath
-experimental/coroutine compare
-experimental/coroutine concepts
-experimental/coroutine cstddef
-experimental/coroutine cstdint
-experimental/coroutine cstring
-experimental/coroutine ctime
-experimental/coroutine initializer_list
-experimental/coroutine iosfwd
-experimental/coroutine iterator
-experimental/coroutine limits
-experimental/coroutine memory
-experimental/coroutine new
-experimental/coroutine ratio
-experimental/coroutine stdexcept
-experimental/coroutine tuple
-experimental/coroutine type_traits
-experimental/coroutine typeinfo
-experimental/coroutine utility
-experimental/coroutine variant
 experimental/deque deque
 experimental/deque experimental/memory_resource
 experimental/forward_list experimental/memory_resource
index 8f47b61..1044986 100644 (file)
@@ -224,28 +224,6 @@ expected version
 experimental/algorithm algorithm
 experimental/algorithm cstddef
 experimental/algorithm type_traits
-experimental/coroutine atomic
-experimental/coroutine climits
-experimental/coroutine cmath
-experimental/coroutine compare
-experimental/coroutine concepts
-experimental/coroutine cstddef
-experimental/coroutine cstdint
-experimental/coroutine cstring
-experimental/coroutine ctime
-experimental/coroutine initializer_list
-experimental/coroutine iosfwd
-experimental/coroutine iterator
-experimental/coroutine limits
-experimental/coroutine memory
-experimental/coroutine new
-experimental/coroutine ratio
-experimental/coroutine stdexcept
-experimental/coroutine tuple
-experimental/coroutine type_traits
-experimental/coroutine typeinfo
-experimental/coroutine utility
-experimental/coroutine variant
 experimental/deque deque
 experimental/deque experimental/memory_resource
 experimental/forward_list experimental/memory_resource
index 23cc6d7..9159e57 100644 (file)
@@ -169,12 +169,6 @@ expected version
 experimental/algorithm algorithm
 experimental/algorithm cstddef
 experimental/algorithm type_traits
-experimental/coroutine cstddef
-experimental/coroutine cstdint
-experimental/coroutine cstring
-experimental/coroutine limits
-experimental/coroutine new
-experimental/coroutine type_traits
 experimental/deque deque
 experimental/deque experimental/memory_resource
 experimental/forward_list experimental/memory_resource
diff --git a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.capacity/operator_bool.pass.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.capacity/operator_bool.pass.cpp
deleted file mode 100644 (file)
index 94b94d8..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// UNSUPPORTED: c++03, c++11
-
-// <experimental/coroutine>
-
-// template <class Promise = void>
-// struct coroutine_handle;
-
-// constexpr explicit operator bool() const noexcept
-
-#include <experimental/coroutine>
-#include <type_traits>
-#include <cassert>
-
-#include "test_macros.h"
-
-namespace coro = std::experimental;
-
-template <class C>
-void do_test() {
-  static_assert(std::is_nothrow_constructible<bool, C>::value, "");
-  static_assert(!std::is_convertible<C, bool>::value, "");
-  {
-    constexpr C c; ((void)c);
-    static_assert(bool(c) == false, "");
-  }
-  { // null case
-    const C c = {}; ((void)c);
-    ASSERT_NOEXCEPT(bool(c));
-    if (c)
-      assert(false);
-    else
-      assert(true);
-    assert(c.address() == nullptr);
-    assert(bool(c) == false);
-  }
-  { // non-null case
-    char dummy = 42;
-    C c = C::from_address((void*)&dummy);
-    assert(c.address() == &dummy);
-    assert(bool(c) == true);
-  }
-}
-
-int main(int, char**)
-{
-  do_test<coro::coroutine_handle<>>();
-  do_test<coro::coroutine_handle<int>>();
-
-  return 0;
-}
diff --git a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.compare/equal_comp.pass.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.compare/equal_comp.pass.cpp
deleted file mode 100644 (file)
index e8757ea..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// UNSUPPORTED: c++03, c++11
-
-// <experimental/coroutine>
-
-// template <class Promise = void>
-// struct coroutine_handle;
-
-// bool operator==(coroutine_handle<>, coroutine_handle<>) noexcept
-// bool operator!=(coroutine_handle<>, coroutine_handle<>) noexcept
-
-#include <experimental/coroutine>
-#include <type_traits>
-#include <utility>
-#include <cstdint>
-#include <cassert>
-
-#include "test_macros.h"
-
-namespace coro = std::experimental;
-
-template <class C>
-void do_test(uintptr_t LHSVal, uintptr_t RHSVal) {
-  const C LHS = C::from_address(reinterpret_cast<void*>(LHSVal));
-  const C RHS = C::from_address(reinterpret_cast<void*>(RHSVal));
-  const bool ExpectIsEqual = (LHSVal == RHSVal);
-  assert((LHS == RHS) == ExpectIsEqual);
-  assert((RHS == LHS) == ExpectIsEqual);
-  assert((LHS != RHS) == !ExpectIsEqual);
-  assert((RHS != LHS) == !ExpectIsEqual);
-  {
-    static_assert(noexcept(LHS == RHS), "");
-    static_assert(noexcept(LHS != RHS), "");
-    ASSERT_SAME_TYPE(decltype(LHS == RHS), bool);
-    ASSERT_SAME_TYPE(decltype(LHS != RHS), bool);
-  }
-}
-
-int main(int, char**)
-{
-  std::pair<uintptr_t, uintptr_t> const TestCases[] = {
-      {0, 0},
-      {16, 16},
-      {0, 16},
-      {16, 0}
-  };
-  for (auto& TC : TestCases) {
-    do_test<coro::coroutine_handle<>>(TC.first, TC.second);
-    do_test<coro::coroutine_handle<int>>(TC.first, TC.second);
-  }
-
-  return 0;
-}
diff --git a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.compare/less_comp.pass.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.compare/less_comp.pass.cpp
deleted file mode 100644 (file)
index ce1d06c..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// UNSUPPORTED: c++03, c++11
-
-// <experimental/coroutine>
-
-// template <class Promise = void>
-// struct coroutine_handle;
-
-// bool operator<(coroutine_handle<>, coroutine_handle<>) noexcept
-// bool operator>(coroutine_handle<>, coroutine_handle<>) noexcept
-// bool operator>=(coroutine_handle<>, coroutine_handle<>) noexcept
-// bool operator<=(coroutine_handle<>, coroutine_handle<>) noexcept
-
-#include <experimental/coroutine>
-#include <type_traits>
-#include <utility>
-#include <cstdint>
-#include <cassert>
-
-#include "test_macros.h"
-
-namespace coro = std::experimental;
-
-template <class C>
-void do_test(uintptr_t LHSVal, uintptr_t RHSVal) {
-  const C LHS = C::from_address(reinterpret_cast<void*>(LHSVal));
-  const C RHS = C::from_address(reinterpret_cast<void*>(RHSVal));
-  assert((LHS < RHS) == (LHSVal < RHSVal));
-  assert((RHS < LHS) == (RHSVal < LHSVal));
-  assert((LHS > RHS) == (LHSVal > RHSVal));
-  assert((RHS > LHS) == (RHSVal > LHSVal));
-  assert((LHS <= RHS) == (LHSVal <= RHSVal));
-  assert((RHS <= LHS) == (RHSVal <= LHSVal));
-  assert((LHS >= RHS) == (LHSVal >= RHSVal));
-  assert((RHS >= LHS) == (RHSVal >= LHSVal));
-  {
-    static_assert(noexcept(LHS < RHS), "");
-    static_assert(noexcept(LHS > RHS), "");
-    static_assert(noexcept(LHS <= RHS), "");
-    static_assert(noexcept(LHS >= RHS), "");
-    ASSERT_SAME_TYPE(decltype(LHS < RHS), bool);
-    ASSERT_SAME_TYPE(decltype(LHS > RHS), bool);
-    ASSERT_SAME_TYPE(decltype(LHS <= RHS), bool);
-    ASSERT_SAME_TYPE(decltype(LHS >= RHS), bool);
-  }
-}
-
-int main(int, char**)
-{
-  std::pair<uintptr_t, uintptr_t> const TestCases[] = {
-      {0, 0},
-      {16, 16},
-      {0, 16},
-      {16, 0}
-  };
-  for (auto& TC : TestCases) {
-    do_test<coro::coroutine_handle<>>(TC.first, TC.second);
-    do_test<coro::coroutine_handle<int>>(TC.first, TC.second);
-  }
-
-  return 0;
-}
diff --git a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.completion/done.pass.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.completion/done.pass.cpp
deleted file mode 100644 (file)
index ecb34ec..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// UNSUPPORTED: c++03, c++11
-
-// <experimental/coroutine>
-
-// template <class Promise = void>
-// struct coroutine_handle;
-
-// bool done() const
-
-#include <experimental/coroutine>
-#include <type_traits>
-#include <memory>
-#include <utility>
-#include <cstdint>
-#include <cassert>
-
-#include "test_macros.h"
-
-namespace coro = std::experimental;
-
-template <class Promise>
-void do_test(coro::coroutine_handle<Promise> const& H) {
-  // FIXME Add a runtime test
-  {
-    ASSERT_SAME_TYPE(decltype(H.done()), bool);
-    LIBCPP_ASSERT_NOT_NOEXCEPT(H.done());
-  }
-}
-
-int main(int, char**)
-{
-  do_test(coro::coroutine_handle<>{});
-  do_test(coro::coroutine_handle<int>{});
-
-  return 0;
-}
diff --git a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.con/assign.pass.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.con/assign.pass.cpp
deleted file mode 100644 (file)
index c0f5bb5..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// UNSUPPORTED: c++03, c++11
-
-// <experimental/coroutine>
-
-// template <class Promise = void>
-// struct coroutine_handle;
-
-// coroutine_handle& operator=(nullptr_t) noexcept
-
-#include <experimental/coroutine>
-#include <type_traits>
-#include <cassert>
-
-#include "test_macros.h"
-
-namespace coro = std::experimental;
-
-template <class C>
-void do_test() {
-  int dummy = 42;
-  void* dummy_h = &dummy;
-  {
-    C c; ((void)c);
-    static_assert(std::is_nothrow_assignable<C&, std::nullptr_t>::value, "");
-    static_assert(!std::is_assignable<C&, void*>::value, "");
-  }
-  {
-    C c = C::from_address(dummy_h);
-    assert(c.address() == &dummy);
-    c = nullptr;
-    assert(c.address() == nullptr);
-    c = nullptr;
-    assert(c.address() == nullptr);
-  }
-  {
-    C c;
-    C& cr = (c = nullptr);
-    assert(&c == &cr);
-  }
-}
-
-int main(int, char**)
-{
-  do_test<coro::coroutine_handle<>>();
-  do_test<coro::coroutine_handle<int>>();
-
-  return 0;
-}
diff --git a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.con/construct.pass.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.con/construct.pass.cpp
deleted file mode 100644 (file)
index b525d79..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// UNSUPPORTED: c++03, c++11
-
-// <experimental/coroutine>
-
-// template <class Promise = void>
-// struct coroutine_handle;
-
-// constexpr coroutine_handle() noexcept
-// constexpr coroutine_handle(nullptr_t) noexcept
-
-#include <experimental/coroutine>
-#include <type_traits>
-#include <cassert>
-
-#include "test_macros.h"
-
-namespace coro = std::experimental;
-
-template <class C>
-void do_test() {
-  {
-    constexpr C c;
-    static_assert(std::is_nothrow_default_constructible<C>::value, "");
-    static_assert(c.address() == nullptr, "");
-  }
-  {
-    constexpr C c(nullptr);
-    static_assert(std::is_nothrow_constructible<C, std::nullptr_t>::value, "");
-    static_assert(c.address() == nullptr, "");
-  }
-  {
-    C c;
-    assert(c.address() == nullptr);
-  }
-  {
-    C c(nullptr);
-    assert(c.address() == nullptr);
-  }
-}
-
-int main(int, char**)
-{
-  do_test<coro::coroutine_handle<>>();
-  do_test<coro::coroutine_handle<int>>();
-
-  return 0;
-}
diff --git a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.export/address.pass.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.export/address.pass.cpp
deleted file mode 100644 (file)
index 08dafd4..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// UNSUPPORTED: c++03, c++11
-
-// <experimental/coroutine>
-
-// template <class Promise = void>
-// struct coroutine_handle;
-
-// constexpr void* address() const noexcept
-
-#include <experimental/coroutine>
-#include <type_traits>
-#include <cassert>
-
-#include "test_macros.h"
-
-namespace coro = std::experimental;
-
-template <class C>
-void do_test() {
-  {
-    constexpr C c; ((void)c);
-    static_assert(c.address() == nullptr, "");
-  }
-  {
-    const C c = {}; ((void)c);
-    ASSERT_NOEXCEPT(c.address());
-    ASSERT_SAME_TYPE(decltype(c.address()), void*);
-    assert(c.address() == nullptr);
-  }
-  {
-    char dummy = 42;
-    C c = C::from_address((void*)&dummy);
-    assert(c.address() == &dummy);
-  }
-}
-
-int main(int, char**)
-{
-  do_test<coro::coroutine_handle<>>();
-  do_test<coro::coroutine_handle<int>>();
-
-  return 0;
-}
diff --git a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.export/from_address.fail.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.export/from_address.fail.cpp
deleted file mode 100644 (file)
index d02ae2f..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// UNSUPPORTED: c++03, c++11
-// <experimental/coroutine>
-
-// template <class Promise = void>
-// struct coroutine_handle;
-
-// static coroutine_handle from_address(void*) noexcept
-
-// Test that `from_address` is explicitly ill-formed when called with a typed
-// pointer. The user cannot possibly have a typed pointer to the coroutine.
-// FIXME: This behavior is an extension, and should upstreamed into the TS or
-// the test removed if the TS changes are rejected.
-
-#include <experimental/coroutine>
-#include <type_traits>
-#include <cassert>
-
-namespace coro = std::experimental;
-
-int main(int, char**)
-{
-  {
-    using H = coro::coroutine_handle<>;
-    // expected-error@experimental/coroutine:* 3 {{coroutine_handle<void>::from_address cannot be called with non-void pointers}}
-    H::from_address((int*)nullptr); // expected-note {{requested here}}
-    H::from_address((const void*)nullptr); // expected-note {{requested here}}
-    H::from_address((const char*)nullptr); // expected-note {{requested here}}
-  }
-  {
-    using H = coro::coroutine_handle<int>;
-    // expected-error-re@experimental/coroutine:* 1 {{{{(static_assert|static assertion)}} failed{{.*}}coroutine_handle<promise_type>::from_address cannot be used with pointers to the coroutine's promise type; use 'from_promise' instead}}
-    H::from_address((const char*)nullptr); // expected-note {{requested here}}
-    // expected-error@experimental/coroutine:* 1 {{coroutine_handle<promise_type>::from_address cannot be called with non-void pointers}}
-    H::from_address((int*)nullptr); // expected-note {{requested here}}
-  }
-
-  return 0;
-}
diff --git a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.export/from_address.pass.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.export/from_address.pass.cpp
deleted file mode 100644 (file)
index 75052af..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// UNSUPPORTED: c++03, c++11
-
-// <experimental/coroutine>
-
-// template <class Promise = void>
-// struct coroutine_handle;
-
-// static coroutine_handle from_address(void*) noexcept
-
-#include <experimental/coroutine>
-#include <type_traits>
-#include <cassert>
-
-#include "test_macros.h"
-
-namespace coro = std::experimental;
-
-template <class C>
-void do_test() {
-  {
-    C c = C::from_address(nullptr);
-    static_assert(noexcept(C::from_address(nullptr)), "");
-    // FIXME: Should the return type not be 'C'?
-    static_assert(std::is_same<decltype(C::from_address(nullptr)), C>::value, "");
-    assert(c.address() == nullptr);
-  }
-  {
-    char dummy = 42;
-    C c = C::from_address((void*)&dummy);
-    assert(c.address() == &dummy);
-  }
-}
-
-int main(int, char**)
-{
-  do_test<coro::coroutine_handle<>>();
-  do_test<coro::coroutine_handle<int>>();
-
-  return 0;
-}
diff --git a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.hash/hash.pass.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.hash/hash.pass.cpp
deleted file mode 100644 (file)
index 0fd56b3..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// UNSUPPORTED: c++03, c++11
-
-// <experimental/coroutine>
-
-// template <class Promise = void>
-// struct coroutine_handle;
-
-// namespace std {
-//  template <class P> struct hash<experimental::coroutine_handle<P>>;
-// }
-
-#include <experimental/coroutine>
-#include <type_traits>
-#include <memory>
-#include <utility>
-#include <cstdint>
-#include <cassert>
-#include <functional>
-
-#include "test_macros.h"
-
-namespace coro = std::experimental;
-
-template <class C>
-void do_test(uintptr_t LHSVal, uintptr_t RHSVal) {
-  const size_t ExpectLHS = std::hash<void*>{}(reinterpret_cast<void*>(LHSVal));
-  const size_t ExpectRHS = std::hash<void*>{}(reinterpret_cast<void*>(RHSVal));
-  const C LHS = C::from_address(reinterpret_cast<void*>(LHSVal));
-  const C RHS = C::from_address(reinterpret_cast<void*>(RHSVal));
-  const std::hash<C> h;
-  // FIXME: libc++'s implementation hash's the result of LHS.address(), so we
-  // expect that value. However this is not required.
-  assert(h(LHS) == ExpectLHS);
-  assert(h(RHS) == ExpectRHS);
-  assert((h(LHS) == h(RHS)) == (LHSVal == RHSVal));
-  {
-    ASSERT_SAME_TYPE(decltype(h(LHS)), size_t);
-    ASSERT_NOEXCEPT(std::hash<C>{}(LHS));
-  }
-}
-
-int main(int, char**)
-{
-  std::pair<uintptr_t, uintptr_t> const TestCases[] = {
-      {0, 0},
-      {0, 8},
-      {8, 8},
-      {8, 16}
-  };
-  for (auto& TC : TestCases) {
-    do_test<coro::coroutine_handle<>>(TC.first, TC.second);
-    do_test<coro::coroutine_handle<int>>(TC.first, TC.second);
-  }
-
-  return 0;
-}
diff --git a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.noop/noop_coroutine.pass.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.noop/noop_coroutine.pass.cpp
deleted file mode 100644 (file)
index de53b0a..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// UNSUPPORTED: c++03, c++11
-// UNSUPPORTED: ubsan
-
-// <experimental/coroutine>
-// struct noop_coroutine_promise;
-// using noop_coroutine_handle = coroutine_handle<noop_coroutine_promise>;
-// noop_coroutine_handle noop_coroutine() noexcept;
-
-#include <experimental/coroutine>
-#include <cassert>
-#include <type_traits>
-
-#include "test_macros.h"
-
-#if TEST_HAS_BUILTIN(__builtin_coro_noop)
-
-namespace coro = std::experimental::coroutines_v1;
-
-
-static_assert(std::is_same<coro::coroutine_handle<coro::noop_coroutine_promise>, coro::noop_coroutine_handle>::value, "");
-static_assert(std::is_same<decltype(coro::noop_coroutine()), coro::noop_coroutine_handle>::value, "");
-
-// template <> struct coroutine_handle<noop_coroutine_promise> : coroutine_handle<>
-// {
-// // 18.11.2.7 noop observers
-// constexpr explicit operator bool() const noexcept;
-// constexpr bool done() const noexcept;
-
-// // 18.11.2.8 noop resumption
-// constexpr void operator()() const noexcept;
-// constexpr void resume() const noexcept;
-// constexpr void destroy() const noexcept;
-
-// // 18.11.2.9 noop promise access
-// noop_coroutine_promise& promise() const noexcept;
-
-// // 18.11.2.10 noop address
-// constexpr void* address() const noexcept;
-
-int main(int, char**)
-{
-  auto h = coro::noop_coroutine();
-  coro::coroutine_handle<> base = h;
-
-  assert(h);
-  assert(base);
-
-  assert(!h.done());
-  assert(!base.done());
-
-  h.resume();
-  h.destroy();
-  h();
-  static_assert(h.done() == false, "");
-  static_assert(h, "");
-
-  h.promise();
-  assert(h.address() == base.address());
-  assert(h.address() != nullptr);
-  assert(coro::coroutine_handle<>::from_address(h.address()) == base);
-
-  return 0;
-}
-
-#else
-
-int main(int, char**) { return 0; }
-
-#endif //  TEST_HAS_BUILTIN(__builtin_coro_noop)
diff --git a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.prom/promise.pass.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.prom/promise.pass.cpp
deleted file mode 100644 (file)
index d493e1c..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// UNSUPPORTED: c++03, c++11
-
-// <experimental/coroutine>
-
-// template <class Promise>
-// struct coroutine_handle<Promise>;
-
-// Promise& promise() const
-
-#include <experimental/coroutine>
-#include <type_traits>
-#include <memory>
-#include <utility>
-#include <cstdint>
-#include <cassert>
-
-#include "test_macros.h"
-
-namespace coro = std::experimental;
-
-struct MyCoro {
-  struct promise_type {
-    void unhandled_exception() {}
-    void return_void() {}
-    coro::suspend_never initial_suspend() { return {}; }
-    coro::suspend_never final_suspend() noexcept { return {}; }
-    MyCoro get_return_object() {
-      do_runtime_test();
-      return {};
-    }
-    void do_runtime_test() {
-      // Test that a coroutine_handle<const T> can be created from a const
-      // promise_type and that it represents the same coroutine as
-      // coroutine_handle<T>
-      using CH = coro::coroutine_handle<promise_type>;
-      using CCH = coro::coroutine_handle<const promise_type>;
-      const auto &cthis = *this;
-      CH h = CH::from_promise(*this);
-      CCH h2 = CCH::from_promise(*this);
-      CCH h3 = CCH::from_promise(cthis);
-      assert(&h.promise() == this);
-      assert(&h2.promise() == this);
-      assert(&h3.promise() == this);
-      assert(h.address() == h2.address());
-      assert(h2.address() == h3.address());
-    }
-  };
-};
-
-MyCoro do_runtime_test() {
-  co_await coro::suspend_never{};
-}
-
-template <class Promise>
-void do_test(coro::coroutine_handle<Promise>&& H) {
-
-  // FIXME Add a runtime test
-  {
-    ASSERT_SAME_TYPE(decltype(H.promise()), Promise&);
-    LIBCPP_ASSERT_NOT_NOEXCEPT(H.promise());
-  }
-  {
-    auto const& CH = H;
-    ASSERT_SAME_TYPE(decltype(CH.promise()), Promise&);
-    LIBCPP_ASSERT_NOT_NOEXCEPT(CH.promise());
-  }
-}
-
-int main(int, char**)
-{
-  do_test(coro::coroutine_handle<int>{});
-  do_test(coro::coroutine_handle<const int>{});
-  do_runtime_test();
-
-  return 0;
-}
diff --git a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.resumption/destroy.pass.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.resumption/destroy.pass.cpp
deleted file mode 100644 (file)
index 3a27f2a..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// UNSUPPORTED: c++03, c++11
-
-// <experimental/coroutine>
-
-// template <class Promise = void>
-// struct coroutine_handle;
-
-// void destroy()
-
-#include <experimental/coroutine>
-#include <type_traits>
-#include <memory>
-#include <utility>
-#include <cstdint>
-#include <cassert>
-
-#include "test_macros.h"
-
-namespace coro = std::experimental;
-
-template <class H>
-auto has_destroy_imp(H&& h, int) -> decltype(h.destroy(), std::true_type{});
-template <class H>
-auto has_destroy_imp(H&&, long) -> std::false_type;
-
-template <class H>
-constexpr bool has_destroy() {
-  return decltype(has_destroy_imp(std::declval<H>(), 0))::value;
-}
-
-template <class Promise>
-void do_test(coro::coroutine_handle<Promise>&& H) {
-  using HType = coro::coroutine_handle<Promise>;
-  // FIXME Add a runtime test
-  {
-    ASSERT_SAME_TYPE(decltype(H.destroy()), void);
-    LIBCPP_ASSERT_NOT_NOEXCEPT(H.destroy());
-    static_assert(has_destroy<HType&>(), "");
-    static_assert(has_destroy<HType&&>(), "");
-  }
-  {
-    static_assert(!has_destroy<HType const&>(), "");
-    static_assert(!has_destroy<HType const&&>(), "");
-  }
-}
-
-int main(int, char**)
-{
-  do_test(coro::coroutine_handle<>{});
-  do_test(coro::coroutine_handle<int>{});
-
-  return 0;
-}
diff --git a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.resumption/resume.pass.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.resumption/resume.pass.cpp
deleted file mode 100644 (file)
index 77d8d63..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// UNSUPPORTED: c++03, c++11
-
-// <experimental/coroutine>
-
-// template <class Promise = void>
-// struct coroutine_handle;
-
-// void operator()()
-// void resume()
-
-#include <experimental/coroutine>
-#include <type_traits>
-#include <memory>
-#include <utility>
-#include <cstdint>
-#include <cassert>
-
-#include "test_macros.h"
-
-namespace coro = std::experimental;
-
-
-template <class H>
-auto has_resume_imp(H&& h, int) -> decltype(h.resume(), std::true_type{});
-template <class H>
-auto has_resume_imp(H&&, long) -> std::false_type;
-
-template <class H>
-constexpr bool has_resume() {
-  return decltype(has_resume_imp(std::declval<H>(), 0))::value;
-}
-
-
-template <class H>
-auto has_call_operator_imp(H&& h, int) -> decltype(h(), std::true_type{});
-template <class H>
-auto has_call_operator_imp(H&&, long) -> std::false_type;
-
-template <class H>
-constexpr bool has_call_operator() {
-  return decltype(has_call_operator_imp(std::declval<H>(), 0))::value;
-}
-
-template <class Promise>
-void do_test(coro::coroutine_handle<Promise>&& H) {
-  using HType = coro::coroutine_handle<Promise>;
-  // FIXME Add a runtime test
-  {
-    ASSERT_SAME_TYPE(decltype(H.resume()), void);
-    ASSERT_SAME_TYPE(decltype(H()), void);
-    LIBCPP_ASSERT_NOT_NOEXCEPT(H.resume());
-    LIBCPP_ASSERT_NOT_NOEXCEPT(H());
-    static_assert(has_resume<HType&>(), "");
-    static_assert(has_resume<HType&&>(), "");
-    static_assert(has_call_operator<HType&>(), "");
-    static_assert(has_call_operator<HType&&>(), "");
-  }
-  {
-    static_assert(!has_resume<HType const&>(), "");
-    static_assert(!has_resume<HType const&&>(), "");
-    static_assert(!has_call_operator<HType const&>(), "");
-    static_assert(!has_call_operator<HType const&&>(), "");
-  }
-}
-
-int main(int, char**)
-{
-  do_test(coro::coroutine_handle<>{});
-  do_test(coro::coroutine_handle<int>{});
-
-  return 0;
-}
diff --git a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/void_handle.pass.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/void_handle.pass.cpp
deleted file mode 100644 (file)
index 1f48408..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// UNSUPPORTED: c++03, c++11
-
-#include <experimental/coroutine>
-
-#include "test_macros.h"
-
-namespace coro = std::experimental;
-
-struct A {
-  using promise_type = A*;
-};
-
-struct B {};
-struct C {};
-
-namespace std { namespace experimental {
-  template <>
-  struct coroutine_traits<::A, int> {
-    using promise_type = int*;
-  };
-  template <class ...Args>
-  struct coroutine_traits<::B, Args...> {
-    using promise_type = B*;
-  };
-  template <>
-  struct coroutine_traits<::C> {
-    using promise_type = void;
-  };
-}}
-
-template <class Expect, class T, class ...Args>
-void check_type() {
-  using P = typename coro::coroutine_traits<T, Args...>::promise_type ;
-  static_assert(std::is_same<P, Expect>::value, "");
-};
-
-int main(int, char**)
-{
-  check_type<A*, A>();
-  check_type<int*, A, int>();
-  check_type<B*, B>();
-  check_type<void, C>();
-
-  return 0;
-}
diff --git a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.traits/promise_type.pass.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.traits/promise_type.pass.cpp
deleted file mode 100644 (file)
index dd95493..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// UNSUPPORTED: c++03, c++11
-
-#include <experimental/coroutine>
-
-#include "test_macros.h"
-
-namespace coro = std::experimental;
-
-template <class T, class = typename T::promise_type>
-constexpr bool has_promise_type(int) { return true; }
-template <class>
-constexpr bool has_promise_type(long) { return false; }
-template <class T>
-constexpr bool has_promise_type() { return has_promise_type<T>(0); }
-
-struct A {
-  using promise_type = A*;
-};
-
-struct B {};
-struct C {};
-struct D {
-private:
-  using promise_type = void;
-};
-struct E {};
-
-namespace std { namespace experimental {
-  template <>
-  struct coroutine_traits<::A, int> {
-    using promise_type = int*;
-  };
-  template <class ...Args>
-  struct coroutine_traits<::B, Args...> {
-    using promise_type = B*;
-  };
-  template <>
-  struct coroutine_traits<::C> {
-    using promise_type = void;
-  };
-}}
-
-template <class Expect, class T, class ...Args>
-void check_type() {
-  using Traits = coro::coroutine_traits<T, Args...>;
-  static_assert(has_promise_type<Traits>(), "");
-  static_assert(std::is_same<typename Traits::promise_type, Expect>::value, "");
-}
-
-template <class T, class ...Args>
-void check_no_type() {
-  using Traits = coro::coroutine_traits<T, Args...>;
-  static_assert(!has_promise_type<Traits>(), "");
-}
-
-int main(int, char**)
-{
-  {
-    check_type<A*, A>();
-    check_type<int*, A, int>();
-    check_type<B*, B>();
-    check_type<void, C>();
-  }
-  {
-    check_no_type<D>();
-    check_no_type<E>();
-    check_no_type<C, int>();
-  }
-
-  return 0;
-}
diff --git a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.trivial.awaitables/suspend_always.pass.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.trivial.awaitables/suspend_always.pass.cpp
deleted file mode 100644 (file)
index dd5673b..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// UNSUPPORTED: c++03, c++11
-
-#include <experimental/coroutine>
-#include <type_traits>
-#include <cassert>
-#include <utility>
-
-#include "test_macros.h"
-
-namespace coro = std::experimental;
-
-using SuspendT = std::experimental::coroutines_v1::suspend_always;
-
-constexpr bool check_suspend_constexpr() {
-  SuspendT s;
-  const SuspendT scopy(s); (void)scopy;
-  SuspendT smove(std::move(s)); (void)smove;
-  s = scopy;
-  s = std::move(smove);
-  return true;
-}
-
-int main(int, char**)
-{
-  using H = coro::coroutine_handle<>;
-  using S = SuspendT;
-  H h{};
-  S s{};
-  S const& cs = s;
-  {
-    LIBCPP_STATIC_ASSERT(noexcept(s.await_ready()), "");
-    static_assert(std::is_same<decltype(s.await_ready()), bool>::value, "");
-    assert(s.await_ready() == false);
-    assert(cs.await_ready() == false);
-  }
-  {
-    LIBCPP_STATIC_ASSERT(noexcept(s.await_suspend(h)), "");
-    static_assert(std::is_same<decltype(s.await_suspend(h)), void>::value, "");
-    s.await_suspend(h);
-    cs.await_suspend(h);
-  }
-  {
-    LIBCPP_STATIC_ASSERT(noexcept(s.await_resume()), "");
-    static_assert(std::is_same<decltype(s.await_resume()), void>::value, "");
-    s.await_resume();
-    cs.await_resume();
-  }
-  {
-    static_assert(std::is_nothrow_default_constructible<S>::value, "");
-    static_assert(std::is_nothrow_copy_constructible<S>::value, "");
-    static_assert(std::is_nothrow_move_constructible<S>::value, "");
-    static_assert(std::is_nothrow_copy_assignable<S>::value, "");
-    static_assert(std::is_nothrow_move_assignable<S>::value, "");
-    static_assert(std::is_trivially_copyable<S>::value, "");
-    static_assert(check_suspend_constexpr(), "");
-  }
-
-  return 0;
-}
diff --git a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.trivial.awaitables/suspend_never.pass.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.trivial.awaitables/suspend_never.pass.cpp
deleted file mode 100644 (file)
index 8d59d6a..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// UNSUPPORTED: c++03, c++11
-
-#include <experimental/coroutine>
-#include <type_traits>
-#include <cassert>
-#include <utility>
-
-#include "test_macros.h"
-
-namespace coro = std::experimental;
-
-using SuspendT = std::experimental::coroutines_v1::suspend_never;
-
-constexpr bool check_suspend_constexpr() {
-  SuspendT s;
-  const SuspendT scopy(s); (void)scopy;
-  SuspendT smove(std::move(s)); (void)smove;
-  s = scopy;
-  s = std::move(smove);
-  return true;
-}
-
-
-int main(int, char**)
-{
-  using H = coro::coroutine_handle<>;
-  using S = SuspendT;
-  H h{};
-  S s{};
-  S const& cs = s;
-  {
-    LIBCPP_STATIC_ASSERT(noexcept(s.await_ready()), "");
-    static_assert(std::is_same<decltype(s.await_ready()), bool>::value, "");
-    assert(s.await_ready() == true);
-    assert(cs.await_ready() == true);
-  }
-  {
-    LIBCPP_STATIC_ASSERT(noexcept(s.await_suspend(h)), "");
-    static_assert(std::is_same<decltype(s.await_suspend(h)), void>::value, "");
-    s.await_suspend(h);
-    cs.await_suspend(h);
-  }
-  {
-    LIBCPP_STATIC_ASSERT(noexcept(s.await_resume()), "");
-    static_assert(std::is_same<decltype(s.await_resume()), void>::value, "");
-    s.await_resume();
-    cs.await_resume();
-  }
-  {
-    static_assert(std::is_nothrow_default_constructible<S>::value, "");
-    static_assert(std::is_nothrow_copy_constructible<S>::value, "");
-    static_assert(std::is_nothrow_move_constructible<S>::value, "");
-    static_assert(std::is_nothrow_copy_assignable<S>::value, "");
-    static_assert(std::is_nothrow_move_assignable<S>::value, "");
-    static_assert(std::is_trivially_copyable<S>::value, "");
-    static_assert(check_suspend_constexpr(), "");
-  }
-
-  return 0;
-}
diff --git a/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/await_result.pass.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/await_result.pass.cpp
deleted file mode 100644 (file)
index 2b4dac2..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// UNSUPPORTED: c++03, c++11
-
-#include <experimental/coroutine>
-#include <cassert>
-
-#include "test_macros.h"
-
-using namespace std::experimental;
-
-struct coro_t {
-  struct promise_type {
-    coro_t get_return_object() {
-      coroutine_handle<promise_type>{};
-      return {};
-    }
-    suspend_never initial_suspend() { return {}; }
-    suspend_never final_suspend() noexcept { return {}; }
-    void return_void() {}
-    static void unhandled_exception() {}
-  };
-};
-
-struct B {
-  ~B() {}
-  bool await_ready() { return true; }
-  B await_resume() { return {}; }
-  template <typename F> void await_suspend(F) {}
-};
-
-
-struct A {
-  ~A() {}
-  bool await_ready() { return true; }
-  int await_resume() { return 42; }
-  template <typename F> void await_suspend(F) {}
-};
-
-int last_value = -1;
-void set_value(int x) {
-  last_value = x;
-}
-
-coro_t f(int n) {
-  if (n == 0) {
-    set_value(0);
-    co_return;
-  }
-  int val = co_await A{};
-  ((void)val);
-  set_value(42);
-}
-
-coro_t g() { B val = co_await B{}; }
-
-int main(int, char**) {
-  last_value = -1;
-  f(0);
-  assert(last_value == 0);
-  f(1);
-  assert(last_value == 42);
-
-  return 0;
-}
diff --git a/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/bool_await_suspend.pass.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/bool_await_suspend.pass.cpp
deleted file mode 100644 (file)
index 611ee25..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// UNSUPPORTED: c++03, c++11
-
-// See https://llvm.org/PR33271
-// UNSUPPORTED: ubsan
-
-#include <experimental/coroutine>
-#include <cassert>
-
-#include "test_macros.h"
-
-using namespace std::experimental;
-
-struct coro_t {
-  struct promise_type {
-    coro_t get_return_object() {
-      return coroutine_handle<promise_type>::from_promise(*this);
-    }
-    suspend_never initial_suspend() { return {}; }
-    suspend_never final_suspend() noexcept { return {}; }
-    void return_void() {}
-    void unhandled_exception() {}
-  };
-  coro_t(coroutine_handle<promise_type> hh) : h(hh) {}
-  coroutine_handle<promise_type> h;
-};
-
-struct NoSuspend {
-  bool await_ready() { return false; }
-  void await_resume() {}
-  template <typename F> bool await_suspend(F) { return false; }
-};
-
-struct DoSuspend {
-  bool await_ready() { return false; }
-  void await_resume() {}
-  template <typename F> bool await_suspend(F) { return true; }
-};
-
-bool f_started, f_resumed = false;
-coro_t f() {
-  f_started = true;
-  co_await DoSuspend{};
-  f_resumed = true;
-}
-
-bool g_started, g_resumed = false;
-coro_t g() {
-  g_started = true;
-  co_await NoSuspend{};
-  g_resumed = true;
-}
-
-int main(int, char**) {
-  assert(!f_started && !f_resumed && !g_started && !g_resumed);
-  auto fret = f();
-  assert(f_started && !f_resumed);
-  fret.h.destroy();
-  assert(f_started && !f_resumed);
-  g();
-  assert(g_started && g_resumed);
-
-  return 0;
-}
diff --git a/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/expected.pass.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/expected.pass.cpp
deleted file mode 100644 (file)
index 59618e2..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// UNSUPPORTED: c++03, c++11
-
-#include <experimental/coroutine>
-#include <cassert>
-#include <memory>
-
-#include "test_macros.h"
-using namespace std::experimental;
-
-struct error_tag { };
-
-template <typename T, typename Error = int>
-struct expected {
-
-  struct Data {
-    Data() : val(), error() { }
-    Data(T v, Error e) : val(v), error(e) { }
-    T val;
-    Error error;
-  };
-  std::shared_ptr<Data> data;
-
-  expected(T val) : data(std::make_shared<Data>(val, Error())) {}
-  expected(error_tag, Error error) : data(std::make_shared<Data>(T(), error)) {}
-  expected(std::shared_ptr<Data> p) : data(p) {}
-
-  struct promise_type {
-    std::shared_ptr<Data> data;
-    expected get_return_object() { data = std::make_shared<Data>(); return {data}; }
-    suspend_never initial_suspend() { return {}; }
-    suspend_never final_suspend() noexcept { return {}; }
-    void return_value(T v) { data->val = v; data->error = {}; }
-    void unhandled_exception() {}
-  };
-
-  bool await_ready() { return !data->error; }
-  T await_resume() { return data->val; }
-  void await_suspend(coroutine_handle<promise_type> h) {
-    h.promise().data->error = data->error;
-    h.destroy();
-  }
-
-  T const& value() { return data->val; }
-  Error const& error() { return data->error; }
-};
-
-expected<int> g() { return {0}; }
-expected<int> h() { return {error_tag{}, 42}; }
-
-extern "C" void print(int);
-
-bool f1_started, f1_resumed = false;
-expected<int> f1() {
-  f1_started = true;
-  (void)(co_await g());
-  f1_resumed = true;
-  co_return 100;
-}
-
-bool f2_started, f2_resumed = false;
-expected<int> f2() {
-  f2_started = true;
-  (void)(co_await h());
-  f2_resumed = true;
-  co_return 200;
-}
-
-int main(int, char**) {
-  auto c1 = f1();
-  assert(f1_started && f1_resumed);
-  assert(c1.value() == 100);
-  assert(c1.error() == 0);
-
-  auto c2 = f2();
-  assert(f2_started && !f2_resumed);
-  assert(c2.value() == 0);
-  assert(c2.error() == 42);
-
-  return 0;
-}
diff --git a/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/fullexpr-dtor.pass.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/fullexpr-dtor.pass.cpp
deleted file mode 100644 (file)
index de1b054..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// UNSUPPORTED: c++03, c++11
-
-#include <experimental/coroutine>
-#include <cassert>
-
-#include "test_macros.h"
-
-using namespace std::experimental;
-
-int alive = 0;
-int ctor_called = 0;
-int dtor_called = 0;
-void reset() {
-  assert(alive == 0);
-  alive = 0;
-  ctor_called = 0;
-  dtor_called = 0;
-}
-struct Noisy {
-  Noisy() { ++alive; ++ctor_called; }
-  ~Noisy() { --alive; ++dtor_called; }
-#if TEST_STD_VER > 14
-  Noisy(Noisy const&) = delete;
-#else
-  // FIXME: This test depends on copy elision taking place in C++14
-  // (pre-C++17 guaranteed copy elision)
-  Noisy(Noisy const&);
-#endif
-};
-
-struct Bug {
-  bool await_ready() { return true; }
-  void await_suspend(std::experimental::coroutine_handle<>) {}
-  Noisy await_resume() { return {}; }
-};
-struct coro2 {
-  struct promise_type {
-    suspend_never initial_suspend() { return{}; }
-    suspend_never final_suspend() noexcept { return {}; }
-    coro2 get_return_object() { return{}; }
-    void return_void() {}
-    Bug yield_value(int) { return {}; }
-    void unhandled_exception() {}
-  };
-};
-
-// Checks that destructors are correctly invoked for the object returned by
-// coawait.
-coro2 a() {
-  reset();
-  {
-    auto x = co_await Bug{};
-    assert(alive == 1);
-    assert(ctor_called == 1);
-    assert(dtor_called == 0);
-    ((void)x);
-  }
-  assert(alive == 0);
-  assert(dtor_called == 1);
-}
-
-coro2 b() {
-  reset();
-  {
-    (void)(co_await Bug{});
-    assert(ctor_called == 1);
-    assert(dtor_called == 1);
-    assert(alive == 0);
-  }
-  assert(ctor_called == 1);
-  assert(dtor_called == 1);
-  assert(alive == 0);
-
-}
-
-coro2 c() {
-  reset();
-  {
-    auto x = co_yield 42;
-    assert(alive == 1);
-    assert(ctor_called == 1);
-    assert(dtor_called == 0);
-  }
-  assert(alive == 0);
-  assert(ctor_called == 1);
-  assert(dtor_called == 1);
-}
-
-coro2 d() {
-  reset();
-  {
-    (void)(co_yield 42);
-    assert(ctor_called == 1);
-    assert(dtor_called == 1);
-    assert(alive == 0);
-  }
-  assert(alive == 0);
-  assert(ctor_called == 1);
-  assert(dtor_called == 1);
-}
-
-int main(int, char**) {
-  a();
-  b();
-  c();
-  d();
-
-  return 0;
-}
diff --git a/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/generator.pass.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/generator.pass.cpp
deleted file mode 100644 (file)
index 2a05e8e..0000000
+++ /dev/null
@@ -1,161 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// UNSUPPORTED: c++03, c++11
-
-// See https://llvm.org/PR33271
-// UNSUPPORTED: ubsan
-
-#include <experimental/coroutine>
-#include <vector>
-#include <cassert>
-
-#include "test_macros.h"
-
-
-template <typename Ty> struct generator {
-  struct promise_type {
-    Ty current_value;
-    std::experimental::suspend_always yield_value(Ty value) {
-      this->current_value = value;
-      return {};
-    }
-    std::experimental::suspend_always initial_suspend() { return {}; }
-    std::experimental::suspend_always final_suspend() noexcept { return {}; }
-    generator get_return_object() { return generator{this}; };
-    void return_void() {}
-    void unhandled_exception() {}
-  };
-
-  struct iterator {
-    std::experimental::coroutine_handle<promise_type> _Coro;
-    bool _Done;
-
-    iterator(std::experimental::coroutine_handle<promise_type> Coro, bool Done)
-        : _Coro(Coro), _Done(Done) {}
-
-    iterator &operator++() {
-      _Coro.resume();
-      _Done = _Coro.done();
-      return *this;
-    }
-
-    bool operator==(iterator const &_Right) const {
-      return _Done == _Right._Done;
-    }
-
-    bool operator!=(iterator const &_Right) const { return !(*this == _Right); }
-
-    Ty const &operator*() const { return _Coro.promise().current_value; }
-
-    Ty const *operator->() const { return &(operator*()); }
-  };
-
-  iterator begin() {
-    p.resume();
-    return {p, p.done()};
-  }
-
-  iterator end() { return {p, true}; }
-
-  generator(generator &&rhs) : p(rhs.p) { rhs.p = nullptr; }
-
-  ~generator() {
-    if (p)
-      p.destroy();
-  }
-
-private:
-  explicit generator(promise_type *p)
-      : p(std::experimental::coroutine_handle<promise_type>::from_promise(*p)) {}
-
-  std::experimental::coroutine_handle<promise_type> p;
-};
-
-struct minig {
-  struct promise_type {
-    int current_value;
-    std::experimental::suspend_always yield_value(int value) {
-      this->current_value = value;
-      return {};
-    }
-    std::experimental::suspend_always initial_suspend() { return {}; }
-    std::experimental::suspend_always final_suspend() noexcept { return {}; }
-    minig get_return_object() { return minig{this}; };
-    void return_void() {}
-    void unhandled_exception() {}
-  };
-
-  bool move_next() {
-    p.resume();
-    return !p.done();
-  }
-  int current_value() { return p.promise().current_value; }
-
-  minig(minig &&rhs) : p(rhs.p) { rhs.p = nullptr; }
-
-  ~minig() {
-    if (p)
-      p.destroy();
-  }
-
-private:
-  explicit minig(promise_type *p)
-      : p(std::experimental::coroutine_handle<promise_type>::from_promise(*p)) {}
-
-  std::experimental::coroutine_handle<promise_type> p;
-};
-
-
-minig mini_count(int n) {
-  for (int i = 0; i < n; i++) {
-    co_yield i;
-  }
-}
-
-generator<int> count(int n) {
-  for (int i = 0; i < n; ++i)
-    co_yield i;
-}
-
-generator<int> range(int from, int n) {
-  for (int i = from; i < n; ++i)
-    co_yield i;
-}
-
-void test_count() {
-  const std::vector<int> expect = {0, 1, 2, 3, 4};
-  std::vector<int> got;
-  for (auto x : count(5))
-    got.push_back(x);
-  assert(expect == got);
-}
-
-void test_range() {
-  int sum = 0;
-   for (auto v: range(1, 20))
-      sum += v;
-   assert(sum == 190);
-}
-
-void test_mini_generator() {
-  int sum = 0;
-  auto g = mini_count(5);
-  while (g.move_next()) {
-     sum += g.current_value();
-  }
-  assert(sum == 10);
-}
-
-int main(int, char**) {
-  test_count();
-  test_range();
-  test_mini_generator();
-
-  return 0;
-}
diff --git a/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/go.pass.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/go.pass.cpp
deleted file mode 100644 (file)
index 3e323ad..0000000
+++ /dev/null
@@ -1,176 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// UNSUPPORTED: c++03, c++11
-
-#include <experimental/coroutine>
-#include <cassert>
-
-#include "test_macros.h"
-
-using namespace std::experimental;
-
-bool cancel = false;
-
-struct goroutine
-{
-  static int const N = 10;
-  static int count;
-  static coroutine_handle<> stack[N];
-
-  static void schedule(coroutine_handle<>& rh)
-  {
-    assert(count < N);
-    stack[count++] = rh;
-    rh = nullptr;
-  }
-
-  ~goroutine() {}
-
-  static void go(goroutine) {}
-
-  static void run_one()
-  {
-    assert(count > 0);
-    stack[--count]();
-  }
-
-  struct promise_type
-  {
-    suspend_never initial_suspend() {
-      return {};
-    }
-    suspend_never final_suspend() noexcept { return {}; }
-    void return_void() {}
-    goroutine get_return_object() {
-      return{};
-    }
-    void unhandled_exception() {}
-  };
-};
-int goroutine::count;
-coroutine_handle<> goroutine::stack[N];
-
-coroutine_handle<goroutine::promise_type> workaround;
-
-class channel;
-
-struct push_awaiter {
-  channel* ch;
-  bool await_ready() {return false; }
-  void await_suspend(coroutine_handle<> rh);
-  void await_resume() {}
-};
-
-struct pull_awaiter {
-  channel * ch;
-
-  bool await_ready();
-  void await_suspend(coroutine_handle<> rh);
-  int await_resume();
-};
-
-class channel
-{
-  using T = int;
-
-  friend struct push_awaiter;
-  friend struct pull_awaiter;
-
-  T const* pvalue = nullptr;
-  coroutine_handle<> reader = nullptr;
-  coroutine_handle<> writer = nullptr;
-public:
-  push_awaiter push(T const& value)
-  {
-    assert(pvalue == nullptr);
-    assert(!writer);
-    pvalue = &value;
-
-    return { this };
-  }
-
-  pull_awaiter pull()
-  {
-    assert(!reader);
-
-    return { this };
-  }
-
-  void sync_push(T const& value)
-  {
-    assert(!pvalue);
-    pvalue = &value;
-    assert(reader);
-    reader();
-    assert(!pvalue);
-    reader = nullptr;
-  }
-
-  auto sync_pull()
-  {
-    while (!pvalue) goroutine::run_one();
-    auto result = *pvalue;
-    pvalue = nullptr;
-    if (writer)
-    {
-      auto wr = writer;
-      writer = nullptr;
-      wr();
-    }
-    return result;
-  }
-};
-
-void push_awaiter::await_suspend(coroutine_handle<> rh)
-{
-  ch->writer = rh;
-  if (ch->reader) goroutine::schedule(ch->reader);
-}
-
-
-bool pull_awaiter::await_ready() {
-  return !!ch->writer;
-}
-void pull_awaiter::await_suspend(coroutine_handle<> rh) {
-  ch->reader = rh;
-}
-int pull_awaiter::await_resume() {
-  auto result = *ch->pvalue;
-  ch->pvalue = nullptr;
-  if (ch->writer) {
-    //goroutine::schedule(ch->writer);
-    auto wr = ch->writer;
-    ch->writer = nullptr;
-    wr();
-  }
-  return result;
-}
-
-goroutine pusher(channel& left, channel& right)
-{
-  for (;;) {
-    auto val = co_await left.pull();
-    co_await right.push(val + 1);
-  }
-}
-
-const int N = 100;
-channel* c = new channel[N + 1];
-
-int main(int, char**) {
-  for (int i = 0; i < N; ++i)
-    goroutine::go(pusher(c[i], c[i + 1]));
-
-  c[0].sync_push(0);
-  int result = c[N].sync_pull();
-
-  assert(result == 100);
-
-  return 0;
-}
diff --git a/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/multishot_func.pass.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/multishot_func.pass.cpp
deleted file mode 100644 (file)
index dd8c5ea..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// UNSUPPORTED: c++03, c++11
-
-#include <experimental/coroutine>
-#include <cassert>
-
-#include "test_macros.h"
-
-using namespace std::experimental;
-
-// This file tests, multishot, movable std::function like thing using coroutine
-// for compile-time type erasure and unerasure.
-template <typename R> struct func {
-  struct Input {R a, b;};
-
-  struct promise_type {
-    Input* I;
-    R result;
-    func get_return_object() { return {this}; }
-    suspend_always initial_suspend() { return {}; }
-    suspend_never final_suspend() noexcept { return {}; }
-    void return_void() {}
-    template <typename F>
-    suspend_always yield_value(F&& f) {
-      result = f(I->a, I->b);
-      return {};
-    }
-    void unhandled_exception() {}
-  };
-
-  R operator()(Input I) {
-    h.promise().I = &I;
-    h.resume();
-    R result = h.promise().result;
-    return result;
-  };
-
-  func() {}
-  func(func &&rhs) : h(rhs.h) { rhs.h = nullptr; }
-  func(func const &) = delete;
-
-  func &operator=(func &&rhs) {
-    if (this != &rhs) {
-      if (h)
-        h.destroy();
-      h = rhs.h;
-      rhs.h = nullptr;
-    }
-    return *this;
-  }
-
-  template <typename F> static func Create(F f) {
-    for (;;) {
-      co_yield f;
-    }
-  }
-
-  template <typename F> func(F f) : func(Create(f)) {}
-
-  ~func() {
-    if (h)
-      h.destroy();
-  }
-
-private:
-  func(promise_type *promise)
-      : h(coroutine_handle<promise_type>::from_promise(*promise)) {}
-  coroutine_handle<promise_type> h;
-};
-
-int Do(int acc, int n, func<int> f) {
-  for (int i = 0; i < n; ++i)
-    acc = f({acc, i});
-  return acc;
-}
-
-int main(int, char**) {
-  int result = Do(1, 10, [](int a, int b) {return a + b;});
-  assert(result == 46);
-
-  return 0;
-}
diff --git a/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/oneshot_func.pass.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/oneshot_func.pass.cpp
deleted file mode 100644 (file)
index 105ca8a..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// UNSUPPORTED: c++03, c++11
-
-// XFAIL: libcpp-has-debug-mode
-
-#include <experimental/coroutine>
-#include <vector>
-#include <cassert>
-
-#include "test_macros.h"
-
-using namespace std::experimental;
-
-// This file tests, one shot, movable std::function like thing using coroutine
-// for compile-time type erasure and unerasure.
-
-template <typename R> struct func {
-  struct promise_type {
-    R result;
-    func get_return_object() { return {this}; }
-    suspend_always initial_suspend() { return {}; }
-    suspend_always final_suspend() noexcept { return {}; }
-    void return_value(R v) { result = v; }
-    void unhandled_exception() {}
-  };
-
-  R operator()() {
-    h.resume();
-    R result = h.promise().result;
-    h.destroy();
-    h = nullptr;
-    return result;
-  };
-
-  func() {}
-  func(func &&rhs) : h(rhs.h) { rhs.h = nullptr; }
-  func(func const &) = delete;
-
-  func &operator=(func &&rhs) {
-    if (this != &rhs) {
-      if (h)
-        h.destroy();
-      h = rhs.h;
-      rhs.h = nullptr;
-    }
-    return *this;
-  }
-
-  template <typename F> static func Create(F f) { co_return f(); }
-
-  template <typename F> func(F f) : func(Create(f)) {}
-
-  ~func() {
-    if (h)
-      h.destroy();
-  }
-
-private:
-  func(promise_type *promise)
-      : h(coroutine_handle<promise_type>::from_promise(*promise)) {}
-  coroutine_handle<promise_type> h;
-};
-
-std::vector<int> yielded_values = {};
-int yield(int x) { yielded_values.push_back(x); return x + 1; }
-float fyield(int x) { yielded_values.push_back(x); return static_cast<float>(x + 2); }
-
-void Do1(func<int> f) { yield(f()); }
-void Do2(func<double> f) { yield(static_cast<int>(f())); }
-
-int main(int, char**) {
-  Do1([] { return yield(43); });
-  assert((yielded_values == std::vector<int>{43, 44}));
-
-  yielded_values = {};
-  Do2([] { return fyield(44); });
-  assert((yielded_values == std::vector<int>{44, 46}));
-
-  return 0;
-}
diff --git a/libcxx/test/std/experimental/language.support/support.coroutines/includes.pass.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/includes.pass.cpp
deleted file mode 100644 (file)
index ea39576..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// UNSUPPORTED: c++03, c++11
-
-// <experimental/coroutine>
-
-// Test that <experimental/coroutine> includes <new>
-
-#include <experimental/coroutine>
-
-int main(int, char**) {
-  // std::nothrow is not implicitly defined by the compiler when the include is
-  // missing, unlike other parts of <new>. Therefore we use std::nothrow to
-  // test for #include <new>
-
-  (void)std::nothrow;
-
-  return 0;
-}
diff --git a/libcxx/test/std/experimental/language.support/support.coroutines/lit.local.cfg b/libcxx/test/std/experimental/language.support/support.coroutines/lit.local.cfg
deleted file mode 100644 (file)
index 223de62..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-# If the compiler doesn't support coroutines mark all of the tests under
-# this directory as unsupported. Otherwise add the required `-fcoroutines-ts`
-# flag.
-if 'fcoroutines-ts' not in config.available_features:
-  config.unsupported = True
-else:
-  config.test_format.addCompileFlags(config, '-fcoroutines-ts')
-  config.test_format.addCompileFlags(config, '-Wno-coroutine')
index 2981963..f9f9ddc 100755 (executable)
@@ -43,7 +43,6 @@ header_restrictions = {
     "wchar.h": "!defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS)",
 
     "experimental/algorithm": "__cplusplus >= 201103L",
-    "experimental/coroutine": "__cplusplus >= 201103L && !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_COROUTINES)",
     "experimental/deque": "__cplusplus >= 201103L",
     "experimental/forward_list": "__cplusplus >= 201103L",
     "experimental/functional": "__cplusplus >= 201103L",
index c2745b9..8e68f24 100644 (file)
@@ -35,11 +35,6 @@ def _getSuitableClangTidy(cfg):
     return None
 
 DEFAULT_FEATURES = [
-  Feature(name='fcoroutines-ts',
-          when=lambda cfg: hasCompileFlag(cfg, '-fcoroutines-ts') and
-                           featureTestMacros(cfg, flags='-fcoroutines-ts').get('__cpp_coroutines', 0) >= 201703,
-          actions=[AddCompileFlag('-fcoroutines-ts')]),
-
   Feature(name='thread-safety',
           when=lambda cfg: hasCompileFlag(cfg, '-Werror=thread-safety'),
           actions=[AddCompileFlag('-Werror=thread-safety')]),
index 6860f8d..b491890 100644 (file)
@@ -266,11 +266,6 @@ class CxxStandardLibraryTest(lit.formats.TestFormat):
         else:
             return lit.Test.Result(lit.Test.UNRESOLVED, "Unknown test suffix for '{}'".format(filename))
 
-    # Utility function to add compile flags in lit.local.cfg files.
-    def addCompileFlags(self, config, *flags):
-        string = ' '.join(flags)
-        config.substitutions = [(s, x + ' ' + string) if s == '%{compile_flags}' else (s, x) for (s, x) in config.substitutions]
-
     def _executeShTest(self, test, litConfig, steps):
         if test.config.unsupported:
             return lit.Test.Result(lit.Test.UNSUPPORTED, 'Test is unsupported')