summaryrefslogtreecommitdiff
path: root/gcc/trans-mem.c
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2015-06-25 17:05:47 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2015-06-25 17:05:47 +0000
commit9937801191a8686d18a79c105b3c3b419c51f174 (patch)
treeca64d02be9c4087e4dadaeef0f61260ee7abcc17 /gcc/trans-mem.c
parent142dd62a9ecab4559e6d7b0be471b9dbbebe8956 (diff)
downloadgcc-9937801191a8686d18a79c105b3c3b419c51f174.tar.gz
gcc/ada/
* gcc-interface/decl.c (value_annotation_hasher::handle_cache_entry): Delete. (value_annotation_hasher::keep_cache_entry): New function. * gcc-interface/utils.c (pad_type_hasher::handle_cache_entry): Delete. (pad_type_hasher::keep_cache_entry): New function. gcc/ * hash-table.h (hash_table): Add gt_cleare_cache as a friend. (gt_cleare_cache): Check here for deleted and empty entries. Replace handle_cache_entry with a call to keep_cache_entry. * hash-traits.h (ggc_cache_hasher::handle_cache_entry): Delete. (ggc_cache_hasher::keep_cache_entry): New function. * trans-mem.c (tm_wrapper_hasher::handle_cache_entry): Delete. (tm_wrapper_hasher::keep_cache_entry): New function. * tree.h (tree_decl_map_cache_hasher::handle_cache_entry): Delete. (tree_vec_map_cache_hasher::keep_cache_entry): New function. * tree.c (type_cache_hasher::handle_cache_entry): Delete. (type_cache_hasher::keep_cache_entry): New function. (tree_vec_map_cache_hasher::handle_cache_entry): Delete. (tree_vec_map_cache_hasher::keep_cache_entry): New function. * ubsan.c (tree_type_map_cache_hasher::handle_cache_entry): Delete. (tree_type_map_cache_hasher::keep_cache_entry): New function. * varasm.c (tm_clone_hasher::handle_cache_entry): Delete. (tm_clone_hasher::keep_cache_entry): New function. * config/i386/i386.c (dllimport_hasher::handle_cache_entry): Delete. (dllimport_hasher::keep_cache_entry): New function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@224954 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/trans-mem.c')
-rw-r--r--gcc/trans-mem.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/gcc/trans-mem.c b/gcc/trans-mem.c
index 29e56288510..ded1e513705 100644
--- a/gcc/trans-mem.c
+++ b/gcc/trans-mem.c
@@ -480,17 +480,11 @@ struct tm_wrapper_hasher : ggc_cache_hasher<tree_map *>
return a->base.from == b->base.from;
}
- static void
- handle_cache_entry (tree_map *&m)
- {
- extern void gt_ggc_mx (tree_map *&);
- if (m == HTAB_EMPTY_ENTRY || m == HTAB_DELETED_ENTRY)
- return;
- else if (ggc_marked_p (m->base.from))
- gt_ggc_mx (m);
- else
- m = static_cast<tree_map *> (HTAB_DELETED_ENTRY);
- }
+ static int
+ keep_cache_entry (tree_map *&m)
+ {
+ return ggc_marked_p (m->base.from);
+ }
};
static GTY((cache)) hash_table<tm_wrapper_hasher> *tm_wrap_map;