FreeBSD/contrib/gcc/cp/tree.c
/* Given a TEMPLATE_TEMPLATE_PARM node T, create a new
   BOUND_TEMPLATE_TEMPLATE_PARM bound with NEWARGS as its template
   arguments.  */
Given a TEMPLATE_TEMPLATE_PARM node T, create a new
BOUND_TEMPLATE_TEMPLATE_PARM bound with NEWARGS as its template
arguments.
Given a TEMPLATE_TEMPLATE_PARM node T create a new BOUND_TEMPLATE_TEMPLATE_PARM bound with NEWARGS as its template arguments .
tree
bind_template_template_parm (tree t, tree newargs)
{
  tree decl = TYPE_NAME (t);
  tree t2;
  t2 = make_aggr_type (BOUND_TEMPLATE_TEMPLATE_PARM);
  decl = build_decl (TYPE_DECL, DECL_NAME (decl), NULL_TREE);
  TEMPLATE_TYPE_PARM_INDEX (t2) = copy_node (TEMPLATE_TYPE_PARM_INDEX (t));
  TEMPLATE_PARM_DECL (TEMPLATE_TYPE_PARM_INDEX (t2)) = decl;
  TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO (t2)
    = tree_cons (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL (t),
		 newargs, NULL_TREE);
  TREE_TYPE (decl) = t2;
  TYPE_NAME (t2) = decl;
  TYPE_STUB_DECL (t2) = decl;
  TYPE_SIZE (t2) = 0;
  return t2;
}
tree bind_template_template_parm ( tree t , tree newargs ) { tree decl = TYPE_NAME ( t ) ; tree t2 ; t2 = make_aggr_type ( BOUND_TEMPLATE_TEMPLATE_PARM ) ; decl = build_decl ( TYPE_DECL , DECL_NAME ( decl ) , NULL_TREE ) ; TEMPLATE_TYPE_PARM_INDEX ( t2 ) = copy_node ( TEMPLATE_TYPE_PARM_INDEX ( t ) ) ; TEMPLATE_PARM_DECL ( TEMPLATE_TYPE_PARM_INDEX ( t2 ) ) = decl ; TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO ( t2 ) = tree_cons ( TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL ( t ) , newargs , NULL_TREE ) ; TREE_TYPE ( decl ) = t2 ; TYPE_NAME ( t2 ) = decl ; TYPE_STUB_DECL ( t2 ) = decl ; TYPE_SIZE ( t2 ) = 0 ; return t2 ; }
Given a TEMPLATE_TEMPLATE_PARM node T, create a new
BOUND_TEMPLATE_TEMPLATE_PARM bound with NEWARGS as its template
arguments.
Given a TEMPLATE_TEMPLATE_PARM node T create a new BOUND_TEMPLATE_TEMPLATE_PARM bound with NEWARGS as its template arguments .
/* These nodes have to be created to reflect new TYPE_DECL and template
     arguments.  */