decl2.c (maybe_emit_vtables, [...]): Avoid re-emitting variables in unit-at-a-time mode.

* decl2.c (maybe_emit_vtables, write_out_vars, finish_file):
	Avoid re-emitting variables in unit-at-a-time mode.

From-SVN: r71167
This commit is contained in:
Jan Hubicka 2003-09-07 13:15:46 +02:00 committed by Jan Hubicka
parent dba65e798f
commit c57e159892
2 changed files with 14 additions and 3 deletions

View File

@ -1,3 +1,8 @@
Sun Sep 7 13:15:14 CEST 2003 Jan Hubicka <jh@suse.cz>
* decl2.c (maybe_emit_vtables, write_out_vars, finish_file):
Avoid re-emitting variables in unit-at-a-time mode.
2003-09-06 Mark Mitchell <mark@codesourcery.com>
PR c++/11687

View File

@ -1634,7 +1634,9 @@ maybe_emit_vtables (tree ctype)
/* If the vtables for this class have already been emitted there is
nothing more to do. */
primary_vtbl = CLASSTYPE_VTABLES (ctype);
if (TREE_ASM_WRITTEN (primary_vtbl))
if (TREE_ASM_WRITTEN (primary_vtbl)
|| (flag_unit_at_a_time
&& cgraph_varpool_node (primary_vtbl)->finalized))
return false;
/* Ignore dummy vtables made by get_vtable_decl. */
if (TREE_TYPE (primary_vtbl) == void_type_node)
@ -2452,7 +2454,9 @@ write_out_vars (tree vars)
tree v;
for (v = vars; v; v = TREE_CHAIN (v))
if (! TREE_ASM_WRITTEN (TREE_VALUE (v)))
if (! TREE_ASM_WRITTEN (TREE_VALUE (v))
&& (!flag_unit_at_a_time
|| !cgraph_varpool_node (TREE_VALUE (v))->finalized))
rest_of_decl_compilation (TREE_VALUE (v), 0, 1, 1);
}
@ -2875,7 +2879,9 @@ finish_file ()
for (i = 0; i < pending_statics_used; ++i)
{
tree decl = VARRAY_TREE (pending_statics, i);
if (TREE_ASM_WRITTEN (decl))
if (TREE_ASM_WRITTEN (decl)
|| (flag_unit_at_a_time
&& cgraph_varpool_node (decl)->finalized))
continue;
import_export_decl (decl);
if (DECL_NOT_REALLY_EXTERN (decl) && ! DECL_IN_AGGR_P (decl))