[coroutines] Add support for coroutines with non-scalar parameters
authorGor Nishanov <GorNishanov@gmail.com>
Wed, 24 May 2017 20:09:14 +0000 (20:09 +0000)
committerGor Nishanov <GorNishanov@gmail.com>
Wed, 24 May 2017 20:09:14 +0000 (20:09 +0000)
commit33d5fd24a0840075411d3943e6310d11027e6e93
tree259e62fcb1ceaa742e73673fee17df702c175266
parent7a8717d2165ec94ce882b4cc872582d109c41fbd
[coroutines] Add support for coroutines with non-scalar parameters

Summary:
Simple types like int are handled by LLVM Coroutines just fine.
But for non-scalar parameters we need to create copies of those parameters in the coroutine frame and make all uses of those parameters to refer to parameter copies.

Reviewers: rsmith, EricWF, GorNishanov

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D33507

llvm-svn: 303803
clang/lib/CodeGen/CGCoroutine.cpp
clang/lib/Sema/SemaCoroutine.cpp
clang/test/CodeGenCoroutines/coro-params.cpp [new file with mode: 0644]