diff options
Diffstat (limited to 'gcc/tree.c')
-rw-r--r-- | gcc/tree.c | 53 |
1 files changed, 26 insertions, 27 deletions
diff --git a/gcc/tree.c b/gcc/tree.c index 39a80c800a3..fe1f74a7328 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -2738,6 +2738,19 @@ vec_member (const_tree elem, vec<tree, va_gc> *v) return false; } +/* Return true if ELEM is in V. */ + +bool +vec_member (const ttype *elem, vec<ttype *, va_gc> *v) +{ + unsigned ix; + ttype *t; + FOR_EACH_VEC_SAFE_ELT (v, ix, t) + if (elem == t) + return true; + return false; +} + /* Returns element number IDX (zero-origin) of chain CHAIN, or NULL_TREE. */ @@ -4807,7 +4820,7 @@ build_decl_attribute_variant (tree ddecl, tree attribute) Record such modified types already made so we don't make duplicates. */ ttype * -build_type_attribute_qual_variant (tree type, tree attribute, int quals) +build_type_attribute_qual_variant (ttype_p type, tree attribute, int quals) { if (! attribute_list_equal (TYPE_ATTRIBUTES (type), attribute)) { @@ -4885,7 +4898,7 @@ build_type_attribute_qual_variant (tree type, tree attribute, int quals) else if (TYPE_QUALS (type) != quals) type = build_qualified_type (type, quals); - return TTYPE (type); + return type; } /* Check if "omp declare simd" attribute arguments, CLAUSES1 and CLAUSES2, are @@ -6591,12 +6604,12 @@ find_atomic_core_type (tree type) return NULL_TREE. */ ttype * -get_qualified_type (tree type, int type_quals) +get_qualified_type (ttype_p type, int type_quals) { ttype *t; if (TYPE_QUALS (type) == type_quals) - return TTYPE (type); + return type; /* Search the chain of variants to see if there is already one there just like the one we need to have. If so, use that existing one. We must @@ -6612,9 +6625,9 @@ get_qualified_type (tree type, int type_quals) exist. This function never returns NULL_TREE. */ ttype * -build_qualified_type (tree type, int type_quals) +build_qualified_type (ttype_p type, int type_quals) { - tree t; + ttype *t; /* See if we already have the appropriate qualified variant. */ t = get_qualified_type (type, type_quals); @@ -6654,7 +6667,7 @@ build_qualified_type (tree type, int type_quals) } - return TTYPE (t); + return t; } /* Create a variant of type T with alignment ALIGN. */ @@ -6684,9 +6697,9 @@ build_aligned_type (tree type, unsigned int align) TYPE_CANONICAL points to itself. */ ttype * -build_distinct_type_copy (tree type) +build_distinct_type_copy (ttype_p type) { - ttype *t = copy_node (TTYPE (type)); + ttype *t = copy_node (type); TYPE_POINTER_TO (t) = 0; TYPE_REFERENCE_TO (t) = 0; @@ -10276,7 +10289,7 @@ build_common_tree_nodes (bool signed_char, bool short_double) MAKE_FIXED_MODE_NODE (accum, ta, TA) { - tree t = targetm.build_builtin_va_list (); + ttype *t = TTYPE (targetm.build_builtin_va_list ()); /* Many back-ends define record types without setting TYPE_NAME. If we copied the record type here, we'd keep the original @@ -10286,7 +10299,7 @@ build_common_tree_nodes (bool signed_char, bool short_double) if (TREE_CODE (t) != RECORD_TYPE) t = build_variant_type_copy (t); - va_list_type_node = TTYPE (t); + va_list_type_node = t; } } @@ -10592,7 +10605,7 @@ build_common_builtin_nodes (void) new type which we will point to. */ ttype * -reconstruct_complex_type (tree type, tree bottom) +reconstruct_complex_type (ttype_p type, ttype_p bottom) { ttype *inner, *outer; @@ -10635,7 +10648,7 @@ reconstruct_complex_type (tree type, tree bottom) outer = build_offset_type (TYPE_OFFSET_BASETYPE (type), inner); } else - return TTYPE (bottom); + return bottom; return build_type_attribute_qual_variant (outer, TYPE_ATTRIBUTES (type), TYPE_QUALS (type)); @@ -13833,19 +13846,5 @@ nonnull_arg_p (const_tree arg) } -void gt_ggc_mx (class ttype *& x) -{ -// extern void gt_ggc_mx_lang_tree_node (void *); - if (x) - gt_ggc_mx_lang_tree_node ((void *) x); -} - -void gt_pch_nx (class ttype *& x) -{ -// extern void gt_pch_nx_lang_tree_node (void *); - if (x) - gt_pch_nx_lang_tree_node ((void *) x); -} - #include "gt-tree.h" |