Come up with is_empty for hash_{table,map,set}.
authorMartin Liska <mliska@suse.cz>
Fri, 3 May 2019 12:37:22 +0000 (14:37 +0200)
committerMartin Liska <marxin@gcc.gnu.org>
Fri, 3 May 2019 12:37:22 +0000 (12:37 +0000)
commitb119c05542a9574a1c27f9bba63efbafc12b248b
treec74567ce247b0b3ab51c2b111256694ba980a0b5
parent3353ebf0d9a20f07597b90943664f10557488ea8
Come up with is_empty for hash_{table,map,set}.

2019-05-03  Martin Liska  <mliska@suse.cz>

* hash-map.h: Add is_empty function.
* hash-set.h: Likewise.
* hash-table.h: Likewise.
* dwarf2out.c (dwarf2out_finish): Use is_empty instead of
elements () == 0 (and similar usages).
* gimple-ssa-store-merging.c (pass_store_merging::terminate_and_process_all_chains): Likewise.
* gimplify.c (gimplify_bind_expr): Likewise.
(gimplify_switch_expr): Likewise.
* hash-map-tests.c (test_map_of_strings_to_int): Likewise.
* ipa-icf.c (sem_item_optimizer::remove_symtab_node): Likewise.
* postreload-gcse.c (dump_hash_table): Likewise.
(gcse_after_reload_main): Likewise.
* predict.c (combine_predictions_for_bb): Likewise.
* tree-parloops.c (reduction_phi): Likewise.
(separate_decls_in_region): Likewise.
(transform_to_exit_first_loop): Likewise.
(gen_parallel_loop): Likewise.
(gather_scalar_reductions): Likewise.
(try_create_reduction_list): Likewise.
* var-tracking.c (dump_vars): Likewise.
(emit_notes_for_changes): Likewise.
(vt_emit_notes): Likewise.
2019-05-03  Martin Liska  <mliska@suse.cz>

* call.c (build_aggr_conv): Use is_empty instead of
elements () == 0 (and similar usages).
* parser.c (cp_parser_lambda_introducer): Likewise.

From-SVN: r270851
16 files changed:
gcc/ChangeLog
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/cp/parser.c
gcc/dwarf2out.c
gcc/gimple-ssa-store-merging.c
gcc/gimplify.c
gcc/hash-map-tests.c
gcc/hash-map.h
gcc/hash-set.h
gcc/hash-table.h
gcc/ipa-icf.c
gcc/postreload-gcse.c
gcc/predict.c
gcc/tree-parloops.c
gcc/var-tracking.c