Commit 1eb4bea9 by Mark Mitchell Committed by Mark Mitchell

class.c (finish_struct_1): Replace redundant code with assertions.

	* class.c (finish_struct_1): Replace redundant code with
	assertions.

From-SVN: r31454
parent 39ac3e4f
2000-01-16 Mark Mitchell <mark@codesourcery.com> 2000-01-16 Mark Mitchell <mark@codesourcery.com>
* class.c (finish_struct_1): Replace redundant code with
assertions.
* cp-tree.h (flag_new_abi): Move. * cp-tree.h (flag_new_abi): Move.
(flag_use_cxa_atexit): Likewise. (flag_use_cxa_atexit): Likewise.
(flag_honor_std): Likewise. (flag_honor_std): Likewise.
......
...@@ -4906,18 +4906,18 @@ finish_struct_1 (t) ...@@ -4906,18 +4906,18 @@ finish_struct_1 (t)
if (TYPE_CONTAINS_VPTR_P (t)) if (TYPE_CONTAINS_VPTR_P (t))
{ {
if (TYPE_BINFO_VTABLE (t))
my_friendly_assert (DECL_VIRTUAL_P (TYPE_BINFO_VTABLE (t)),
20000116);
if (!CLASSTYPE_HAS_PRIMARY_BASE_P (t))
my_friendly_assert (TYPE_BINFO_VIRTUALS (t) == NULL_TREE,
20000116);
CLASSTYPE_VSIZE (t) = has_virtual; CLASSTYPE_VSIZE (t) = has_virtual;
if (CLASSTYPE_HAS_PRIMARY_BASE_P (t)) /* Entries for virtual functions defined in the primary base are
{ followed by entries for new functions unique to this class. */
if (pending_virtuals) TYPE_BINFO_VIRTUALS (t)
TYPE_BINFO_VIRTUALS (t) = chainon (TYPE_BINFO_VIRTUALS (t), = chainon (TYPE_BINFO_VIRTUALS (t), pending_virtuals);
pending_virtuals);
}
else if (has_virtual)
{
TYPE_BINFO_VIRTUALS (t) = pending_virtuals;
DECL_VIRTUAL_P (TYPE_BINFO_VTABLE (t)) = 1;
}
} }
/* Now lay out the virtual function table. */ /* Now lay out the virtual function table. */
......
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