coroutines: Replace extra checks for co_yield with asserts.
authorIain Sandoe <iain@sandoe.co.uk>
Tue, 5 May 2020 19:27:27 +0000 (20:27 +0100)
committerIain Sandoe <iain@sandoe.co.uk>
Tue, 5 May 2020 19:27:27 +0000 (20:27 +0100)
commitf1656ae9234d1a1caee79183786d1f0ac2f8dbf4
tree9489d7cf14f0b2c8f799a1ab5a10ded768d1654c
parente5185cc6be3da99435129cdc0c769d4081e82989
coroutines: Replace extra checks for co_yield with asserts.

The lowering of co_yield to a promise method call and a co_await
was moved to the initial analysis phase with the intention of
avoiding the need to handle the two cases later.

Before removing the later checks entirely, this patch replaces
them with checking asserts.

gcc/cp/Changelog:

2020-05-05  Iain Sandoe  <iain@sandoe.co.uk>

* coroutines.cc (transform_await_wrapper): Check that we have
no unlowered co_yields.
(captures_temporary): Likewise.
(register_awaits): Likewise.
gcc/cp/ChangeLog
gcc/cp/coroutines.cc