diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2015-06-25 17:15:54 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2015-06-25 17:15:54 +0000 |
commit | 910ee068dfe96a049298066301b2f48e00299789 (patch) | |
tree | c0a0e6676bc3c8d75377a2d4e197dead803b8531 /gcc/tree-ssa-strlen.c | |
parent | d6a818c59e002f76f237ad305bf4b73a415dcb3c (diff) | |
download | gcc-910ee068dfe96a049298066301b2f48e00299789.zip gcc-910ee068dfe96a049298066301b2f48e00299789.tar.gz gcc-910ee068dfe96a049298066301b2f48e00299789.tar.bz2 |
tree-hash-traits.h (tree_decl_hash): New class.
gcc/
* tree-hash-traits.h (tree_decl_hash): New class.
* tree-ssa-strlen.c: Include tree-hash-traits.h.
(stridxlist_hash_traits): Use tree_decl_hash.
From-SVN: r224968
Diffstat (limited to 'gcc/tree-ssa-strlen.c')
-rw-r--r-- | gcc/tree-ssa-strlen.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/gcc/tree-ssa-strlen.c b/gcc/tree-ssa-strlen.c index fc848ea..97e8963 100644 --- a/gcc/tree-ssa-strlen.c +++ b/gcc/tree-ssa-strlen.c @@ -71,6 +71,7 @@ along with GCC; see the file COPYING3. If not see #include "ipa-ref.h" #include "cgraph.h" #include "ipa-chkp.h" +#include "tree-hash-traits.h" /* A vector indexed by SSA_NAME_VERSION. 0 means unknown, positive value is an index into strinfo vector, negative value stands for @@ -153,20 +154,7 @@ struct decl_stridxlist_map struct stridxlist list; }; -/* stridxlist hashtable helpers. */ - -struct stridxlist_hash_traits : default_hashmap_traits -{ - static inline hashval_t hash (tree); -}; - -/* Hash a from tree in a decl_stridxlist_map. */ - -inline hashval_t -stridxlist_hash_traits::hash (tree item) -{ - return DECL_UID (item); -} +typedef simple_hashmap_traits <tree_decl_hash> stridxlist_hash_traits; /* Hash table for mapping decls to a chained list of offset -> idx mappings. */ |