[coroutines] Build and pass coroutine_handle to await_suspend
Summary: This patch adds passing a coroutine_handle object to await_suspend calls. It builds the coroutine_handle using coroutine_handle<PromiseType>::from_address(__builtin_coro_frame()). (a revision of https://reviews.llvm.org/D26316 that for some reason refuses to apply via arc patch) Reviewers: GorNishanov Subscribers: mehdi_amini, cfe-commits, EricWF Differential Revision: https://reviews.llvm.org/D30769 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@297356 91177308-0d34-0410-b5e6-96231b3b80d8
Showing
- include/clang/Basic/DiagnosticSemaKinds.td 8 additions, 3 deletionsinclude/clang/Basic/DiagnosticSemaKinds.td
- lib/Sema/SemaCoroutine.cpp 109 additions, 13 deletionslib/Sema/SemaCoroutine.cpp
- lib/Sema/SemaExprMember.cpp 1 addition, 1 deletionlib/Sema/SemaExprMember.cpp
- test/CodeGenCoroutines/coro-alloc.cpp 16 additions, 1 deletiontest/CodeGenCoroutines/coro-alloc.cpp
- test/CodeGenCoroutines/coro-return.cpp 16 additions, 1 deletiontest/CodeGenCoroutines/coro-return.cpp
- test/SemaCXX/coreturn.cpp 23 additions, 14 deletionstest/SemaCXX/coreturn.cpp
- test/SemaCXX/coroutines.cpp 53 additions, 27 deletionstest/SemaCXX/coroutines.cpp
Loading
Please register or sign in to comment