diff options
author | Roger Sayle <roger@nextmovesoftware.com> | 2021-07-13 14:01:41 +0100 |
---|---|---|
committer | Roger Sayle <roger@nextmovesoftware.com> | 2021-07-13 14:01:41 +0100 |
commit | 9aa5001ef466e6162e4acc11c6999747299474f1 (patch) | |
tree | bfa73ec30e62f4866c485b3646406182ea286ccc /gcc/gimple.h | |
parent | bd1eb556b910fd4853ea83291e495d40adbcdf81 (diff) | |
download | gcc-9aa5001ef466e6162e4acc11c6999747299474f1.zip gcc-9aa5001ef466e6162e4acc11c6999747299474f1.tar.gz gcc-9aa5001ef466e6162e4acc11c6999747299474f1.tar.bz2 |
Make gimple_could_trap_p const-safe.
Allow gimple_could_trap_p (which previously took a non-const gimple)
to be called from functions that take a const gimple (such as
gimple_has_side_effects), and update its prototypes. Pre-approved
as obvious.
2021-07-13 Roger Sayle <roger@nextmovesoftware.com>
Richard Biener <rguenther@suse.de>
gcc/ChangeLog
* gimple.c (gimple_could_trap_p_1): Make S argument a
"const gimple*". Preserve constness in call to
gimple_asm_volatile_p.
(gimple_could_trap_p): Make S argument a "const gimple*".
* gimple.h (gimple_could_trap_p_1, gimple_could_trap_p):
Update function prototypes.
Diffstat (limited to 'gcc/gimple.h')
-rw-r--r-- | gcc/gimple.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/gimple.h b/gcc/gimple.h index be1155e..acf572b 100644 --- a/gcc/gimple.h +++ b/gcc/gimple.h @@ -1601,8 +1601,8 @@ void gimple_set_lhs (gimple *, tree); gimple *gimple_copy (gimple *); void gimple_move_vops (gimple *, gimple *); bool gimple_has_side_effects (const gimple *); -bool gimple_could_trap_p_1 (gimple *, bool, bool); -bool gimple_could_trap_p (gimple *); +bool gimple_could_trap_p_1 (const gimple *, bool, bool); +bool gimple_could_trap_p (const gimple *); bool gimple_assign_rhs_could_trap_p (gimple *); extern void dump_gimple_statistics (void); unsigned get_gimple_rhs_num_ops (enum tree_code); |