diff options
author | Tom Tromey <tom@tromey.com> | 2023-01-19 20:14:25 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2023-02-19 12:51:06 -0700 |
commit | 1c49bb455c2b401b508b3f3d5924ba461e153ad4 (patch) | |
tree | e89df3f1f33eb458fb41d075ba57a43c5c072ed2 /gdb/compile | |
parent | 0f50815c894bea5d8f7c14b7c1639325bd0b4abb (diff) | |
download | binutils-1c49bb455c2b401b508b3f3d5924ba461e153ad4.zip binutils-1c49bb455c2b401b508b3f3d5924ba461e153ad4.tar.gz binutils-1c49bb455c2b401b508b3f3d5924ba461e153ad4.tar.bz2 |
Convert explicit iterator uses to foreach
This converts most existing explicit uses of block_iterator to use
foreach with the range iterator instead.
Diffstat (limited to 'gdb/compile')
-rw-r--r-- | gdb/compile/compile-c-symbols.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/gdb/compile/compile-c-symbols.c b/gdb/compile/compile-c-symbols.c index 73b4c4d..c47af4a 100644 --- a/gdb/compile/compile-c-symbols.c +++ b/gdb/compile/compile-c-symbols.c @@ -633,14 +633,9 @@ generate_c_for_variable_locations (compile_instance *compiler, while (1) { - struct symbol *sym; - struct block_iterator iter; - /* Iterate over symbols in this block, generating code to compute the location of each local variable. */ - for (sym = block_iterator_first (block, &iter); - sym != NULL; - sym = block_iterator_next (&iter)) + for (struct symbol *sym : block_iterator_range (block)) { if (!symbol_seen (symhash.get (), sym)) generate_c_for_for_one_variable (compiler, stream, gdbarch, |