1 // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++20 \
2 // RUN: -emit-llvm %s -o - -disable-llvm-passes \
5 #include "Inputs/coroutine.h"
8 typedef __SIZE_TYPE__
size_t;
9 enum class align_val_t
: size_t {};
14 auto initial_suspend() { return std::suspend_always
{}; }
15 auto final_suspend() noexcept
{ return std::suspend_always
{}; }
16 auto get_return_object() { return task
{}; }
17 void unhandled_exception() {}
18 void return_value(int) {}
22 // Test the compiler will chose sized deallocation correctly.
23 void operator delete(void *ptr
, std::size_t size
) noexcept
;
25 // CHECK: define{{.*}}@_Z1fv
26 // CHECK: %[[coro_free:.+]] = call{{.*}}@llvm.coro.free
28 // CHECK: %[[coro_size:.+]] = call{{.*}}@llvm.coro.size
29 // CHECK: call{{.*}}void @_ZdlPvm(ptr{{.*}}%[[coro_free]], i64{{.*}}%[[coro_size]])