gimple.c (gimple_call_set_fndecl): Remove.
authorAndrew MacLeod <amacleod@redhat.com>
Fri, 26 Jun 2015 23:30:37 +0000 (23:30 +0000)
committerAndrew Macleod <amacleod@gcc.gnu.org>
Fri, 26 Jun 2015 23:30:37 +0000 (23:30 +0000)
2015-06-26  Andrew MacLeod  <amacleod@redhat.com>

* gimple.c (gimple_call_set_fndecl): Remove.
* gimple.h (gimple_call_set_fndecl): Relocate to gimple.h and call
build1_loc directly instead of build_fold_addr_expr_loc.

From-SVN: r225090

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

index 6f54c22927a9cd585ec66234c3910839ca087a90..31ee3cb3ef51255593bc4f256b1166b7fde06461 100644 (file)
@@ -1,3 +1,9 @@
+2015-06-26  Andrew MacLeod  <amacleod@redhat.com>
+
+       * gimple.c (gimple_call_set_fndecl): Remove.
+       * gimple.h (gimple_call_set_fndecl): Relocate to gimple.h and call
+       build1_loc directly instead of build_fold_addr_expr_loc.
+
 2015-06-26  Richard Sandiford  <richard.sandiford@arm.com>
 
        * hash-map.h (hash_map::traverse): Use the definition of the
index bd788be96494992cd4416fdefb44ac04d76ba7f3..b32c6b5ada48b122ed35e9dd8fce6045c601c737 100644 (file)
@@ -199,16 +199,6 @@ gimple_build_return (tree retval)
   return s;
 }
 
-/* Set FNDECL to be the function called by call statement GS.  */
-
-void
-gimple_call_set_fndecl (gimple gs, tree decl)
-{
-  GIMPLE_CHECK (gs, GIMPLE_CALL);
-  gcc_gimple_checking_assert (!gimple_call_internal_p (gs));
-  gimple_set_op (gs, 1, build_fold_addr_expr_loc (gimple_location (gs), decl));
-}
-
 /* Reset alias information on call S.  */
 
 void
index 96a43d843f60e6b2ffed56f2f67e69da48f54bb7..253f4385dec5b0bd6a38995c94e0952f194df6ba 100644 (file)
@@ -1296,7 +1296,6 @@ extern gimple currently_expanding_gimple_stmt;
 #define gimple_alloc(c, n) gimple_alloc_stat (c, n MEM_STAT_INFO)
 gimple gimple_alloc_stat (enum gimple_code, unsigned MEM_STAT_DECL);
 greturn *gimple_build_return (tree);
-void gimple_call_set_fndecl (gimple, tree);
 void gimple_call_reset_alias_info (gcall *);
 gcall *gimple_build_call_vec (tree, vec<tree> );
 gcall *gimple_build_call (tree, unsigned, ...);
@@ -2760,6 +2759,19 @@ gimple_call_set_fn (gcall *gs, tree fn)
 }
 
 
+/* Set FNDECL to be the function called by call statement GS.  */
+
+static inline void
+gimple_call_set_fndecl (gimple gs, tree decl)
+{
+  GIMPLE_CHECK (gs, GIMPLE_CALL);
+  gcc_gimple_checking_assert (!gimple_call_internal_p (gs));
+  gimple_set_op (gs, 1, build1_loc (gimple_location (gs), ADDR_EXPR,
+                                    build_pointer_type (TREE_TYPE (decl)),
+                                    decl));
+}
+
+
 /* Set internal function FN to be the function called by call statement CALL_STMT.  */
 
 static inline void