Remove ALL_OBJFILE_FILETABS

This removes ALL_OBJFILE_FILETABS, replacing its uses with ranged for
loops.

gdb/ChangeLog
2019-01-09  Tom Tromey  <tom@tromey.com>

	* symmisc.c (print_objfile_statistics, dump_objfile)
	(maintenance_print_symbols): Use compunit_filetabs.
	* source.c (forget_cached_source_info_for_objfile): Use
	compunit_filetabs.
	* objfiles.h (ALL_OBJFILE_FILETABS): Remove.
	(ALL_FILETABS): Use compunit_filetabs.
	* objfiles.c (objfile_relocate1): Use compunit_filetabs.
	* coffread.c (coff_symtab_read): Use compunit_filetabs.
This commit is contained in:
Tom Tromey 2018-11-24 09:51:44 -07:00
parent 5accd1a07e
commit d5da8b3c0d
6 changed files with 81 additions and 56 deletions

View file

@ -612,12 +612,6 @@ public:
(obj) != NULL; \
(obj) = (obj)->next)
/* Traverse all symtabs in one objfile. */
#define ALL_OBJFILE_FILETABS(objfile, cu, s) \
for (compunit_symtab *cu : objfile_compunits (objfile)) \
for (symtab *s : compunit_filetabs (cu))
/* A range adapter that makes it possible to iterate over all
compunits in one objfile. */
@ -714,9 +708,10 @@ private:
/* Traverse all symtabs in all objfiles in the current symbol
space. */
#define ALL_FILETABS(objfile, ps, s) \
ALL_OBJFILES (objfile) \
ALL_OBJFILE_FILETABS (objfile, ps, s)
#define ALL_FILETABS(objfile, ps, s) \
ALL_OBJFILES (objfile) \
for (compunit_symtab *ps : objfile_compunits (objfile)) \
for (symtab *s : compunit_filetabs (cu))
#define ALL_OBJFILE_OSECTIONS(objfile, osect) \
for (osect = objfile->sections; osect < objfile->sections_end; osect++) \