diff options
author | Iain Sandoe <iain@sandoe.co.uk> | 2024-08-16 17:56:57 +0100 |
---|---|---|
committer | Iain Sandoe <iain@sandoe.co.uk> | 2024-08-24 19:53:02 +0100 |
commit | 624fb5b4407b4b9c23ca813a49b928d650d52480 (patch) | |
tree | 483cade7cc35b2d0b54c6143b4f6e694353b3d16 /gcc/dwarf2codeview.cc | |
parent | 6303cd7e41546e95c436bd274cc972674230fe1c (diff) | |
download | gcc-624fb5b4407b4b9c23ca813a49b928d650d52480.zip gcc-624fb5b4407b4b9c23ca813a49b928d650d52480.tar.gz gcc-624fb5b4407b4b9c23ca813a49b928d650d52480.tar.bz2 |
c++, coroutines: Separate allocator work from the ramp body build.
This splits out the building of the allocation and deallocation expressions
and runs them early in the ramp build, so that we can exit if they are not
usable, before we start building the ramp body.
Likewise move checks for other required resources to the begining of the
ramp builder.
This is preparation for work needed to update the allocation/destruction
in cases where we have excess alignment of the promise or other saved frame
state.
gcc/cp/ChangeLog:
* call.cc (build_op_delete_call_1): Renamed and added a param
to allow the caller to prioritize two argument usual deleters.
(build_op_delete_call): New.
(build_coroutine_op_delete_call): New.
* coroutines.cc (coro_get_frame_dtor): Rename...
(build_coroutine_frame_delete_expr):... to this; simplify to
use build_op_delete_call for all cases.
(build_actor_fn): Use revised frame delete function.
(build_coroutine_frame_alloc_expr): New.
(cp_coroutine_transform::complete_ramp_function): Rename...
(cp_coroutine_transform::build_ramp_function): ... to this.
Reorder code to carry out checks for prerequisites before the
codegen. Split out the allocation/delete code.
(cp_coroutine_transform::apply_transforms): Use revised name.
* coroutines.h: Rename function.
* cp-tree.h (build_coroutine_op_delete_call): New.
gcc/testsuite/ChangeLog:
* g++.dg/coroutines/coro-bad-alloc-01-bad-op-del.C: Use revised
diagnostics.
* g++.dg/coroutines/coro-bad-gro-00-class-gro-scalar-return.C:
Likewise.
* g++.dg/coroutines/coro-bad-gro-01-void-gro-non-class-coro.C:
Likewise.
* g++.dg/coroutines/coro-bad-grooaf-00-static.C: Likewise.
* g++.dg/coroutines/ramp-return-b.C: Likewise.
Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
Diffstat (limited to 'gcc/dwarf2codeview.cc')
0 files changed, 0 insertions, 0 deletions