summaryrefslogtreecommitdiff
path: root/gcc/ipa-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ipa-utils.c')
-rw-r--r--gcc/ipa-utils.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/ipa-utils.c b/gcc/ipa-utils.c
index 91fe839577d..ae207369d18 100644
--- a/gcc/ipa-utils.c
+++ b/gcc/ipa-utils.c
@@ -101,10 +101,10 @@ searchc (struct searchc_env* env, struct cgraph_node *v,
for (edge = v->callees; edge; edge = edge->next_callee)
{
struct ipa_dfs_info * w_info;
- struct cgraph_node *w = edge->callee;
- enum availability avail = cgraph_function_body_availability (w);
+ enum availability avail;
+ struct cgraph_node *w = cgraph_function_or_thunk_node (edge->callee, &avail);
- if (ignore_edge && ignore_edge (edge))
+ if (!w || (ignore_edge && ignore_edge (edge)))
continue;
if (w->aux