From 8e8d48f91c26cb4aabbdc56d96608e5d2310b986 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sun, 16 Apr 2023 09:10:02 -0600 Subject: Remove ALL_DICT_SYMBOLS This replaces ALL_DICT_SYMBOLS with an iterator so that for-each can be used. --- gdb/objfiles.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'gdb/objfiles.c') diff --git a/gdb/objfiles.c b/gdb/objfiles.c index 3fefc4a..5ba5f0a 100644 --- a/gdb/objfiles.c +++ b/gdb/objfiles.c @@ -625,9 +625,6 @@ objfile_relocate1 (struct objfile *objfile, for (block *b : bv->blocks ()) { - struct symbol *sym; - struct mdict_iterator miter; - b->set_start (b->start () + delta[block_line_section]); b->set_end (b->end () + delta[block_line_section]); @@ -639,10 +636,8 @@ objfile_relocate1 (struct objfile *objfile, /* We only want to iterate over the local symbols, not any symbols in included symtabs. */ - ALL_DICT_SYMBOLS (b->multidict (), miter, sym) - { - relocate_one_symbol (sym, objfile, delta); - } + for (struct symbol *sym : b->multidict_symbols ()) + relocate_one_symbol (sym, objfile, delta); } } -- cgit v1.1