Skip to content

Commit fe545ea

Browse files
committed
c++, coroutines: Use finish_if_stmt in a missed case.
Just shorter code. gcc/cp/ChangeLog: * coroutines.cc (cp_coroutine_transform::wrap_original_function_body): Use finish_if_stmt instead of manually applying the same process. Signed-off-by: Iain Sandoe <[email protected]>
1 parent 3e4ca89 commit fe545ea

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

gcc/cp/coroutines.cc

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4483,10 +4483,7 @@ cp_coroutine_transform::wrap_original_function_body ()
44834483
suppress_warning (rethrow);
44844484
finish_expr_stmt (rethrow);
44854485
finish_then_clause (not_iarc_if);
4486-
tree iarc_scope = IF_SCOPE (not_iarc_if);
4487-
IF_SCOPE (not_iarc_if) = NULL;
4488-
not_iarc_if = do_poplevel (iarc_scope);
4489-
add_stmt (not_iarc_if);
4486+
finish_if_stmt (not_iarc_if);
44904487
/* ... else call the promise unhandled exception method
44914488
but first we set done = true and the resume index to 0.
44924489
If the unhandled exception method returns, then we continue

0 commit comments

Comments
 (0)