* pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.

From-SVN: r18735
This commit is contained in:
Kriang Lerdsuwanakij 1998-03-20 18:11:26 +00:00 committed by Jason Merrill
parent 9902495604
commit 362badb092
2 changed files with 13 additions and 14 deletions

View File

@ -1,3 +1,7 @@
Fri Mar 20 18:07:39 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
* pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.
Fri Mar 20 10:42:07 1998 Jason Merrill <jason@yorick.cygnus.com>
* decl.c (make_implicit_typename): Rewrite removed code.

View File

@ -3689,20 +3689,7 @@ tsubst (t, args, in_decl)
{
case TEMPLATE_TYPE_PARM:
case TEMPLATE_TEMPLATE_PARM:
if (TREE_CODE (t) == TEMPLATE_TEMPLATE_PARM
&& CLASSTYPE_TEMPLATE_INFO (t))
{
tree argvec = tsubst (CLASSTYPE_TI_ARGS (t),
args, in_decl);
r = lookup_template_class (TYPE_NAME (t), argvec, in_decl,
DECL_CONTEXT (TYPE_NAME (t)));
r = cp_build_type_variant (r, TYPE_READONLY (t),
TYPE_VOLATILE (t));
}
else
r = copy_node (t);
r = copy_node (t);
TEMPLATE_TYPE_PARM_INDEX (r)
= reduce_template_parm_level (TEMPLATE_TYPE_PARM_INDEX (t),
r, levels);
@ -3710,6 +3697,14 @@ tsubst (t, args, in_decl)
TYPE_MAIN_VARIANT (r) = r;
TYPE_POINTER_TO (r) = NULL_TREE;
TYPE_REFERENCE_TO (r) = NULL_TREE;
if (TREE_CODE (t) == TEMPLATE_TEMPLATE_PARM
&& CLASSTYPE_TEMPLATE_INFO (t))
{
tree argvec = tsubst (CLASSTYPE_TI_ARGS (t), args, in_decl);
CLASSTYPE_TEMPLATE_INFO (r)
= perm_tree_cons (TYPE_NAME (t), argvec, NULL_TREE);
}
break;
case TEMPLATE_PARM_INDEX: