]> git.ipfire.org Git - thirdparty/gcc.git/commit
c++, coroutines: Split the ramp build into a separate function.
authorIain Sandoe <iain@sandoe.co.uk>
Sat, 10 Aug 2024 11:43:36 +0000 (12:43 +0100)
committerIain Sandoe <iain@sandoe.co.uk>
Sat, 24 Aug 2024 18:39:33 +0000 (19:39 +0100)
commitd5da5f00d91a8344fdb366c317366bd8e93ad1b8
treeb21b62a1e039bfd0764c87789839a0e123798d0b
parent47dbd69b1b31d34e28bf617d7991e6ad6a8bb957
c++, coroutines: Split the ramp build into a separate function.

This is primarily preparation to partition the functionality of the
coroutine transform into analysis, ramp generation and then (later)
synthesis of the coroutine body.  The patch does fix one latent
issue in the ordering of DTORs for frame parameter copies (to ensure
that they are processed in reverse order to the copy creation).

gcc/cp/ChangeLog:

* coroutines.cc (build_actor_fn): Arrange to apply any
required parameter copy DTORs in reverse order to their
creation.
(coro_rewrite_function_body): Handle revised param uses.
(morph_fn_to_coro): Split the ramp function completion
into a separate function.
(build_ramp_function): New.

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
gcc/cp/coroutines.cc