From d6b605f6ae91ad83e2c7cae9c420f05a572c973d Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Tue, 10 Oct 2017 20:42:45 +0000 Subject: [PATCH] [C++ PATCH] Kill unneeded hash specialization https://gcc.gnu.org/ml/gcc-patches/2017-10/msg00621.html * cp-tree.h (default_hash_traits ): Delete specialization. From-SVN: r253620 --- gcc/cp/ChangeLog | 3 +++ gcc/cp/cp-tree.h | 24 ------------------------ 2 files changed, 3 insertions(+), 24 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 40c4c2f4184..25083eb757a 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 2017-10-10 Nathan Sidwell + * cp-tree.h (default_hash_traits ): Delete + specialization. + * decl2.c (struct mangled_decl_hash): New hash traits. (mangled_decls): Make hash_table. (generate_mangling_alias, record_mangling): Adjust. diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index 1c008dbb3b3..4fb2dc8e7c7 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 - : pointer_hash -{ - /* 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)) -- 2.30.2