- /* If we have aliases, redirect them to the prevailing node. */
- if (!node->same_body_alias && node->same_body)
- {
- struct cgraph_node *alias, *last;
- /* We prevail aliases/tunks by a thunk. This is doable but
- would need thunk combination. Hopefully no ABI changes will
- every be crazy enough. */
- gcc_assert (!no_aliases_please);
-
- for (alias = node->same_body; alias; alias = alias->next)
- {
- last = alias;
- gcc_assert (alias->same_body_alias);
- alias->same_body = prevailing_node;
- alias->thunk.alias = prevailing_node->decl;
- }
- last->next = prevailing_node->same_body;
- /* Node with aliases is prevailed by alias.
- We could handle this, but combining thunks together will be tricky.
- Hopefully this does not happen. */
- if (prevailing_node->same_body)
- prevailing_node->same_body->previous = last;
- prevailing_node->same_body = node->same_body;
- node->same_body = NULL;
- }
-