projects
/
platform
/
upstream
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
76b7501
)
Simplify 'gcc/diagnostic-spec.h:nowarn_map' setup
author
Thomas Schwinge
<thomas@codesourcery.com>
Wed, 1 Sep 2021 14:48:55 +0000
(16:48 +0200)
committer
Thomas Schwinge
<thomas@codesourcery.com>
Mon, 13 Sep 2021 16:38:50 +0000
(18:38 +0200)
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
patch
|
blob
|
history
diff --git
a/gcc/warning-control.cc
b/gcc/warning-control.cc
index
ec8ed23
..
9c506e1
100644
(file)
--- 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);
}