aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2017-10-10 20:42:45 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2017-10-10 20:42:45 +0000
commitd6b605f6ae91ad83e2c7cae9c420f05a572c973d (patch)
treed71383654d28f92898da18646ee290aed835ee19 /gcc
parent92395f1c2473db7898ca06fa9b17f144564554df (diff)
downloadgcc-d6b605f6ae91ad83e2c7cae9c420f05a572c973d.zip
gcc-d6b605f6ae91ad83e2c7cae9c420f05a572c973d.tar.gz
gcc-d6b605f6ae91ad83e2c7cae9c420f05a572c973d.tar.bz2
[C++ PATCH] Kill unneeded hash specialization
https://gcc.gnu.org/ml/gcc-patches/2017-10/msg00621.html * cp-tree.h (default_hash_traits <lang_identifier *>): Delete specialization. From-SVN: r253620
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog3
-rw-r--r--gcc/cp/cp-tree.h24
2 files changed, 3 insertions, 24 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 40c4c2f..25083eb 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,8 @@
2017-10-10 Nathan Sidwell <nathan@acm.org>
+ * cp-tree.h (default_hash_traits <lang_identifier *>): Delete
+ specialization.
+
* decl2.c (struct mangled_decl_hash): New hash traits.
(mangled_decls): Make hash_table<mangled_decl_hash>.
(generate_mangling_alias, record_mangling): Adjust.
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 1c008db..4fb2dc8 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -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))