hanchenye-llvm-project/clang/test/CodeGenCoroutines
Brian Gesiak 986062219f [Coroutines] Use allocator overload when available
Summary:
Depends on https://reviews.llvm.org/D42605.

An implementation of the behavior described in `[dcl.fct.def.coroutine]/7`:
when a promise type overloads `operator new` using a "placement new"
that takes the same argument types as the coroutine function, that
overload is used when allocating the coroutine frame.

Simply passing references to the coroutine function parameters directly
to `operator new` results in invariant violations in LLVM's coroutine
splitting pass, so this implementation modifies Clang codegen to
produce allocator-specific alloc/store/loads for each parameter being
forwarded to the allocator.

Test Plan: `check-clang`

Reviewers: rsmith, GorNishanov, eric_niebler

Reviewed By: GorNishanov

Subscribers: lewissbaker, EricWF, cfe-commits

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

llvm-svn: 325291
2018-02-15 20:37:22 +00:00
..
Inputs
coro-alloc.cpp [Coroutines] Use allocator overload when available 2018-02-15 20:37:22 +00:00
coro-await-domination.cpp
coro-await.cpp
coro-builtins-err.c
coro-builtins.c
coro-cleanup.cpp
coro-dest-slot.cpp [coroutines] Promote cleanup.dest.slot allocas to registers to avoid storing it in the coroutine frame 2017-11-11 17:00:43 +00:00
coro-eh-cleanup.cpp
coro-gro-nrvo.cpp [Coroutines] Use allocator overload when available 2018-02-15 20:37:22 +00:00
coro-gro.cpp
coro-lambda.cpp
coro-params.cpp [Coroutines] Use allocator overload when available 2018-02-15 20:37:22 +00:00
coro-promise-dtor.cpp
coro-ret-void.cpp
coro-return.cpp
coro-unhandled-exception.cpp
microsoft-abi-operator-coawait.cpp