diff options
author | Nathan Sidwell <nathan@gcc.gnu.org> | 2004-08-24 16:39:43 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2004-08-24 16:39:43 +0000 |
commit | 8c1d6d62a680bf67cb921c550662306b4cb3a67b (patch) | |
tree | 68fa8feee0d0759d7e8c1a8d496ea0bff1000fc3 /gcc/objc | |
parent | 436529eae35b089720e402b3e9354b7786ea2c38 (diff) | |
download | gcc-8c1d6d62a680bf67cb921c550662306b4cb3a67b.zip gcc-8c1d6d62a680bf67cb921c550662306b4cb3a67b.tar.gz gcc-8c1d6d62a680bf67cb921c550662306b4cb3a67b.tar.bz2 |
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
Diffstat (limited to 'gcc/objc')
-rw-r--r-- | gcc/objc/objc-act.c | 38 | ||||
-rw-r--r-- | gcc/objc/objc-act.h | 2 |
2 files changed, 6 insertions, 34 deletions
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; } diff --git a/gcc/objc/objc-act.h b/gcc/objc/objc-act.h index eb324b9..75507ae 100644 --- a/gcc/objc/objc-act.h +++ b/gcc/objc/objc-act.h @@ -125,7 +125,7 @@ tree build_encode_expr (tree); /* Set by `continue_class' and checked by `objc_is_public'. */ -#define TREE_STATIC_TEMPLATE(record_type) (TREE_PUBLIC (record_type)) +#define TREE_STATIC_TEMPLATE(record_type) (TREE_PRIVATE (record_type)) #define TYPED_OBJECT(type) \ (TREE_CODE (type) == RECORD_TYPE && TREE_STATIC_TEMPLATE (type)) #define OBJC_TYPE_NAME(type) TYPE_NAME(type) |