c++, coroutines: Ensure that the resumer is marked as can_throw.
We must flag that the resumer might throw (since the wrapping of the
original function body unconditionally adds a try-catch/rethrow). We
also add code that might throw - even when the original function body
would not.
TODO: We could improve code-gen by recognising cases where the combined
body + initial await expressions cannot throw and omitting the unneeded
try/catch/rethrow wrapper.
gcc/cp/ChangeLog:
* coroutines.cc (build_actor_fn): Set can_throw.
Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
(cherry picked from commit
e83c4bfc338fad0c87b2debb37ccfe98d148c7ac)