c++: Delete unused hash type
authorNathan Sidwell <nathan@acm.org>
Mon, 2 Nov 2020 17:29:14 +0000 (09:29 -0800)
committerNathan Sidwell <nathan@acm.org>
Mon, 2 Nov 2020 18:34:31 +0000 (10:34 -0800)
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.

gcc/cp/cp-gimplify.c
gcc/cp/cp-tree.h

index 44c9d249b151c69c917c01f8db762e019160769d..064a44ca3e595a5cf63e104e5c16c6a106bbf1e9 100644 (file)
@@ -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
index 3b4f772cc70cb468f5206402baf625924008038c..334424770ef739869dd453f56d8f46b022bb4aa5 100644 (file)
@@ -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 *>