From b32ca1dfaf130c7cd946c917905f21854c260efa Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Thu, 25 Jun 2015 17:07:26 +0000 Subject: hash-traits.h (default_hash_traits): New structure. gcc/ * hash-traits.h (default_hash_traits): New structure. * hash-set.h (default_hashset_traits): Delete. (hash_set): Use default_hash_traits instead of default_hashset_traits. Delete hash_entry type and use Key directly. * ipa-devirt.c (pair_traits): Delete. (default_hash_traits ): Override. (odr_subtypes_equivalent_p): Remove pair_types template parameter. (odr_types_equivalent_p, add_type_duplicate): Likewise. From-SVN: r224964 --- gcc/ipa-devirt.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'gcc/ipa-devirt.c') diff --git a/gcc/ipa-devirt.c b/gcc/ipa-devirt.c index b735f64..80f73a6 100644 --- a/gcc/ipa-devirt.c +++ b/gcc/ipa-devirt.c @@ -162,8 +162,11 @@ typedef struct tree second; } type_pair; -struct pair_traits : default_hashset_traits +template <> +struct default_hash_traits : typed_noop_remove { + typedef type_pair value_type; + typedef type_pair compare_type; static hashval_t hash (type_pair p) { @@ -192,7 +195,7 @@ struct pair_traits : default_hashset_traits }; static bool odr_types_equivalent_p (tree, tree, bool, bool *, - hash_set *, + hash_set *, location_t, location_t); static bool odr_violation_reported = false; @@ -769,7 +772,7 @@ set_type_binfo (tree type, tree binfo) static bool odr_subtypes_equivalent_p (tree t1, tree t2, - hash_set *visited, + hash_set *visited, location_t loc1, location_t loc2) { @@ -1335,7 +1338,7 @@ warn_types_mismatch (tree t1, tree t2, location_t loc1, location_t loc2) static bool odr_types_equivalent_p (tree t1, tree t2, bool warn, bool *warned, - hash_set *visited, + hash_set *visited, location_t loc1, location_t loc2) { /* Check first for the obvious case of pointer identity. */ @@ -1785,7 +1788,7 @@ odr_types_equivalent_p (tree t1, tree t2, bool warn, bool *warned, bool odr_types_equivalent_p (tree type1, tree type2) { - hash_set visited; + hash_set visited; #ifdef ENABLE_CHECKING gcc_assert (odr_or_derived_type_p (type1) && odr_or_derived_type_p (type2)); @@ -1860,7 +1863,7 @@ add_type_duplicate (odr_type val, tree type) bool base_mismatch = false; unsigned int i; bool warned = false; - hash_set visited; + hash_set visited; gcc_assert (in_lto_p); vec_safe_push (val->types, type); -- cgit v1.1