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/lto.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/lto.c')
-rw-r--r-- | gcc/lto/lto.c | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c index 4cb99f1f700..a1cd9581bb2 100644 --- a/gcc/lto/lto.c +++ b/gcc/lto/lto.c @@ -1980,15 +1980,15 @@ lto_read_decls (struct lto_file_decl_data *decl_data, const void *data, /* Read in per-function decl states and enter them in hash table. */ decl_data->function_decl_states = - htab_create_ggc (37, lto_hash_in_decl_state, lto_eq_in_decl_state, NULL); + hash_table<decl_state_hasher>::create_ggc (37); for (i = 1; i < num_decl_states; i++) { struct lto_in_decl_state *state = lto_new_in_decl_state (); - void **slot; data_ptr = lto_read_in_decl_state (data_in, data_ptr, state); - slot = htab_find_slot (decl_data->function_decl_states, state, INSERT); + lto_in_decl_state **slot + = decl_data->function_decl_states->find_slot (state, INSERT); gcc_assert (*slot == NULL); *slot = state; } @@ -2817,17 +2817,6 @@ lto_fixup_state (struct lto_in_decl_state *state) } } -/* A callback of htab_traverse. Just extracts a state from SLOT - and calls lto_fixup_state. */ - -static int -lto_fixup_state_aux (void **slot, void *aux ATTRIBUTE_UNUSED) -{ - struct lto_in_decl_state *state = (struct lto_in_decl_state *) *slot; - lto_fixup_state (state); - return 1; -} - /* Fix the decls from all FILES. Replaces each decl with the corresponding prevailing one. */ @@ -2847,7 +2836,11 @@ lto_fixup_decls (struct lto_file_decl_data **files) struct lto_in_decl_state *state = file->global_decl_state; lto_fixup_state (state); - htab_traverse (file->function_decl_states, lto_fixup_state_aux, NULL); + hash_table<decl_state_hasher>::iterator iter; + lto_in_decl_state *elt; + FOR_EACH_HASH_TABLE_ELEMENT (*file->function_decl_states, elt, + lto_in_decl_state *, iter) + lto_fixup_state (elt); } } |