Make cgraph_node::get_fun const
gcc/ChangeLog: * cgraph.c (cgraph_node::get_fun): Make const. * cgraph.h (cgraph_node::get_fun): Likewise. From-SVN: r276190
This commit is contained in:
parent
37ed4c3269
commit
975d043ff6
|
@ -1,3 +1,8 @@
|
||||||
|
2019-09-27 David Malcolm <dmalcolm@redhat.com>
|
||||||
|
|
||||||
|
* cgraph.c (cgraph_node::get_fun): Make const.
|
||||||
|
* cgraph.h (cgraph_node::get_fun): Likewise.
|
||||||
|
|
||||||
2019-09-27 Jakub Jelinek <jakub@redhat.com>
|
2019-09-27 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
PR target/91919
|
PR target/91919
|
||||||
|
|
|
@ -3602,9 +3602,9 @@ cgraph_node::get_body (void)
|
||||||
/* Return the DECL_STRUCT_FUNCTION of the function. */
|
/* Return the DECL_STRUCT_FUNCTION of the function. */
|
||||||
|
|
||||||
struct function *
|
struct function *
|
||||||
cgraph_node::get_fun (void)
|
cgraph_node::get_fun () const
|
||||||
{
|
{
|
||||||
cgraph_node *node = this;
|
const cgraph_node *node = this;
|
||||||
struct function *fun = DECL_STRUCT_FUNCTION (node->decl);
|
struct function *fun = DECL_STRUCT_FUNCTION (node->decl);
|
||||||
|
|
||||||
while (!fun && node->clone_of)
|
while (!fun && node->clone_of)
|
||||||
|
|
|
@ -1142,7 +1142,7 @@ struct GTY((tag ("SYMTAB_FUNCTION"))) cgraph_node : public symtab_node
|
||||||
void release_body (bool keep_arguments = false);
|
void release_body (bool keep_arguments = false);
|
||||||
|
|
||||||
/* Return the DECL_STRUCT_FUNCTION of the function. */
|
/* Return the DECL_STRUCT_FUNCTION of the function. */
|
||||||
struct function *get_fun (void);
|
struct function *get_fun () const;
|
||||||
|
|
||||||
/* cgraph_node is no longer nested function; update cgraph accordingly. */
|
/* cgraph_node is no longer nested function; update cgraph accordingly. */
|
||||||
void unnest (void);
|
void unnest (void);
|
||||||
|
|
Loading…
Reference in New Issue