diff options
author | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-06-25 17:07:26 +0000 |
---|---|---|
committer | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-06-25 17:07:26 +0000 |
commit | f581cceb3653a3f3c24f7fc83c9419b331a21f85 (patch) | |
tree | 0d263ff1b78638159eec3b6061f9596f22d5c4e9 /gcc/ipa-devirt.c | |
parent | cede6403d0fc4ebd0a416d7e74b1ee0a9b6d2010 (diff) | |
download | gcc-f581cceb3653a3f3c24f7fc83c9419b331a21f85.tar.gz |
gcc/
* hash-traits.h (default_hash_traits): New structure.
* hash-set.h (default_hashset_traits): Delete.
(hash_set): Use default_hash_traits<Key> instead of
default_hashset_traits. Delete hash_entry type and use Key directly.
* ipa-devirt.c (pair_traits): Delete.
(default_hash_traits <type_pair>): Override.
(odr_subtypes_equivalent_p): Remove pair_types template parameter.
(odr_types_equivalent_p, add_type_duplicate): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@224964 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-devirt.c')
-rw-r--r-- | gcc/ipa-devirt.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/gcc/ipa-devirt.c b/gcc/ipa-devirt.c index b735f64784a..80f73a68856 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 <type_pair> : typed_noop_remove <type_pair> { + 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<type_pair,pair_traits> *, + hash_set<type_pair> *, 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<type_pair,pair_traits> *visited, + hash_set<type_pair> *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<type_pair,pair_traits> *visited, + hash_set<type_pair> *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<type_pair,pair_traits> visited; + hash_set<type_pair> 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<type_pair,pair_traits> visited; + hash_set<type_pair> visited; gcc_assert (in_lto_p); vec_safe_push (val->types, type); |