diff options
author | Richard Guenther <rguenther@suse.de> | 2011-04-08 12:19:45 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2011-04-08 12:19:45 +0000 |
commit | 9bfc434b7aa052e8d9175d3eca8fc355618e6fab (patch) | |
tree | 77df3037e3807fabf488254798b809e577345502 /gcc/gimple.h | |
parent | 7c1f0b40206bed9fc4b62a04ca9f49c8b9cea4dc (diff) | |
download | gcc-9bfc434b7aa052e8d9175d3eca8fc355618e6fab.zip gcc-9bfc434b7aa052e8d9175d3eca8fc355618e6fab.tar.gz gcc-9bfc434b7aa052e8d9175d3eca8fc355618e6fab.tar.bz2 |
gimple.h (gimple_call_fntype): New function.
2011-04-08 Richard Guenther <rguenther@suse.de>
* gimple.h (gimple_call_fntype): New function.
(gimple_call_return_type): Use it.
* expr.c (expand_expr_real_1): Use gimple_call_fntype.
* gimple-low.c (gimple_check_call_args): Likewise.
* gimple.c (gimple_call_flags): Likewise.
(gimple_call_arg_flags): Likewise.
(gimple_call_return_flags): Likewise.
* tree-cfg.c (verify_gimple_call): Likewise.
(do_warn_unused_result): Likewise.
* tree-ssa-ccp.c (ccp_fold_stmt): Likewise.
* value-prof.c (gimple_ic_transform): Fix fndecl check.
From-SVN: r172178
Diffstat (limited to 'gcc/gimple.h')
-rw-r--r-- | gcc/gimple.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/gcc/gimple.h b/gcc/gimple.h index cc35b60..be45e4b 100644 --- a/gcc/gimple.h +++ b/gcc/gimple.h @@ -2011,6 +2011,13 @@ gimple_call_fn (const_gimple gs) return gimple_op (gs, 1); } +/* Return the function type of the function called by GS. */ + +static inline tree +gimple_call_fntype (const_gimple gs) +{ + return TREE_TYPE (TREE_TYPE (gimple_call_fn (gs))); +} /* Return a pointer to the tree node representing the function called by call statement GS. */ @@ -2073,13 +2080,9 @@ gimple_call_fndecl (const_gimple gs) static inline tree gimple_call_return_type (const_gimple gs) { - tree fn = gimple_call_fn (gs); - tree type = TREE_TYPE (fn); - - /* See through the pointer. */ - type = TREE_TYPE (type); + tree type = gimple_call_fntype (gs); - /* The type returned by a FUNCTION_DECL is the type of its + /* The type returned by a function is the type of its function type. */ return TREE_TYPE (type); } |