Commit 9d4c0187 by Mark Mitchell Committed by Mark Mitchell

class.c (build_vbase_path): Simplify.

	* class.c (build_vbase_path): Simplify.
	(dfs_propagate_binfo_offsets): New function.
	(propagate_binfo_offsets): Use it.
	(remove_base_field): Simplify.
	(dfs_set_offset_for_vbases): Remove.
	(dfs_set_offset_for_shared_vbases): New function.
	(dfs_set_offset_for_unshared_vbases): Likewise.
	(layout_virtual_bases): Use them.
	(layout_basetypes): Don't call propagate_binfo_offsets.
	* search.c (dfs_get_vbase_types): Clone completely fresh binfos
	for the vbases.

From-SVN: r31316
parent d77249e7
2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
* class.c (build_vbase_path): Simplify.
(dfs_propagate_binfo_offsets): New function.
(propagate_binfo_offsets): Use it.
(remove_base_field): Simplify.
(dfs_set_offset_for_vbases): Remove.
(dfs_set_offset_for_shared_vbases): New function.
(dfs_set_offset_for_unshared_vbases): Likewise.
(layout_virtual_bases): Use them.
(layout_basetypes): Don't call propagate_binfo_offsets.
* search.c (dfs_get_vbase_types): Clone completely fresh binfos
for the vbases.
* class.c (build_base_field): New function, split out from ...
(build_base_fields): ... here. Use it. Allocate primary bases
first, under the new ABI.
......
......@@ -3046,7 +3046,8 @@ dfs_get_vbase_types (binfo, data)
if (TREE_VIA_VIRTUAL (binfo) && ! BINFO_VBASE_MARKED (binfo))
{
tree new_vbase = make_binfo (integer_zero_node, binfo,
tree new_vbase = make_binfo (integer_zero_node,
BINFO_TYPE (binfo),
BINFO_VTABLE (binfo),
BINFO_VIRTUALS (binfo));
unshare_base_binfos (new_vbase);
......
// Build don't link:
// Copyright (C) 1999 Free Software Foundation, Inc.
// Copyright (C) 1999, 2000 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 29 Aug 1999 <nathan@acm.org>
// We should spot all ambiguities
......@@ -14,7 +14,7 @@ struct D3 : B, C { int m; };
void fn(D0 *d0, D1 *d1, D2 *d2, D3 *d3)
{
A *a0 = d0; // ERROR - A is an ambiguous base XFAIL
A *a0 = d0; // ERROR - A is an ambiguous base
A *a1 = d1; // ERROR - A is an ambiguous base
A *a2 = d2; // ERROR - A is an ambiguous base
A *a3 = d3; // ERROR - A is an ambiguous base
......
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