c++-coroutines - verify trees in the actor, NFC.

2019-06-02  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (build_actor_fn): Verify trees before and after.

From-SVN: r271846
This commit is contained in:
Iain Sandoe
2019-06-02 20:05:37 +00:00
committed by Iain Sandoe
parent 5fa69be699
commit 23f69ab02e
2 changed files with 7 additions and 0 deletions

View File

@@ -1,3 +1,8 @@
2019-06-02 Iain Sandoe <iain@sandoe.co.uk>
gcc/cp/
* coroutines.cc (build_actor_fn): Verify trees before and after.
2019-06-02 Iain Sandoe <iain@sandoe.co.uk>
gcc/cp/

View File

@@ -1152,6 +1152,7 @@ build_actor_fn (location_t loc, tree coro_frame_type, tree actor,
tree fnbody, tree orig,
tree initial_await, tree final_await, unsigned body_count)
{
verify_stmt_tree (fnbody);
/* Some things we inherit from the original function. */
tree coro_frame_ptr = build_pointer_type (coro_frame_type);
tree handle_type = DECL_COROUTINE_HANDLE_TYPE (orig);
@@ -1453,6 +1454,7 @@ build_actor_fn (location_t loc, tree coro_frame_type, tree actor,
finish_compound_stmt (stmt);
DECL_SAVED_TREE (actor) = pop_stmt_list (actor_outer);
verify_stmt_tree (DECL_SAVED_TREE (actor));
}
/* The prototype 'destroy' function :