diff mbox series

c++: Delete unused hash type

Message ID 4e247397-7adc-c784-9f45-84d72d47963a@acm.org
State New
Headers show
Series c++: Delete unused hash type | expand

Commit Message

Nathan Sidwell Nov. 2, 2020, 5:30 p.m. UTC
Since I	redid block-scope extern decls,	the need for a uid->decl
hasher has gone away.  Deleting thusly.

         gcc/cp/
         * cp-tree.h (struct cxx_int_tree_map): Delete.
         (struct cxx_int_tree_map_hasher): Delete.
         * cp-gimplify.c (cxx_int_tree_map_hasher::equal): Delete.
         (cxx_int_tree_map_hasher::hash): Delete.

pushing to trunk
diff mbox series

Patch

diff --git i/gcc/cp/cp-gimplify.c w/gcc/cp/cp-gimplify.c
index 44c9d249b15..064a44ca3e5 100644
--- i/gcc/cp/cp-gimplify.c
+++ w/gcc/cp/cp-gimplify.c
@@ -680,22 +680,6 @@  is_invisiref_parm (const_tree t)
 	  && DECL_BY_REFERENCE (t));
 }
 
-/* Return true if the uid in both int tree maps are equal.  */
-
-bool
-cxx_int_tree_map_hasher::equal (cxx_int_tree_map *a, cxx_int_tree_map *b)
-{
-  return (a->uid == b->uid);
-}
-
-/* Hash a UID in a cxx_int_tree_map.  */
-
-unsigned int
-cxx_int_tree_map_hasher::hash (cxx_int_tree_map *item)
-{
-  return item->uid;
-}
-
 /* A stable comparison routine for use with splay trees and DECLs.  */
 
 static int
diff --git i/gcc/cp/cp-tree.h w/gcc/cp/cp-tree.h
index fdb8ee57f0b..eb7d1caa0a7 100644
--- i/gcc/cp/cp-tree.h
+++ w/gcc/cp/cp-tree.h
@@ -1867,19 +1867,6 @@  public:
 
 #define cp_noexcept_operand scope_chain->noexcept_operand
 
-/* A list of private types mentioned, for deferred access checking.  */
-
-struct GTY((for_user)) cxx_int_tree_map {
-  unsigned int uid;
-  tree to;
-};
-
-struct cxx_int_tree_map_hasher : ggc_ptr_hash<cxx_int_tree_map>
-{
-  static hashval_t hash (cxx_int_tree_map *);
-  static bool equal (cxx_int_tree_map *, cxx_int_tree_map *);
-};
-
 struct named_label_entry; /* Defined in decl.c.  */
 
 struct named_label_hash : ggc_remove <named_label_entry *>