diff options
Diffstat (limited to 'gcc/lto-section-out.c')
-rw-r--r-- | gcc/lto-section-out.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/gcc/lto-section-out.c b/gcc/lto-section-out.c index 9d6926c57cf..00b18016a83 100644 --- a/gcc/lto-section-out.c +++ b/gcc/lto-section-out.c @@ -224,21 +224,17 @@ lto_output_decl_index (struct lto_output_stream *obs, struct lto_tree_ref_encoder *encoder, tree name, unsigned int *this_index) { - unsigned *slot; - unsigned int index; bool new_entry_p = FALSE; bool existed_p; - slot = encoder->tree_hash_table->insert (name, &existed_p); + unsigned int &index + = encoder->tree_hash_table->get_or_insert (name, &existed_p); if (!existed_p) { index = encoder->trees.length (); - *slot = index; encoder->trees.safe_push (name); new_entry_p = TRUE; } - else - index = *slot; if (obs) streamer_write_uhwi_stream (obs, index); |