]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/gimple.h
Make gimple_could_trap_p const-safe.
authorRoger Sayle <roger@nextmovesoftware.com>
Tue, 13 Jul 2021 13:01:41 +0000 (14:01 +0100)
committerRoger Sayle <roger@nextmovesoftware.com>
Tue, 13 Jul 2021 13:01:41 +0000 (14:01 +0100)
commit9aa5001ef466e6162e4acc11c6999747299474f1
treebfa73ec30e62f4866c485b3646406182ea286ccc
parentbd1eb556b910fd4853ea83291e495d40adbcdf81
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.
gcc/gimple.c
gcc/gimple.h