summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCoroutines/coro-gro.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [coroutines] Implement correct GRO lifetimeGor Nishanov2017-05-241-0/+86
Summary: Sema creates a declaration for gro variable as: auto $gro = $promise.get_return_object(); However, gro variable has to outlive coroutine frame and coroutine promise, but, it can only be initialized after the coroutine promise was created, thus, we split its emission in two parts: EmitGroAlloca emits an alloca and sets up the cleanups. Later when the coroutine promise is available we initialize the gro and set the flag that the cleanup is now active. Duplicate of: https://reviews.llvm.org/D31670 (which arc patch refuses to apply for some reason) Reviewers: GorNishanov, rsmith Reviewed By: GorNishanov Subscribers: EricWF, cfe-commits Differential Revision: https://reviews.llvm.org/D33477 llvm-svn: 303716
OpenPOWER on IntegriCloud