diff options
author | tbsaunde <tbsaunde@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-11-20 15:10:49 +0000 |
---|---|---|
committer | tbsaunde <tbsaunde@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-11-20 15:10:49 +0000 |
commit | 9f9f871f6cb738b7ce11633bd9a2e7336b136786 (patch) | |
tree | 0e6aa4b2c49f7ab4a703ab71a3335cb58bcb19c6 /gcc/lto-section-in.c | |
parent | 5ecbd52ec51edc2e78944975a64269118eb3ca9e (diff) | |
download | gcc-9f9f871f6cb738b7ce11633bd9a2e7336b136786.tar.gz |
remove more ggc htabs
gcc/
* ipa-utils.c, lto-section-in.c, lto-streamer.h,
tree-scalar-evolution.c: Replace htab with hash_table.
lto/
* lto.c: Replace htab with hash_table.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217871 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lto-section-in.c')
-rw-r--r-- | gcc/lto-section-in.c | 40 |
1 files changed, 8 insertions, 32 deletions
diff --git a/gcc/lto-section-in.c b/gcc/lto-section-in.c index d0bb4bdd9de..3ccdfb93fe0 100644 --- a/gcc/lto-section-in.c +++ b/gcc/lto-section-in.c @@ -384,29 +384,6 @@ lto_delete_in_decl_state (struct lto_in_decl_state *state) ggc_free (state); } -/* Hashtable helpers. lto_in_decl_states are hash by their function decls. */ - -hashval_t -lto_hash_in_decl_state (const void *p) -{ - const struct lto_in_decl_state *state = (const struct lto_in_decl_state *) p; - return htab_hash_pointer (state->fn_decl); -} - -/* Return true if the fn_decl field of the lto_in_decl_state pointed to by - P1 equals to the function decl P2. */ - -int -lto_eq_in_decl_state (const void *p1, const void *p2) -{ - const struct lto_in_decl_state *state1 = - (const struct lto_in_decl_state *) p1; - const struct lto_in_decl_state *state2 = - (const struct lto_in_decl_state *) p2; - return state1->fn_decl == state2->fn_decl; -} - - /* Search the in-decl state of a function FUNC contained in the file associated with FILE_DATA. Return NULL if not found. */ @@ -415,11 +392,11 @@ lto_get_function_in_decl_state (struct lto_file_decl_data *file_data, tree func) { struct lto_in_decl_state temp; - void **slot; + lto_in_decl_state **slot; temp.fn_decl = func; - slot = htab_find_slot (file_data->function_decl_states, &temp, NO_INSERT); - return slot? ((struct lto_in_decl_state*) *slot) : NULL; + slot = file_data->function_decl_states->find_slot (&temp, NO_INSERT); + return slot? *slot : NULL; } /* Free decl_states. */ @@ -440,19 +417,18 @@ void lto_free_function_in_decl_state_for_node (symtab_node *node) { struct lto_in_decl_state temp; - void **slot; + lto_in_decl_state **slot; if (!node->lto_file_data) return; temp.fn_decl = node->decl; - slot = htab_find_slot (node->lto_file_data->function_decl_states, - &temp, NO_INSERT); + slot + = node->lto_file_data->function_decl_states->find_slot (&temp, NO_INSERT); if (slot && *slot) { - lto_free_function_in_decl_state ((struct lto_in_decl_state*) *slot); - htab_clear_slot (node->lto_file_data->function_decl_states, - slot); + lto_free_function_in_decl_state (*slot); + node->lto_file_data->function_decl_states->clear_slot (slot); } node->lto_file_data = NULL; } |