mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-01-19 20:24:48 +08:00
libcc1: use foreach
This changes libcc1 to ues foreach in a couple of spots. libcc1 * libcp1plugin.cc (plugin_context::mark): Use foreach. * libcc1plugin.cc (plugin_context::mark): Use foreach.
This commit is contained in:
parent
1d9c972601
commit
7c4e5d5eaa
@ -235,17 +235,14 @@ plugin_context::plugin_context (int fd)
|
||||
void
|
||||
plugin_context::mark ()
|
||||
{
|
||||
for (hash_table<decl_addr_hasher>::iterator it = address_map.begin ();
|
||||
it != address_map.end ();
|
||||
++it)
|
||||
for (const auto &item : address_map)
|
||||
{
|
||||
ggc_mark ((*it)->decl);
|
||||
ggc_mark ((*it)->address);
|
||||
ggc_mark (item->decl);
|
||||
ggc_mark (item->address);
|
||||
}
|
||||
|
||||
for (hash_table< nofree_ptr_hash<tree_node> >::iterator
|
||||
it = preserved.begin (); it != preserved.end (); ++it)
|
||||
ggc_mark (&*it);
|
||||
for (const auto &item : preserved)
|
||||
ggc_mark (&item);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -225,17 +225,14 @@ plugin_context::plugin_context (int fd)
|
||||
void
|
||||
plugin_context::mark ()
|
||||
{
|
||||
for (hash_table<decl_addr_hasher>::iterator it = address_map.begin ();
|
||||
it != address_map.end ();
|
||||
++it)
|
||||
for (const auto &item : address_map)
|
||||
{
|
||||
ggc_mark ((*it)->decl);
|
||||
ggc_mark ((*it)->address);
|
||||
ggc_mark (item->decl);
|
||||
ggc_mark (item->address);
|
||||
}
|
||||
|
||||
for (hash_table< nofree_ptr_hash<tree_node> >::iterator
|
||||
it = preserved.begin (); it != preserved.end (); ++it)
|
||||
ggc_mark (&*it);
|
||||
for (const auto &item : preserved)
|
||||
ggc_mark (&item);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user