diff options
author | mpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-04-30 17:25:55 +0000 |
---|---|---|
committer | mpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-04-30 17:25:55 +0000 |
commit | 51aab39345ae0c796bd31b0ab03cc0fced7767da (patch) | |
tree | b6f4b29edee73742a200cbeb726bd7edb49f9e15 /gcc/varasm.c | |
parent | 62e7e0811e770776f7a80ba059f8ee0dcea30025 (diff) | |
download | linaro-gcc-51aab39345ae0c796bd31b0ab03cc0fced7767da.tar.gz linaro-gcc-51aab39345ae0c796bd31b0ab03cc0fced7767da.tar.bz2 linaro-gcc-51aab39345ae0c796bd31b0ab03cc0fced7767da.zip |
* varasm.c (handle_cache_entry): Fix logic.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222641 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r-- | gcc/varasm.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c index 9131e83a3bd..c2b35fd9c38 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -5793,21 +5793,20 @@ struct tm_clone_hasher : ggc_cache_hasher<tree_map *> static hashval_t hash (tree_map *m) { return tree_map_hash (m); } static bool equal (tree_map *a, tree_map *b) { return tree_map_eq (a, b); } - static void handle_cache_entry (tree_map *&e) + static void + handle_cache_entry (tree_map *&e) { - if (e != HTAB_EMPTY_ENTRY || e != HTAB_DELETED_ENTRY) - { - extern void gt_ggc_mx (tree_map *&); - if (ggc_marked_p (e->base.from)) - gt_ggc_mx (e); - else - e = static_cast<tree_map *> (HTAB_DELETED_ENTRY); - } + extern void gt_ggc_mx (tree_map *&); + if (e == HTAB_EMPTY_ENTRY || e == HTAB_DELETED_ENTRY) + return; + else if (ggc_marked_p (e->base.from)) + gt_ggc_mx (e); + else + e = static_cast<tree_map *> (HTAB_DELETED_ENTRY); } }; -static GTY((cache)) - hash_table<tm_clone_hasher> *tm_clone_hash; +static GTY((cache)) hash_table<tm_clone_hasher> *tm_clone_hash; void record_tm_clone_pair (tree o, tree n) |