mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-01-12 02:44:34 +08:00
* pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.
From-SVN: r18735
This commit is contained in:
parent
9902495604
commit
362badb092
@ -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.
|
||||
|
21
gcc/cp/pt.c
21
gcc/cp/pt.c
@ -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);
|
||||
|
||||
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:
|
||||
|
Loading…
Reference in New Issue
Block a user