From 8c1d6d62a680bf67cb921c550662306b4cb3a67b Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Tue, 24 Aug 2004 16:39:43 +0000 Subject: c-decl.c (c_init_decl_processing): Adjust build_common_tree_nodes call. * c-decl.c (c_init_decl_processing): Adjust build_common_tree_nodes call. * expmed.c (const_mult_add_overflow_p): Use build_distinct_type_copy. * stor-layout.c (early_type_list): Remove. (layout_type): Don't append to early_type_list. (initialize_sizetypes): Add signed_p argument. (set_sizetype): Overwrite the stub type nodes directly. * tree.c (copy_node_stat): Clear a type's value cache here ... (build_distinct_type): ... not here. (build_common_tree_nodes): Add signed_sizetype argument. Adjust. * tree.h (initialize_sizetypes): Add signed_p argument. (build_common_tree_nodes): Likewise. * ada/utils.c (gnat_init_decl_processing): Adjust build_common_tree_nodes call. * cp/decl.c (cxx_init_decl_processing): Adjust build_common_tree_nodes call. * fortran/f95-lang.c (gfc_init_decl_processing): Adjust build_common_tree_nodes call. * java/decl.c (java_init_decl_processing): Adjust initialize_sizetypes call. * objc/objc-act.c (get_static_reference): Use build_variant_type_copy. (get_protocol_reference): Likewise. * objc/objc-act.h (TREE_STATIC_TEMPLATE): Use TREE_PRIVATE. * treelang/treetree.c (treelang_init_decl_processing): Adjust build_common_tree_nodes call. From-SVN: r86493 --- gcc/objc/objc-act.c | 38 +++++--------------------------------- 1 file changed, 5 insertions(+), 33 deletions(-) (limited to 'gcc/objc/objc-act.c') diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c index cab25f4..92e5228 100644 --- a/gcc/objc/objc-act.c +++ b/gcc/objc/objc-act.c @@ -958,25 +958,11 @@ get_static_reference (tree interface, tree protocols) if (protocols) { - tree t, m = TYPE_MAIN_VARIANT (type); - - t = copy_node (type); - - /* Add this type to the chain of variants of TYPE. */ - TYPE_NEXT_VARIANT (t) = TYPE_NEXT_VARIANT (m); - TYPE_NEXT_VARIANT (m) = t; - + type = build_variant_type_copy (type); + /* Look up protocols and install in lang specific list. Note that the protocol list can have a different lifetime than T! */ - SET_TYPE_PROTOCOL_LIST (t, lookup_and_install_protocols (protocols)); - - /* This forces a new pointer type to be created later - (in build_pointer_type)...so that the new template - we just created will actually be used...what a hack! */ - if (TYPE_POINTER_TO (t)) - TYPE_POINTER_TO (t) = NULL_TREE; - - type = t; + SET_TYPE_PROTOCOL_LIST (type, lookup_and_install_protocols (protocols)); } return type; @@ -1008,24 +994,10 @@ get_protocol_reference (tree protocols) if (protocols) { - tree t, m = TYPE_MAIN_VARIANT (type); - - t = copy_node (type); - - /* Add this type to the chain of variants of TYPE. */ - TYPE_NEXT_VARIANT (t) = TYPE_NEXT_VARIANT (m); - TYPE_NEXT_VARIANT (m) = t; + type = build_variant_type_copy (type); /* Look up protocols...and install in lang specific list */ - SET_TYPE_PROTOCOL_LIST (t, lookup_and_install_protocols (protocols)); - - /* This forces a new pointer type to be created later - (in build_pointer_type)...so that the new template - we just created will actually be used...what a hack! */ - if (TYPE_POINTER_TO (t)) - TYPE_POINTER_TO (t) = NULL_TREE; - - type = t; + SET_TYPE_PROTOCOL_LIST (type, lookup_and_install_protocols (protocols)); } return type; } -- cgit v1.1