]> granicus.if.org Git - clang/commit
[coroutines] Build and pass coroutine_handle to await_suspend
authorGor Nishanov <GorNishanov@gmail.com>
Thu, 9 Mar 2017 03:09:43 +0000 (03:09 +0000)
committerGor Nishanov <GorNishanov@gmail.com>
Thu, 9 Mar 2017 03:09:43 +0000 (03:09 +0000)
commit48672a5fa2f8a4fe6e4273e6e496e5fa17182c9e
tree2aaaa4a9490ee0a606e88c70596bd5960dd659aa
parent051c5018aa747eee15a2f646dd5dab4aba93b7f3
[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
include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaCoroutine.cpp
lib/Sema/SemaExprMember.cpp
test/CodeGenCoroutines/coro-alloc.cpp
test/CodeGenCoroutines/coro-return.cpp
test/SemaCXX/coreturn.cpp
test/SemaCXX/coroutines.cpp