]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gimplify.c (gimplify_function_tree): For -finstrument-functions use gimple_bind_...
authorJakub Jelinek <jakub@redhat.com>
Fri, 3 Oct 2008 19:28:09 +0000 (21:28 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 3 Oct 2008 19:28:09 +0000 (21:28 +0200)
* 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.

From-SVN: r140858

gcc/ChangeLog
gcc/gimple.h
gcc/gimplify.c

index 96499931370c87ff4c2c7cf8a55defbf94ed2627..5c477137f09182222f5fdb82daba2a669ef6a267 100644 (file)
@@ -1,5 +1,9 @@
 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.
index a390590d7054fe76a7aedeeb540824e3a9f7690d..a6947c33405d7ab272b13bd6e85309d1f5dad8e3 100644 (file)
@@ -2602,7 +2602,7 @@ static inline void
 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;
 }
 
index 5123efdf321d76821286fcfedcc7e6070274c67b..2befb43ecff4963f4e8b30b934baa4a1302db7da 100644 (file)
@@ -7366,10 +7366,10 @@ gimplify_function_tree (tree fndecl)
       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.  */