Message ID | 1398099480-49147-20-git-send-email-dmalcolm@redhat.com |
---|---|
State | New |
Headers | show |
On Mon, 2014-04-21 at 12:56 -0400, David Malcolm wrote: > gcc/ > * gimple.h (gimple_builtin_call_types_compatible_p): Accept a > const_gimple, rather than a gimple. > (gimple_call_builtin_p): Likewise, for the three variants. > > * gimple.c (gimple_builtin_call_types_compatible_p): Likewise. > (gimple_call_builtin_p): Likewise, for the three variants. > --- > gcc/gimple.c | 8 ++++---- > gcc/gimple.h | 8 ++++---- > 2 files changed, 8 insertions(+), 8 deletions(-) > > diff --git a/gcc/gimple.c b/gcc/gimple.c > index 13c5a08..943fa7c 100644 > --- a/gcc/gimple.c > +++ b/gcc/gimple.c > @@ -2383,7 +2383,7 @@ validate_type (tree type1, tree type2) > a decl of a builtin function. */ > > bool > -gimple_builtin_call_types_compatible_p (gimple stmt, tree fndecl) > +gimple_builtin_call_types_compatible_p (const_gimple stmt, tree fndecl) > { > gcc_checking_assert (DECL_BUILT_IN_CLASS (fndecl) != NOT_BUILT_IN); > > @@ -2412,7 +2412,7 @@ gimple_builtin_call_types_compatible_p (gimple stmt, tree fndecl) > /* Return true when STMT is builtins call. */ > > bool > -gimple_call_builtin_p (gimple stmt) > +gimple_call_builtin_p (const_gimple stmt) > { > tree fndecl; > if (is_gimple_call (stmt) > @@ -2425,7 +2425,7 @@ gimple_call_builtin_p (gimple stmt) > /* Return true when STMT is builtins call to CLASS. */ > > bool > -gimple_call_builtin_p (gimple stmt, enum built_in_class klass) > +gimple_call_builtin_p (const_gimple stmt, enum built_in_class klass) > { > tree fndecl; > if (is_gimple_call (stmt) > @@ -2438,7 +2438,7 @@ gimple_call_builtin_p (gimple stmt, enum built_in_class klass) > /* Return true when STMT is builtins call to CODE of CLASS. */ > > bool > -gimple_call_builtin_p (gimple stmt, enum built_in_function code) > +gimple_call_builtin_p (const_gimple stmt, enum built_in_function code) > { > tree fndecl; > if (is_gimple_call (stmt) > diff --git a/gcc/gimple.h b/gcc/gimple.h > index a8a8d72..62f9756 100644 > --- a/gcc/gimple.h > +++ b/gcc/gimple.h > @@ -1458,10 +1458,10 @@ extern tree gimple_unsigned_type (tree); > extern tree gimple_signed_type (tree); > extern alias_set_type gimple_get_alias_set (tree); > extern bool gimple_ior_addresses_taken (bitmap, gimple); > -extern bool gimple_builtin_call_types_compatible_p (gimple, tree); > -extern bool gimple_call_builtin_p (gimple); > -extern bool gimple_call_builtin_p (gimple, enum built_in_class); > -extern bool gimple_call_builtin_p (gimple, enum built_in_function); > +extern bool gimple_builtin_call_types_compatible_p (const_gimple, tree); > +extern bool gimple_call_builtin_p (const_gimple); > +extern bool gimple_call_builtin_p (const_gimple, enum built_in_class); > +extern bool gimple_call_builtin_p (const_gimple, enum built_in_function); > extern bool gimple_asm_clobbers_memory_p (const_gimple); > extern void dump_decl_set (FILE *, bitmap); > extern bool nonfreeing_call_p (gimple); Succesfully bootstrapped®tested on its own on x86_64-unknown-linux-gnu (Fedora 20). Committed to trunk as r210185 (this is just fixing const-correctness, and so it falls under Jeff's preapproval for such fixes here: http://gcc.gnu.org/ml/gcc-patches/2014-04/msg01240.html )
On 04/21/14 10:56, David Malcolm wrote: > gcc/ > * gimple.h (gimple_builtin_call_types_compatible_p): Accept a > const_gimple, rather than a gimple. > (gimple_call_builtin_p): Likewise, for the three variants. > > * gimple.c (gimple_builtin_call_types_compatible_p): Likewise. > (gimple_call_builtin_p): Likewise, for the three variants. This is fine per my prior pre-approval of const-correctness changes of this nature. Thanks, Jeff
diff --git a/gcc/gimple.c b/gcc/gimple.c index 13c5a08..943fa7c 100644 --- a/gcc/gimple.c +++ b/gcc/gimple.c @@ -2383,7 +2383,7 @@ validate_type (tree type1, tree type2) a decl of a builtin function. */ bool -gimple_builtin_call_types_compatible_p (gimple stmt, tree fndecl) +gimple_builtin_call_types_compatible_p (const_gimple stmt, tree fndecl) { gcc_checking_assert (DECL_BUILT_IN_CLASS (fndecl) != NOT_BUILT_IN); @@ -2412,7 +2412,7 @@ gimple_builtin_call_types_compatible_p (gimple stmt, tree fndecl) /* Return true when STMT is builtins call. */ bool -gimple_call_builtin_p (gimple stmt) +gimple_call_builtin_p (const_gimple stmt) { tree fndecl; if (is_gimple_call (stmt) @@ -2425,7 +2425,7 @@ gimple_call_builtin_p (gimple stmt) /* Return true when STMT is builtins call to CLASS. */ bool -gimple_call_builtin_p (gimple stmt, enum built_in_class klass) +gimple_call_builtin_p (const_gimple stmt, enum built_in_class klass) { tree fndecl; if (is_gimple_call (stmt) @@ -2438,7 +2438,7 @@ gimple_call_builtin_p (gimple stmt, enum built_in_class klass) /* Return true when STMT is builtins call to CODE of CLASS. */ bool -gimple_call_builtin_p (gimple stmt, enum built_in_function code) +gimple_call_builtin_p (const_gimple stmt, enum built_in_function code) { tree fndecl; if (is_gimple_call (stmt) diff --git a/gcc/gimple.h b/gcc/gimple.h index a8a8d72..62f9756 100644 --- a/gcc/gimple.h +++ b/gcc/gimple.h @@ -1458,10 +1458,10 @@ extern tree gimple_unsigned_type (tree); extern tree gimple_signed_type (tree); extern alias_set_type gimple_get_alias_set (tree); extern bool gimple_ior_addresses_taken (bitmap, gimple); -extern bool gimple_builtin_call_types_compatible_p (gimple, tree); -extern bool gimple_call_builtin_p (gimple); -extern bool gimple_call_builtin_p (gimple, enum built_in_class); -extern bool gimple_call_builtin_p (gimple, enum built_in_function); +extern bool gimple_builtin_call_types_compatible_p (const_gimple, tree); +extern bool gimple_call_builtin_p (const_gimple); +extern bool gimple_call_builtin_p (const_gimple, enum built_in_class); +extern bool gimple_call_builtin_p (const_gimple, enum built_in_function); extern bool gimple_asm_clobbers_memory_p (const_gimple); extern void dump_decl_set (FILE *, bitmap); extern bool nonfreeing_call_p (gimple);