* lto.c (partition_cgraph_node_p, partition_varpool_node_p): Handle
COMDATs required by the linker.
From-SVN: r165058
+2010-10-06 Jan Hubicka <jh@suse.cz>
+
+ * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Handle
+ COMDATs required by the linker.
+
2010-10-05 Ian Lance Taylor <iant@google.com>
* lto.c (lto_section_with_id): Make s a const pointer.
return false;
/* Extern inlines and comdat are always only in partitions they are needed. */
if (DECL_EXTERNAL (node->decl)
- || DECL_COMDAT (node->decl))
+ || (DECL_COMDAT (node->decl)
+ && !cgraph_used_from_object_file_p (node)))
return false;
return true;
}
return false;
/* Constant pool and comdat are always only in partitions they are needed. */
if (DECL_IN_CONSTANT_POOL (vnode->decl)
- || DECL_COMDAT (vnode->decl))
+ || (DECL_COMDAT (vnode->decl)
+ && !varpool_used_from_object_file_p (vnode)))
return false;
return true;
}