===================================================================
@@ -4519,16 +4519,20 @@ mark_referenced_methods (void)
chain = CLASS_CLS_METHODS (impent->imp_context);
while (chain)
{
- cgraph_mark_needed_node (
- cgraph_get_create_node (METHOD_DEFINITION (chain)));
+ struct cgraph_node *node;
+ node = cgraph_get_node (METHOD_DEFINITION (chain));
+ gcc_checking_assert (node);
+ cgraph_mark_needed_node (node);
chain = DECL_CHAIN (chain);
}
chain = CLASS_NST_METHODS (impent->imp_context);
while (chain)
{
- cgraph_mark_needed_node (
- cgraph_get_create_node (METHOD_DEFINITION (chain)));
+ struct cgraph_node *node;
+ node = cgraph_get_node (METHOD_DEFINITION (chain));
+ gcc_checking_assert (node);
+ cgraph_mark_needed_node (node);
chain = DECL_CHAIN (chain);
}
}