diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-09-05 01:01:39 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-09-05 01:01:39 +0000 |
commit | 1e93ca27be2db81da0624f44d9463d92470a6b52 (patch) | |
tree | 74aa1d28311f0e2a44c3219022844b51d65b544a /gcc/cp/method.c | |
parent | 40e00cb07ea62c37c57ac7a658315b885c711ef3 (diff) | |
download | gcc-1e93ca27be2db81da0624f44d9463d92470a6b52.tar.gz |
* cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
(TEMPLATE_TEMPLATE_PARM): Adjust comment.
* cp-tree.h (TYPE_BINFO): Adjust comment.
(TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
(TEMPLATE_TYPE_PARM_INDEX): Likewise.
(IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
(TYPE_TEMPLATE_INFO): Likewise.
(TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
* class.c (push_nested_class): Likewise.
* decl.c (lookup_name_real): Likewise.
(grokdeclarator): Likewise.
(grok_op_properties): Likewise.
(xref_tag): Likewise.
(xref_basetypes): Likewise.
* decl2.c (constructor_name_full): Likewise.
(arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
(arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
* error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
(dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
(dump_type_suffix): Likewise.
* init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
instead.
(get_aggr_from_typedef): Likewise.
* mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
(write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
(write_template_parm): Likewise.
(write_template_template_parm): Check tree code instead of
using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
* method.c (build_overload_nested_name): Add
BOUND_TEMPLATE_TEMPLATE_PARM.
(process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
* parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
* pt.c (convert_template_argument): Check tree code instead of
using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
(for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
(for_each_template_parm): Adjust comment.
(tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize.
(tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
(unify): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. Use
template_args_equal to compare template template parameter cases.
* ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
* search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
instead.
* tree.c (copy_template_template_parm): Decide whether to create
a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
(walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
(copy_tree_r): Likewise.
* typeck.c (comptypes): Likewise. Check tree code instead of
using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36149 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/method.c')
-rw-r--r-- | gcc/cp/method.c | 36 |
1 files changed, 17 insertions, 19 deletions
diff --git a/gcc/cp/method.c b/gcc/cp/method.c index 4c024d1e49a..1e5c4e36070 100644 --- a/gcc/cp/method.c +++ b/gcc/cp/method.c @@ -446,7 +446,8 @@ build_overload_nested_name (decl) /* For a template type parameter, we want to output an 'Xn' rather than 'T' or some such. */ if (TREE_CODE (context) == TEMPLATE_TYPE_PARM - || TREE_CODE (context) == TEMPLATE_TEMPLATE_PARM) + || TREE_CODE (context) == TEMPLATE_TEMPLATE_PARM + || TREE_CODE (context) == BOUND_TEMPLATE_TEMPLATE_PARM) build_mangled_name_for_type (context); else { @@ -1512,26 +1513,23 @@ process_overload_item (parmtype, extra_Gcode) OB_PUTC ('?'); break; - case TEMPLATE_TEMPLATE_PARM: + case BOUND_TEMPLATE_TEMPLATE_PARM: /* Find and output the original template parameter declaration. */ - if (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO (parmtype)) - { - build_mangled_template_parm_index ("tzX", - TEMPLATE_TYPE_PARM_INDEX - (parmtype)); - build_template_parm_names - (DECL_INNERMOST_TEMPLATE_PARMS (TYPE_TI_TEMPLATE (parmtype)), - TYPE_TI_ARGS (parmtype)); - } - else - { - build_mangled_template_parm_index ("ZzX", - TEMPLATE_TYPE_PARM_INDEX - (parmtype)); - build_template_template_parm_names - (DECL_INNERMOST_TEMPLATE_PARMS (TYPE_STUB_DECL (parmtype))); - } + build_mangled_template_parm_index ("tzX", + TEMPLATE_TYPE_PARM_INDEX + (parmtype)); + build_template_parm_names + (DECL_INNERMOST_TEMPLATE_PARMS (TYPE_TI_TEMPLATE (parmtype)), + TYPE_TI_ARGS (parmtype)); + break; + + case TEMPLATE_TEMPLATE_PARM: + build_mangled_template_parm_index ("ZzX", + TEMPLATE_TYPE_PARM_INDEX + (parmtype)); + build_template_template_parm_names + (DECL_INNERMOST_TEMPLATE_PARMS (TYPE_STUB_DECL (parmtype))); break; case TEMPLATE_TYPE_PARM: |