summaryrefslogtreecommitdiff
path: root/gdb/symtab.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-01-19 20:21:10 -0700
committerTom Tromey <tom@tromey.com>2023-02-19 12:51:06 -0700
commita1b294260f4e43cfb7edb2a917accb82945ed310 (patch)
treee350a15d6bdf7e464df06cb8cbba357dec884458 /gdb/symtab.c
parent1c49bb455c2b401b508b3f3d5924ba461e153ad4 (diff)
downloadbinutils-gdb-a1b294260f4e43cfb7edb2a917accb82945ed310.tar.gz
Remove ALL_BLOCK_SYMBOLS_WITH_NAME
This removes ALL_BLOCK_SYMBOLS_WITH_NAME in favor of foreach.
Diffstat (limited to 'gdb/symtab.c')
-rw-r--r--gdb/symtab.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/gdb/symtab.c b/gdb/symtab.c
index d6dc323e83f..9508dcfc504 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -2771,10 +2771,7 @@ iterate_over_symbols (const struct block *block,
const domain_enum domain,
gdb::function_view<symbol_found_callback_ftype> callback)
{
- struct block_iterator iter;
- struct symbol *sym;
-
- ALL_BLOCK_SYMBOLS_WITH_NAME (block, name, iter, sym)
+ for (struct symbol *sym : block_iterator_range (block, &name))
{
if (symbol_matches_domain (sym->language (), sym->domain (), domain))
{