]> git.ipfire.org Git - thirdparty/gcc.git/commit
coroutines: Add a helper for creating local vars.
authorIain Sandoe <iain@sandoe.co.uk>
Wed, 7 Jul 2021 18:53:45 +0000 (19:53 +0100)
committerIain Sandoe <iain@sandoe.co.uk>
Sun, 3 Oct 2021 19:20:10 +0000 (20:20 +0100)
commit4353b3b485f58570190e181cc5bdf771c3802281
tree56378190668a8d5c0ab2686722e46c445d26761a
parentb0be263236d6ab1931f0d71bc8905b653b528df2
coroutines: Add a helper for creating local vars.

This is primarily code factoring, but we take this opportunity
to rename some of the implementation variables (which we intend
to expose to debugging) so that they are in the implementation
namespace.

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

* coroutines.cc (coro_build_artificial_var): New.
(build_actor_fn): Use var builder, rename vars to use
implementation namespace.
(coro_rewrite_function_body): Likewise.
(morph_fn_to_coro): Likewise.

(cherry picked from commit a45a7ecdf34311587daa2e90cc732adcefac447b)
gcc/cp/coroutines.cc