aboutsummaryrefslogtreecommitdiff
path: root/gcc/analyzer/supergraph.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/analyzer/supergraph.cc')
-rw-r--r--gcc/analyzer/supergraph.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/analyzer/supergraph.cc b/gcc/analyzer/supergraph.cc
index 01e30f7..a4a495a 100644
--- a/gcc/analyzer/supergraph.cc
+++ b/gcc/analyzer/supergraph.cc
@@ -62,7 +62,7 @@ namespace ana {
/* Get the function of the ultimate alias target being called at EDGE,
if any. */
-static function *
+function *
get_ultimate_function_for_cgraph_edge (cgraph_edge *edge)
{
cgraph_node *ultimate_node = edge->callee->ultimate_alias_target ();
@@ -74,12 +74,13 @@ get_ultimate_function_for_cgraph_edge (cgraph_edge *edge)
/* Get the cgraph_edge, but only if there's an underlying function body. */
cgraph_edge *
-supergraph_call_edge (function *fun, gimple *stmt)
+supergraph_call_edge (function *fun, const gimple *stmt)
{
- gcall *call = dyn_cast<gcall *> (stmt);
+ const gcall *call = dyn_cast<const gcall *> (stmt);
if (!call)
return NULL;
- cgraph_edge *edge = cgraph_node::get (fun->decl)->get_edge (stmt);
+ cgraph_edge *edge
+ = cgraph_node::get (fun->decl)->get_edge (const_cast <gimple *> (stmt));
if (!edge)
return NULL;
if (!edge->callee)