]> git.ipfire.org Git - thirdparty/gcc.git/commit
coroutines: Small cleanups to await_statement_walker [NFC].
authorIain Sandoe <iain@sandoe.co.uk>
Wed, 14 Jul 2021 09:13:23 +0000 (10:13 +0100)
committerIain Sandoe <iain@sandoe.co.uk>
Thu, 16 Sep 2021 11:54:56 +0000 (12:54 +0100)
commitab08859e37ef822c839bc33ec097091f17ebfe76
tree25ae009dc06609738960c5507a1714f9adf67b85
parent8d6b12b2233dabf3573383a15ccc67fdb925e5b3
coroutines: Small cleanups to await_statement_walker [NFC].

There is no need to make a MODIFY_EXPR for any of the condition
vars that we synthesize.

Expansion of co_return can be carried out independently of any
co_awaits that might be contained which simplifies this.

Where we are rewriting statements to handle await expression
logic, there is no need to carry out any analysis - we just need
to detect the presence of any co_await.

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

* coroutines.cc (await_statement_walker): Code cleanups.
gcc/cp/coroutines.cc