aboutsummaryrefslogtreecommitdiff
path: root/gcc/hash-map-tests.c
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2019-05-03 14:37:22 +0200
committerMartin Liska <marxin@gcc.gnu.org>2019-05-03 12:37:22 +0000
commitb119c05542a9574a1c27f9bba63efbafc12b248b (patch)
treec74567ce247b0b3ab51c2b111256694ba980a0b5 /gcc/hash-map-tests.c
parent3353ebf0d9a20f07597b90943664f10557488ea8 (diff)
downloadgcc-b119c05542a9574a1c27f9bba63efbafc12b248b.zip
gcc-b119c05542a9574a1c27f9bba63efbafc12b248b.tar.gz
gcc-b119c05542a9574a1c27f9bba63efbafc12b248b.tar.bz2
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
Diffstat (limited to 'gcc/hash-map-tests.c')
-rw-r--r--gcc/hash-map-tests.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/hash-map-tests.c b/gcc/hash-map-tests.c
index acbfdb9..b79c782 100644
--- a/gcc/hash-map-tests.c
+++ b/gcc/hash-map-tests.c
@@ -53,7 +53,7 @@ test_map_of_strings_to_int ()
const char *eric = "half a bee";
/* A fresh hash_map should be empty. */
- ASSERT_EQ (0, m.elements ());
+ ASSERT_TRUE (m.is_empty ());
ASSERT_EQ (NULL, m.get (ostrich));
/* Populate the hash_map. */