- lto_symtab_merge_decls_2 (slot);
-
- /* Drop all but the prevailing decl from the symtab. */
- if (TREE_CODE (prevailing->decl) != FUNCTION_DECL
- && TREE_CODE (prevailing->decl) != VAR_DECL)
- prevailing->next = NULL;
-
+ lto_symtab_merge_decls_2 (slot, diagnosed_p);
+
+ /* Store resolution decision into the callgraph.
+ In LTRANS don't overwrite information we stored into callgraph at
+ WPA stage.
+
+ Do not bother to store guessed decisions. Generic code knows how
+ to handle UNKNOWN relocation well.
+
+ The problem with storing guessed decision is whether to use
+ PREVAILING_DEF, PREVAILING_DEF_IRONLY, PREVAILING_DEF_IRONLY_EXP.
+ First one would disable some whole program optimizations, while
+ ther second would imply to many whole program assumptions. */
+ if (prevailing->node && !flag_ltrans && !prevailing->guessed)
+ prevailing->node->resolution = prevailing->resolution;
+ else if (prevailing->vnode && !flag_ltrans && !prevailing->guessed)
+ prevailing->vnode->resolution = prevailing->resolution;