1 // Check that we can still observe the value of the coroutine frame
4 // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++20 \
5 // RUN: -emit-llvm %s -debug-info-kind=limited -dwarf-version=5 \
6 // RUN: -O2 -o - | FileCheck %s
8 #include "Inputs/coroutine.h"
11 struct std::coroutine_traits
<void> {
13 void get_return_object();
14 std::suspend_always
initial_suspend();
15 std::suspend_always
final_suspend() noexcept
;
17 void unhandled_exception();
21 struct ScalarAwaiter
{
22 template <typename F
> void await_suspend(F
);
27 extern "C" void UseScalar(int);
30 UseScalar(co_await ScalarAwaiter
{});
32 int Val
= co_await ScalarAwaiter
{};
34 co_await ScalarAwaiter
{};
37 // CHECK: define {{.*}}@f.resume({{.*}} %[[ARG:.*]])
38 // CHECK: #dbg_value(ptr %[[ARG]], ![[CORO_NUM:[0-9]+]], !DIExpression(DW_OP_deref)
39 // CHECK: ![[CORO_NUM]] = !DILocalVariable(name: "__coro_frame"