1 // RUN: %clang_cc1 -std=c++20 -triple=x86_64-unknown-linux-gnu -emit-llvm %s -o - -disable-llvm-passes | FileCheck %s
3 #include "Inputs/coroutine.h"
7 coro1
get_return_object();
8 std::suspend_never
initial_suspend();
9 std::suspend_never
final_suspend() noexcept
;
11 void unhandled_exception() noexcept
;
16 co_await
std::suspend_never
{};
19 // CHECK-LABEL: define{{.*}} void @_Z1fv(
20 // CHECK: call void @_ZNSt13suspend_never12await_resumeEv(ptr
21 // CHECK: call void @_ZN5coro112promise_type11return_voidEv(ptr {{[^,]*}} %__promise)
32 // CHECK-LABEL: define{{.*}} void @_Z2f2v(
33 // CHECK: call void @_ZN1AC1Ev(ptr {{[^,]*}} %[[AVar:.*]])
34 // CHECK-NEXT: call void @_ZN1AD1Ev(ptr {{[^,]*}} %[[AVar]])
35 // CHECK-NEXT: call void @_ZN5coro112promise_type11return_voidEv(ptr
39 coro2
get_return_object();
40 std::suspend_never
initial_suspend();
41 std::suspend_never
final_suspend() noexcept
;
42 void return_value(int);
43 void unhandled_exception() noexcept
;
51 // CHECK-LABEL: define{{.*}} void @_Z1gv(
52 // CHECK: call void @_ZNSt13suspend_never12await_resumeEv(ptr
53 // CHECK: call void @_ZN5coro212promise_type12return_valueEi(ptr {{[^,]*}} %__promise, i32 noundef 42)