decl.c (duplicate_decls): Propagate DECL_DEFER_OUTPUT.
* decl.c (duplicate_decls): Propagate DECL_DEFER_OUTPUT. * decl2.c (comdat_linkage): Set DECL_DEFER_OUTPUT. * rtti.c (get_tinfo_fn_unused): Split out from get_tinfo_fn. * class.c (set_rtti_entry): Use it. From-SVN: r30523
This commit is contained in:
parent
78df89edfa
commit
794d4a61f8
@ -1,3 +1,10 @@
|
||||
1999-11-13 Jason Merrill <jason@yorick.cygnus.com>
|
||||
|
||||
* decl.c (duplicate_decls): Propagate DECL_DEFER_OUTPUT.
|
||||
* decl2.c (comdat_linkage): Set DECL_DEFER_OUTPUT.
|
||||
* rtti.c (get_tinfo_fn_unused): Split out from get_tinfo_fn.
|
||||
* class.c (set_rtti_entry): Use it.
|
||||
|
||||
1999-11-12 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
* decl.c (cplus_expand_expr_stmt): Don't call break_out_cleanups
|
||||
|
@ -652,7 +652,7 @@ set_rtti_entry (virtuals, offset, type)
|
||||
return;
|
||||
|
||||
if (flag_rtti)
|
||||
fn = get_tinfo_fn (type);
|
||||
fn = get_tinfo_fn_unused (type);
|
||||
else
|
||||
/* If someone tries to get RTTI information for a type compiled
|
||||
without RTTI, they're out of luck. By calling __pure_virtual
|
||||
|
@ -3792,6 +3792,7 @@ extern tree get_tinfo_fn_dynamic PROTO((tree));
|
||||
extern tree build_typeid PROTO((tree));
|
||||
extern tree build_x_typeid PROTO((tree));
|
||||
extern tree get_tinfo_fn PROTO((tree));
|
||||
extern tree get_tinfo_fn_unused PROTO((tree));
|
||||
extern tree get_typeid PROTO((tree));
|
||||
extern tree get_typeid_1 PROTO((tree));
|
||||
extern tree build_dynamic_cast PROTO((tree, tree));
|
||||
|
@ -3408,6 +3408,7 @@ duplicate_decls (newdecl, olddecl)
|
||||
/* Merge the storage class information. */
|
||||
DECL_WEAK (newdecl) |= DECL_WEAK (olddecl);
|
||||
DECL_ONE_ONLY (newdecl) |= DECL_ONE_ONLY (olddecl);
|
||||
DECL_DEFER_OUTPUT (newdecl) |= DECL_DEFER_OUTPUT (olddecl);
|
||||
TREE_PUBLIC (newdecl) = TREE_PUBLIC (olddecl);
|
||||
TREE_STATIC (olddecl) = TREE_STATIC (newdecl) |= TREE_STATIC (olddecl);
|
||||
if (! DECL_EXTERNAL (olddecl))
|
||||
|
@ -2355,6 +2355,9 @@ comdat_linkage (decl)
|
||||
|
||||
if (DECL_LANG_SPECIFIC (decl))
|
||||
DECL_COMDAT (decl) = 1;
|
||||
|
||||
if (TREE_CODE (decl) == FUNCTION_DECL)
|
||||
DECL_DEFER_OUTPUT (decl) = 1;
|
||||
}
|
||||
|
||||
/* For win32 we also want to put explicit instantiations in
|
||||
|
@ -361,8 +361,19 @@ get_tinfo_var (type)
|
||||
return tdecl;
|
||||
}
|
||||
|
||||
/* Returns the decl for a function which will return a type_info node for
|
||||
TYPE. This version does not mark the function used, for use in
|
||||
set_rtti_entry; for the vtable case, we'll get marked in
|
||||
finish_vtable_vardecl, when we know that we want to be emitted.
|
||||
|
||||
We do this to avoid emitting the tinfo node itself, since we don't
|
||||
currently support DECL_DEFER_OUTPUT for variables. Also, we don't
|
||||
associate constant pools with their functions properly, so we would
|
||||
emit string constants and such even though we don't emit the actual
|
||||
function. When those bugs are fixed, this function should go away. */
|
||||
|
||||
tree
|
||||
get_tinfo_fn (type)
|
||||
get_tinfo_fn_unused (type)
|
||||
tree type;
|
||||
{
|
||||
tree name;
|
||||
@ -391,13 +402,23 @@ get_tinfo_fn (type)
|
||||
|
||||
pushdecl_top_level (d);
|
||||
make_function_rtl (d);
|
||||
mark_used (d);
|
||||
mark_inline_for_output (d);
|
||||
pop_obstacks ();
|
||||
|
||||
return d;
|
||||
}
|
||||
|
||||
/* Likewise, but also mark it used. Called by various EH and RTTI code. */
|
||||
|
||||
tree
|
||||
get_tinfo_fn (type)
|
||||
tree type;
|
||||
{
|
||||
tree d = get_tinfo_fn_unused (type);
|
||||
mark_used (d);
|
||||
return d;
|
||||
}
|
||||
|
||||
tree
|
||||
get_typeid_1 (type)
|
||||
tree type;
|
||||
|
Loading…
Reference in New Issue
Block a user