Commit 9ccf6541 by Mark Mitchell Committed by Mark Mitchell

cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.

	* cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
	* class.c (update_vtable_entry_for_fn): Correct logic for deciding
	where to emit thunks.
	(build_vtt): Adjust call to build_vtt_inits.
	(build_vtt_inits): Add parameter to indicate whether or not
	sub-VTTs for virtual bases should be included.  Adjust handling of
	construction vtables.
	(get_matching_base): New function.
	(dfs_build_vtt_inits): Rename to ...
	(dfs_build_secondary_vptr_vtt_inits): Adjust handling of
	construction vtables.
	(dfs_fixup_binfo_vtbls): Likewise.
	(build_ctor_vtbl_groups): Build construction vtables for virtual
	bases, too.
	(accumulate_vtbl_inits): Tweak logic for deciding whether or not
	to build construction vtbls.
	(dfs_accumulate_vtbl_inits): Adjust handling of
	construction vtables.

	* pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
	types correctly.

From-SVN: r34765
parent 6883b3ae
2000-06-28 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
* class.c (update_vtable_entry_for_fn): Correct logic for deciding
where to emit thunks.
(build_vtt): Adjust call to build_vtt_inits.
(build_vtt_inits): Add parameter to indicate whether or not
sub-VTTs for virtual bases should be included. Adjust handling of
construction vtables.
(get_matching_base): New function.
(dfs_build_vtt_inits): Rename to ...
(dfs_build_secondary_vptr_vtt_inits): Adjust handling of
construction vtables.
(dfs_fixup_binfo_vtbls): Likewise.
(build_ctor_vtbl_groups): Build construction vtables for virtual
bases, too.
(accumulate_vtbl_inits): Tweak logic for deciding whether or not
to build construction vtbls.
(dfs_accumulate_vtbl_inits): Adjust handling of
construction vtables.
* pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
types correctly.
2000-06-27 Mark Mitchell <mark@codesourcery.com> 2000-06-27 Mark Mitchell <mark@codesourcery.com>
* decl.c (grokfndecl): Set DECL_CONTEXT for static functions too. * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
......
...@@ -1781,8 +1781,6 @@ struct lang_type ...@@ -1781,8 +1781,6 @@ struct lang_type
my_friendly_assert (!BINFO_PRIMARY_MARKED_P (B), 20000517), \ my_friendly_assert (!BINFO_PRIMARY_MARKED_P (B), 20000517), \
my_friendly_assert (CLASSTYPE_VFIELDS (BINFO_TYPE (B)) != NULL_TREE, \ my_friendly_assert (CLASSTYPE_VFIELDS (BINFO_TYPE (B)) != NULL_TREE, \
20000517)) 20000517))
#define CLEAR_BINFO_NEW_VTABLE_MARKED(B, C) \
(BINFO_NEW_VTABLE_MARKED (B, C) = 0)
/* Nonzero means this class has done dfs_pushdecls. */ /* Nonzero means this class has done dfs_pushdecls. */
#define BINFO_PUSHDECLS_MARKED(NODE) BINFO_VTABLE_PATH_MARKED (NODE) #define BINFO_PUSHDECLS_MARKED(NODE) BINFO_VTABLE_PATH_MARKED (NODE)
......
...@@ -6361,25 +6361,34 @@ tsubst (t, args, complain, in_decl) ...@@ -6361,25 +6361,34 @@ tsubst (t, args, complain, in_decl)
{ {
case TEMPLATE_TYPE_PARM: case TEMPLATE_TYPE_PARM:
case TEMPLATE_TEMPLATE_PARM: case TEMPLATE_TEMPLATE_PARM:
r = copy_node (t); if (CP_TYPE_QUALS (t))
TEMPLATE_TYPE_PARM_INDEX (r)
= reduce_template_parm_level (TEMPLATE_TYPE_PARM_INDEX (t),
r, levels);
TYPE_STUB_DECL (r) = TYPE_NAME (r) = TEMPLATE_TYPE_DECL (r);
TYPE_MAIN_VARIANT (r) = r;
TYPE_POINTER_TO (r) = NULL_TREE;
TYPE_REFERENCE_TO (r) = NULL_TREE;
if (TREE_CODE (t) == TEMPLATE_TEMPLATE_PARM
&& TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO (t))
{ {
tree argvec = tsubst (TYPE_TI_ARGS (t), args, r = tsubst (TYPE_MAIN_VARIANT (t), args, complain, in_decl);
complain, in_decl); r = cp_build_qualified_type_real (r, CP_TYPE_QUALS (t),
if (argvec == error_mark_node) complain);
return error_mark_node; }
else
{
r = copy_node (t);
TEMPLATE_TYPE_PARM_INDEX (r)
= reduce_template_parm_level (TEMPLATE_TYPE_PARM_INDEX (t),
r, levels);
TYPE_STUB_DECL (r) = TYPE_NAME (r) = TEMPLATE_TYPE_DECL (r);
TYPE_MAIN_VARIANT (r) = r;
TYPE_POINTER_TO (r) = NULL_TREE;
TYPE_REFERENCE_TO (r) = NULL_TREE;
if (TREE_CODE (t) == TEMPLATE_TEMPLATE_PARM
&& TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO (t))
{
tree argvec = tsubst (TYPE_TI_ARGS (t), args,
complain, in_decl);
if (argvec == error_mark_node)
return error_mark_node;
TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO (r) TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO (r)
= tree_cons (TYPE_TI_TEMPLATE (t), argvec, NULL_TREE); = tree_cons (TYPE_TI_TEMPLATE (t), argvec, NULL_TREE);
}
} }
break; break;
......
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