diff mbox series

[C++] Kill unneeded hash specialization

Message ID 33141b70-f4cd-e058-1733-9d0f39891416@acm.org
State New
Headers show
Series [C++] Kill unneeded hash specialization | expand

Commit Message

Nathan Sidwell Oct. 10, 2017, 8:41 p.m. UTC
Now I've converted the identifier_>decl hash_maps to self-hashing 
hash_tables, there's no need for the lang_identifier specialization of 
default_hash_traits.

So killing it.

nathan
diff mbox series

Patch

2017-10-10  Nathan Sidwell  <nathan@acm.org>

	* cp-tree.h (default_hash_traits <lang_identifier *>): Delete
	specialization.

Index: cp-tree.h
===================================================================
--- cp-tree.h	(revision 253605)
+++ cp-tree.h	(working copy)
@@ -572,30 +572,6 @@  identifier_p (tree t)
   return NULL;
 }
 
-/* Hash trait specialization for lang_identifiers.  This allows
-   PCH-safe maps keyed by DECL_NAME.  If it wasn't for PCH, we could
-   just use a regular tree key.  */
-
-template <>
-struct default_hash_traits <lang_identifier *>
-  : pointer_hash <tree_node>
-{
-  /* Use a regular tree as the type, to make using the hash table
-     simpler.  We'll get dynamic type checking with the hash function
-     itself.  */
-  GTY((skip)) typedef tree value_type;
-  GTY((skip)) typedef tree compare_type;
-
-  static hashval_t hash (const value_type id)
-  {
-    return IDENTIFIER_HASH_VALUE (id);
-  }
-
-  /* Nothing is deletable.  Everything is insertable.  */
-  static bool is_deleted (value_type) { return false; }
-  static void remove (value_type) { gcc_unreachable (); }
-};
-
 #define LANG_IDENTIFIER_CAST(NODE) \
 	((struct lang_identifier*)IDENTIFIER_NODE_CHECK (NODE))