Add some hash_map_safe_* functions like vec_safe_*.
authorJason Merrill <jason@redhat.com>
Wed, 2 Oct 2019 19:26:47 +0000 (15:26 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Wed, 2 Oct 2019 19:26:47 +0000 (15:26 -0400)
commitc89844e5d30a5235960a2c627abc9369306fda61
tree49f593d8b44f2a0038aa8a77148c902c63381b29
parentd61bff850d13ff103de3c2fb13d5e371996e1a3c
Add some hash_map_safe_* functions like vec_safe_*.

gcc/
* hash-map.h (default_hash_map_size): New variable.
(create_ggc): Use it as default argument.
(hash_map_maybe_create, hash_map_safe_get)
(hash_map_safe_get_or_insert, hash_map_safe_put): New fns.
gcc/cp/
* constexpr.c (maybe_initialize_fundef_copies_table): Remove.
(get_fundef_copy): Use hash_map_safe_get_or_insert.
* cp-objcp-common.c (cp_get_debug_type): Use hash_map_safe_*.
* decl.c (store_decomp_type): Remove.
(cp_finish_decomp): Use hash_map_safe_put.
* init.c (get_nsdmi): Use hash_map_safe_*.
* pt.c (store_defaulted_ttp, lookup_defaulted_ttp): Remove.
(add_defaults_to_ttp): Use hash_map_safe_*.

From-SVN: r276484
gcc/ChangeLog
gcc/cp/ChangeLog
gcc/cp/constexpr.c
gcc/cp/cp-objcp-common.c
gcc/cp/decl.c
gcc/cp/init.c
gcc/cp/pt.c
gcc/hash-map.h
gcc/hash-table.c