* hash-traits.h (ggc_hasher::remove): Take a reference parameter.
(ggc_hasher::ggc_mx): Likewise.
(ggc_cache_hasher): Inherit from ggc_hasher. Remove definitions
that duplicate ggc_hasher ones.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@224955
138bc75d-0d04-0410-961f-
82ee72b054a4
+2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
+
+ * hash-traits.h (ggc_hasher::remove): Take a reference parameter.
+ (ggc_hasher::ggc_mx): Likewise.
+ (ggc_cache_hasher): Inherit from ggc_hasher. Remove definitions
+ that duplicate ggc_hasher ones.
+
2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
* hash-table.h (hash_table): Add gt_cleare_cache as a friend.
typedef T value_type;
typedef T compare_type;
- static void remove (T) {}
+ static void remove (T &) {}
static void
- ggc_mx (T p)
+ ggc_mx (T &p)
{
extern void gt_ggc_mx (T &);
gt_ggc_mx (p);
/* Hasher for cache entry in gc memory. */
template<typename T>
-struct ggc_cache_hasher
+struct ggc_cache_hasher : ggc_hasher<T>
{
- typedef T value_type;
- typedef T compare_type;
-
- static void remove (T &) {}
-
/* Entries are weakly held because this is for caches. */
-
static void ggc_mx (T &) {}
- static void
- pch_nx (T &p)
- {
- extern void gt_pch_nx (T &);
- gt_pch_nx (p);
- }
-
- static void
- pch_nx (T &p, gt_pointer_operator op, void *cookie)
- {
- op (&p, cookie);
- }
-
static int
keep_cache_entry (T &e)
{