CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
51 lines
1.5 KiB
C++
51 lines
1.5 KiB
C++
// This test merely verifies that emitting the object file does not cause a
|
|
// crash when the LLVM coroutines passes are run.
|
|
// RUN: %clang_cc1 -emit-obj -std=c++2a -fsanitize=null -Wno-coroutines-unsupported-target %s -o %t.o
|
|
// UNSUPPORTED: target={{.*}}-zos{{.*}}
|
|
|
|
namespace std {
|
|
template <typename R, typename... T> struct coroutine_traits {
|
|
using promise_type = typename R::promise_type;
|
|
};
|
|
|
|
template <class Promise = void> struct coroutine_handle;
|
|
template <> struct coroutine_handle<void> {
|
|
static coroutine_handle from_address(void *) noexcept;
|
|
coroutine_handle() = default;
|
|
template <class PromiseType>
|
|
coroutine_handle(coroutine_handle<PromiseType>) noexcept;
|
|
};
|
|
template <class Promise> struct coroutine_handle : coroutine_handle<void> {
|
|
coroutine_handle() = default;
|
|
static coroutine_handle from_address(void *) noexcept;
|
|
};
|
|
} // namespace std
|
|
|
|
struct suspend_always {
|
|
bool await_ready() noexcept;
|
|
void await_suspend(std::coroutine_handle<>) noexcept;
|
|
void await_resume() noexcept;
|
|
};
|
|
|
|
struct task {
|
|
struct promise_type {
|
|
task get_return_object() { return task(); }
|
|
suspend_always initial_suspend() { return {}; }
|
|
suspend_always final_suspend() noexcept { return {}; }
|
|
void return_void() {}
|
|
void unhandled_exception() {}
|
|
};
|
|
};
|
|
|
|
struct awaitable {
|
|
task await() { (void)co_await *this; }
|
|
bool await_ready() { return false; }
|
|
bool await_suspend(std::coroutine_handle<> awaiter) { return false; }
|
|
bool await_resume() { return false; }
|
|
};
|
|
|
|
int main() {
|
|
awaitable a;
|
|
a.await();
|
|
}
|