From accf94329d61933e6c58c1d7815fb08d8fc2afa5 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Wed, 1 Sep 2021 16:48:55 +0200 Subject: [PATCH] Simplify 'gcc/diagnostic-spec.h:nowarn_map' setup If we've just read something from the map, we can be sure that it exists. gcc/ * warning-control.cc (copy_warning): Remove 'nowarn_map' setup. --- gcc/warning-control.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/gcc/warning-control.cc b/gcc/warning-control.cc index ec8ed2327630..9c506e163d67 100644 --- a/gcc/warning-control.cc +++ b/gcc/warning-control.cc @@ -188,9 +188,7 @@ void copy_warning (ToType to, FromType from) /* If there's an entry in the map the no-warning bit must be set. */ gcc_assert (get_no_warning_bit (from)); - if (!nowarn_map) - nowarn_map = xint_hash_map_t::create_ggc (32); - + gcc_checking_assert (nowarn_map); nowarn_map->put (to_key, *from_map); set_no_warning_bit (to, true); } -- 2.47.2