2008-10-03 Jakub Jelinek <jakub@redhat.com>
+ * gimplify.c (gimplify_function_tree): For -finstrument-functions
+ use gimple_bind_{,set_}block instead of gimple_{,set_}block.
+ * gimple.h (gimple_bind_set_block): Allow second argument to be NULL.
+
PR debug/37726
* gimplify.c (declare_vars): Use gimple_bind_block instead of
gimple_block.
gimple_bind_set_block (gimple gs, tree block)
{
GIMPLE_CHECK (gs, GIMPLE_BIND);
- gcc_assert (TREE_CODE (block) == BLOCK);
+ gcc_assert (block == NULL_TREE || TREE_CODE (block) == BLOCK);
gs->gimple_bind.block = block;
}
x = implicit_built_in_decls[BUILT_IN_PROFILE_FUNC_ENTER];
gimplify_seq_add_stmt (&body, gimple_build_call (x, 0));
gimplify_seq_add_stmt (&body, tf);
- new_bind = gimple_build_bind (NULL, body, gimple_block (bind));
+ new_bind = gimple_build_bind (NULL, body, gimple_bind_block (bind));
/* Clear the block for BIND, since it is no longer directly inside
the function, but within a try block. */
- gimple_set_block (bind, NULL);
+ gimple_bind_set_block (bind, NULL);
/* Replace the current function body with the body
wrapped in the try/finally TF. */