Commit 69a59a49 by Mark Mitchell

class.c (add_vcall_offset_vtbl_entries_1): Only add one entry for a destructor.

	* class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
	for a destructor.

From-SVN: r39847
parent 8fa33dfa
2001-02-18 Mark Mitchell <mark@codesourcery.com>
* class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
for a destructor.
2001-02-18 Jason Merrill <jason@redhat.com> 2001-02-18 Jason Merrill <jason@redhat.com>
Do put the VTT parameter in DECL_ARGUMENTS. Do put the VTT parameter in DECL_ARGUMENTS.
...@@ -1060,7 +1065,8 @@ Sun Feb 4 15:52:44 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> ...@@ -1060,7 +1065,8 @@ Sun Feb 4 15:52:44 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* class.c (check_field_decls): Don't special case anonymous * class.c (check_field_decls): Don't special case anonymous
fields in error messages. fields in error messages.
(note_name_declared_in_class): Use %D on diagnostic. (note_name_declared_inpwdpwd
_class): Use %D on diagnostic.
* tree.c (pod_type_p): Use strip_array_types. * tree.c (pod_type_p): Use strip_array_types.
(cp_valid_lang_attribute): Likewise. (cp_valid_lang_attribute): Likewise.
......
...@@ -7689,7 +7689,11 @@ add_vcall_offset_vtbl_entries_1 (binfo, vid) ...@@ -7689,7 +7689,11 @@ add_vcall_offset_vtbl_entries_1 (binfo, vid)
tree derived_entry; tree derived_entry;
derived_entry = VARRAY_TREE (vid->fns, i); derived_entry = VARRAY_TREE (vid->fns, i);
if (same_signature_p (BV_FN (derived_entry), fn)) if (same_signature_p (BV_FN (derived_entry), fn)
/* We only use one vcall offset for virtual destructors,
even though there are two virtual table entries. */
|| (DECL_DESTRUCTOR_P (BV_FN (derived_entry))
&& DECL_DESTRUCTOR_P (fn)))
{ {
BV_VCALL_INDEX (derived_virtuals) BV_VCALL_INDEX (derived_virtuals)
= BV_VCALL_INDEX (derived_entry); = BV_VCALL_INDEX (derived_entry);
......
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