Commit 1a408d07 by Jason Merrill Committed by Jason Merrill

decl2.c (import_export_vtable): Always make artificials comdat.

	* decl2.c (import_export_vtable): Always make artificials comdat.
	(import_export_decl): Likewise.
	* pt.c (mark_decl_instantiated): Likewise.

From-SVN: r22230
parent 71827aaa
1998-09-03 Jason Merrill <jason@yorick.cygnus.com>
* decl2.c (import_export_vtable): Always make artificials comdat.
(import_export_decl): Likewise.
* pt.c (mark_decl_instantiated): Likewise.
1998-09-03 Mark Mitchell <mark@markmitchell.com> 1998-09-03 Mark Mitchell <mark@markmitchell.com>
* cp-tree.h (finish_globally_qualified_member_call_expr): * cp-tree.h (finish_globally_qualified_member_call_expr):
......
*** Changes since EGCS 1.0: *** Changes in EGCS 1.1:
* Namespaces are fully supported. The library has not yet been converted * Namespaces are fully supported. The library has not yet been converted
to use namespace std, however, and the old std-faking code is still on by to use namespace std, however, and the old std-faking code is still on by
......
...@@ -2555,10 +2555,9 @@ import_export_vtable (decl, type, final) ...@@ -2555,10 +2555,9 @@ import_export_vtable (decl, type, final)
DECL_EXTERNAL (decl) = ! CLASSTYPE_VTABLE_NEEDS_WRITING (type); DECL_EXTERNAL (decl) = ! CLASSTYPE_VTABLE_NEEDS_WRITING (type);
DECL_INTERFACE_KNOWN (decl) = 1; DECL_INTERFACE_KNOWN (decl) = 1;
/* For WIN32 we also want to put explicit instantiations in /* Always make vtables weak. */
linkonce sections. */ if (flag_weak)
if (CLASSTYPE_EXPLICIT_INSTANTIATION (type)) comdat_linkage (decl);
maybe_make_one_only (decl);
} }
else else
{ {
...@@ -2873,6 +2872,10 @@ import_export_decl (decl) ...@@ -2873,6 +2872,10 @@ import_export_decl (decl)
DECL_NOT_REALLY_EXTERN (decl) DECL_NOT_REALLY_EXTERN (decl)
= ! (CLASSTYPE_INTERFACE_ONLY (ctype) = ! (CLASSTYPE_INTERFACE_ONLY (ctype)
|| (DECL_THIS_INLINE (decl) && ! flag_implement_inlines)); || (DECL_THIS_INLINE (decl) && ! flag_implement_inlines));
/* Always make artificials weak. */
if (DECL_ARTIFICIAL (decl) && flag_weak)
comdat_linkage (decl);
} }
else else
comdat_linkage (decl); comdat_linkage (decl);
...@@ -2894,10 +2897,9 @@ import_export_decl (decl) ...@@ -2894,10 +2897,9 @@ import_export_decl (decl)
= ! (CLASSTYPE_INTERFACE_ONLY (ctype) = ! (CLASSTYPE_INTERFACE_ONLY (ctype)
|| (DECL_THIS_INLINE (decl) && ! flag_implement_inlines)); || (DECL_THIS_INLINE (decl) && ! flag_implement_inlines));
/* For WIN32 we also want to put explicit instantiations in /* Always make artificials weak. */
linkonce sections. */ if (flag_weak)
if (CLASSTYPE_EXPLICIT_INSTANTIATION (ctype)) comdat_linkage (decl);
maybe_make_one_only (decl);
} }
else if (TYPE_BUILT_IN (ctype) && ctype == TYPE_MAIN_VARIANT (ctype)) else if (TYPE_BUILT_IN (ctype) && ctype == TYPE_MAIN_VARIANT (ctype))
DECL_NOT_REALLY_EXTERN (decl) = 0; DECL_NOT_REALLY_EXTERN (decl) = 0;
......
...@@ -7202,9 +7202,12 @@ mark_decl_instantiated (result, extern_p) ...@@ -7202,9 +7202,12 @@ mark_decl_instantiated (result, extern_p)
DECL_INTERFACE_KNOWN (result) = 1; DECL_INTERFACE_KNOWN (result) = 1;
DECL_NOT_REALLY_EXTERN (result) = 1; DECL_NOT_REALLY_EXTERN (result) = 1;
/* Always make artificials weak. */
if (DECL_ARTIFICIAL (result) && flag_weak)
comdat_linkage (result);
/* For WIN32 we also want to put explicit instantiations in /* For WIN32 we also want to put explicit instantiations in
linkonce sections. */ linkonce sections. */
if (TREE_PUBLIC (result)) else if (TREE_PUBLIC (result))
maybe_make_one_only (result); maybe_make_one_only (result);
} }
else if (TREE_CODE (result) == FUNCTION_DECL) else if (TREE_CODE (result) == FUNCTION_DECL)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment