From e0702244b8e0fa5555e20b5554545bab9d06927f Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Thu, 25 Jun 2015 17:16:44 +0000 Subject: gengtype-parse.c (require_template_declaration): Allow '+' in template parameters. gcc/ * gengtype-parse.c (require_template_declaration): Allow '+' in template parameters. Consolidate cases. * hash-traits.h (int_hash): New class. * alias.c (alias_set_hash): New structure. (alias_set_traits): Use it. * symbol-summary.h (function_summary::map_hash): New class. (function_summary::summary_hashmap_traits): Use it. * tree-inline.h (dependence_hash): New class. (dependence_hasher): Use it. * tree-ssa-reassoc.c (oecount_hasher): Use int_hash. * value-prof.c (profile_id_hash): New class. (profile_id_traits): Use it. From-SVN: r224973 --- gcc/symbol-summary.h | 41 ++--------------------------------------- 1 file changed, 2 insertions(+), 39 deletions(-) (limited to 'gcc/symbol-summary.h') diff --git a/gcc/symbol-summary.h b/gcc/symbol-summary.h index 0448310..facb596 100644 --- a/gcc/symbol-summary.h +++ b/gcc/symbol-summary.h @@ -200,45 +200,8 @@ protected: bool m_ggc; private: - struct summary_hashmap_traits: default_hashmap_traits - { - static const int deleted_value = -1; - static const int empty_value = 0; - - static hashval_t - hash (const int v) - { - return (hashval_t)v; - } - - template - static bool - is_deleted (Type &e) - { - return e.m_key == deleted_value; - } - - template - static bool - is_empty (Type &e) - { - return e.m_key == empty_value; - } - - template - static void - mark_deleted (Type &e) - { - e.m_key = deleted_value; - } - - template - static void - mark_empty (Type &e) - { - e.m_key = empty_value; - } - }; + typedef int_hash map_hash; + typedef simple_hashmap_traits summary_hashmap_traits; /* Getter for summary callgraph ID. */ T* get (int uid) -- cgit v1.1