Wunused-parameter warnings are given from cgraph::finalize_function,
[gcc.git] / gcc / ipa-devirt.c
index b735f64784aac1c438c40291654b83e2daf6e50e..905776e0a0cbbcfe29488063d0b5d70c12a77825 100644 (file)
@@ -117,10 +117,8 @@ along with GCC; see the file COPYING3.  If not see
 #include "calls.h"
 #include "predict.h"
 #include "basic-block.h"
-#include "plugin-api.h"
 #include "hard-reg-set.h"
 #include "function.h"
-#include "ipa-ref.h"
 #include "cgraph.h"
 #include "rtl.h"
 #include "flags.h"
@@ -162,8 +160,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 +193,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 +770,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 +1336,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 +1786,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 +1861,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);