aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/gcc-interface/utils.c')
-rw-r--r--gcc/ada/gcc-interface/utils.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c
index 9510898..b0f6d2d 100644
--- a/gcc/ada/gcc-interface/utils.c
+++ b/gcc/ada/gcc-interface/utils.c
@@ -231,11 +231,15 @@ struct pad_type_hasher : ggc_cache_ptr_hash<pad_type_hash>
{
static inline hashval_t hash (pad_type_hash *t) { return t->hash; }
static bool equal (pad_type_hash *a, pad_type_hash *b);
- static int keep_cache_entry (pad_type_hash *&);
+
+ static int
+ keep_cache_entry (pad_type_hash *&t)
+ {
+ return ggc_marked_p (t->type);
+ }
};
-static GTY ((cache))
- hash_table<pad_type_hasher> *pad_type_hash_table;
+static GTY ((cache)) hash_table<pad_type_hasher> *pad_type_hash_table;
static tree merge_sizes (tree, tree, tree, bool, bool);
static tree fold_bit_position (const_tree);
@@ -750,7 +754,7 @@ gnat_pushdecl (tree decl, Node_Id gnat_node)
TREE_NO_WARNING (decl) = (No (gnat_node) || Warnings_Off (gnat_node));
/* Set the location of DECL and emit a declaration for it. */
- if (Present (gnat_node) && !renaming_from_generic_instantiation_p (gnat_node))
+ if (Present (gnat_node) && !renaming_from_instantiation_p (gnat_node))
Sloc_to_locus (Sloc (gnat_node), &DECL_SOURCE_LOCATION (decl));
add_decl_expr (decl, gnat_node);
@@ -1192,14 +1196,6 @@ make_type_from_size (tree type, tree size_tree, bool for_biased)
return type;
}
-/* See if the data pointed to by the hash table slot is marked. */
-
-int
-pad_type_hasher::keep_cache_entry (pad_type_hash *&t)
-{
- return ggc_marked_p (t->type);
-}
-
/* Return true iff the padded types are equivalent. */
bool
@@ -2899,10 +2895,10 @@ value_factor_p (tree value, HOST_WIDE_INT factor)
initialization is likely to disturb debugging. */
bool
-renaming_from_generic_instantiation_p (Node_Id gnat_node)
+renaming_from_instantiation_p (Node_Id gnat_node)
{
if (Nkind (gnat_node) != N_Defining_Identifier
- || !IN (Ekind (gnat_node), Object_Kind)
+ || !Is_Object (gnat_node)
|| Comes_From_Source (gnat_node)
|| !Present (Renamed_Object (gnat_node)))
return false;