decl2.c (var_finalized_p): New.
* decl2.c (var_finalized_p): New. (maybe_emit_vtables, write_out_vars, finish_file): Use it. From-SVN: r71284
This commit is contained in:
parent
f08545a8f2
commit
c4d2313d39
|
@ -1,3 +1,8 @@
|
||||||
|
2003-09-10 Jan Hubicka <jh@suse.cz>
|
||||||
|
|
||||||
|
* decl2.c (var_finalized_p): New.
|
||||||
|
(maybe_emit_vtables, write_out_vars, finish_file): Use it.
|
||||||
|
|
||||||
2003-09-10 Richard Henderson <rth@redhat.com>
|
2003-09-10 Richard Henderson <rth@redhat.com>
|
||||||
|
|
||||||
* decl2.c (cxx_callgraph_analyze_expr): New, from corpse of
|
* decl2.c (cxx_callgraph_analyze_expr): New, from corpse of
|
||||||
|
|
|
@ -1621,6 +1621,17 @@ import_export_class (tree ctype)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Return true if VAR has already been provided to the back end; in that
|
||||||
|
case VAR should not be modified further by the front end. */
|
||||||
|
static bool
|
||||||
|
var_finalized_p (tree var)
|
||||||
|
{
|
||||||
|
if (flag_unit_at_a_time)
|
||||||
|
return TREE_ASM_WRITTEN (var);
|
||||||
|
else
|
||||||
|
return cgraph_varpool_node (var)->finalized;
|
||||||
|
}
|
||||||
|
|
||||||
/* If necessary, write out the vtables for the dynamic class CTYPE.
|
/* If necessary, write out the vtables for the dynamic class CTYPE.
|
||||||
Returns true if any vtables were emitted. */
|
Returns true if any vtables were emitted. */
|
||||||
|
|
||||||
|
@ -1634,9 +1645,7 @@ maybe_emit_vtables (tree ctype)
|
||||||
/* If the vtables for this class have already been emitted there is
|
/* If the vtables for this class have already been emitted there is
|
||||||
nothing more to do. */
|
nothing more to do. */
|
||||||
primary_vtbl = CLASSTYPE_VTABLES (ctype);
|
primary_vtbl = CLASSTYPE_VTABLES (ctype);
|
||||||
if (TREE_ASM_WRITTEN (primary_vtbl)
|
if (var_finalized_p (primary_vtbl))
|
||||||
|| (flag_unit_at_a_time
|
|
||||||
&& cgraph_varpool_node (primary_vtbl)->finalized))
|
|
||||||
return false;
|
return false;
|
||||||
/* Ignore dummy vtables made by get_vtable_decl. */
|
/* Ignore dummy vtables made by get_vtable_decl. */
|
||||||
if (TREE_TYPE (primary_vtbl) == void_type_node)
|
if (TREE_TYPE (primary_vtbl) == void_type_node)
|
||||||
|
@ -2454,9 +2463,7 @@ write_out_vars (tree vars)
|
||||||
tree v;
|
tree v;
|
||||||
|
|
||||||
for (v = vars; v; v = TREE_CHAIN (v))
|
for (v = vars; v; v = TREE_CHAIN (v))
|
||||||
if (! TREE_ASM_WRITTEN (TREE_VALUE (v))
|
if (!var_finalized_p (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);
|
rest_of_decl_compilation (TREE_VALUE (v), 0, 1, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2846,9 +2853,7 @@ finish_file ()
|
||||||
for (i = 0; i < pending_statics_used; ++i)
|
for (i = 0; i < pending_statics_used; ++i)
|
||||||
{
|
{
|
||||||
tree decl = VARRAY_TREE (pending_statics, i);
|
tree decl = VARRAY_TREE (pending_statics, i);
|
||||||
if (TREE_ASM_WRITTEN (decl)
|
if (var_finalized_p (decl))
|
||||||
|| (flag_unit_at_a_time
|
|
||||||
&& cgraph_varpool_node (decl)->finalized))
|
|
||||||
continue;
|
continue;
|
||||||
import_export_decl (decl);
|
import_export_decl (decl);
|
||||||
if (DECL_NOT_REALLY_EXTERN (decl) && ! DECL_IN_AGGR_P (decl))
|
if (DECL_NOT_REALLY_EXTERN (decl) && ! DECL_IN_AGGR_P (decl))
|
||||||
|
|
Loading…
Reference in New Issue