summaryrefslogtreecommitdiff
path: root/gcc/lto/lto-partition.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2014-02-04 23:26:36 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2014-02-04 23:26:36 +0000
commit96a3dc392ed25a4ab3354b5925e06c65269b50d1 (patch)
treebbf5ad857d73a9614797d6f9dbe1e05f2d043715 /gcc/lto/lto-partition.c
parentbfd545187988187e969f0648d42d5568e4bbaac9 (diff)
downloadgcc-96a3dc392ed25a4ab3354b5925e06c65269b50d1.tar.gz
* ipa.c (function_and_variable_visibility): Decompose DECL_ONE_ONLY
groups when we know they are controlled by LTO. * varasm.c (default_binds_local_p_1): If object is in other partition, it will be resolved locally. * lto-partition.c (get_symbol_class): Only unforced DECL_ONE_ONLY needs duplicating, not generic COMDAT. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@207489 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lto/lto-partition.c')
-rw-r--r--gcc/lto/lto-partition.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/lto/lto-partition.c b/gcc/lto/lto-partition.c
index 6b2d488ed09..da76b10511f 100644
--- a/gcc/lto/lto-partition.c
+++ b/gcc/lto/lto-partition.c
@@ -94,10 +94,12 @@ get_symbol_class (symtab_node *node)
else if (!cgraph (node)->definition)
return SYMBOL_EXTERNAL;
- /* Comdats are duplicated to every use unless they are keyed.
- Those do not need duplication. */
- if (DECL_COMDAT (node->decl)
+ /* Linker discardable symbols are duplicated to every use unless they are
+ keyed.
+ Keyed symbols or those. */
+ if (DECL_ONE_ONLY (node->decl)
&& !node->force_output
+ && !node->forced_by_abi
&& !symtab_used_from_object_file_p (node))
return SYMBOL_DUPLICATE;