diff options
author | Thomas Schwinge <thomas@codesourcery.com> | 2021-09-01 16:48:55 +0200 |
---|---|---|
committer | Thomas Schwinge <thomas@codesourcery.com> | 2021-09-13 18:38:50 +0200 |
commit | accf94329d61933e6c58c1d7815fb08d8fc2afa5 (patch) | |
tree | 58c94c836fd718989e4fc07591a49778d9b8a2c0 /gcc | |
parent | 76b75018b3d053a890ebe155e47814de14b3c9fb (diff) | |
download | gcc-accf94329d61933e6c58c1d7815fb08d8fc2afa5.zip gcc-accf94329d61933e6c58c1d7815fb08d8fc2afa5.tar.gz gcc-accf94329d61933e6c58c1d7815fb08d8fc2afa5.tar.bz2 |
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.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/warning-control.cc | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/gcc/warning-control.cc b/gcc/warning-control.cc index ec8ed232..9c506e1 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); } |