aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-inline-transform.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ipa-inline-transform.cc')
-rw-r--r--gcc/ipa-inline-transform.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/ipa-inline-transform.cc b/gcc/ipa-inline-transform.cc
index 99969aa..9dc662138 100644
--- a/gcc/ipa-inline-transform.cc
+++ b/gcc/ipa-inline-transform.cc
@@ -845,7 +845,17 @@ inline_transform (struct cgraph_node *node)
if (!e->inline_failed)
has_inline = true;
next = e->next_callee;
- cgraph_edge::redirect_call_stmt_to_callee (e);
+ if (e->has_callback)
+ {
+ /* Redirect callback edges when redirecting their carrying edge. */
+ cgraph_edge *cbe;
+ cgraph_edge::redirect_call_stmt_to_callee (e);
+ for (cbe = e->first_callback_edge (); cbe;
+ cbe = cbe->next_callback_edge ())
+ cgraph_edge::redirect_call_stmt_to_callee (cbe);
+ }
+ else
+ cgraph_edge::redirect_call_stmt_to_callee (e);
}
node->remove_all_references ();