Remove ALL_OBJFILE_OSECTIONS

This replaces ALL_OBJFILE_OSECTIONS with an iterator so that for-each
can be used.
This commit is contained in:
Tom Tromey
2023-04-10 10:43:32 -06:00
parent 9ed8433a04
commit 5250cbc85c
20 changed files with 295 additions and 277 deletions

View File

@@ -625,12 +625,10 @@ program_space::add_target_sections (void *owner,
void
program_space::add_target_sections (struct objfile *objfile)
{
struct obj_section *osect;
gdb_assert (objfile != nullptr);
/* Compute the number of sections to add. */
ALL_OBJFILE_OSECTIONS (objfile, osect)
for (obj_section *osect : objfile->sections ())
{
if (bfd_section_size (osect->the_bfd_section) == 0)
continue;