]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdb/objfiles: use filtered_iterator as objfile::section_iterator
authorSimon Marchi <simon.marchi@efficios.com>
Thu, 28 Aug 2025 15:10:51 +0000 (11:10 -0400)
committerSimon Marchi <simon.marchi@polymtl.ca>
Fri, 29 Aug 2025 20:12:08 +0000 (16:12 -0400)
commit02ecff0c714254cd5a67b55a6d11d62cfd904dbc
treea1eda11fbeb58adc3ae4349f28816e563ce10707
parent1e10e9ea96a4141080a7cd7322babe6bcd7c42ba
gdb/objfiles: use filtered_iterator as objfile::section_iterator

objfile::section_iterator looks like a good candidate to be implemented
with filtered_iterator.  Following the enhancements to filtered_iterator
in the previous patch, it's pretty straighforward.

I removed the non-const version of objfile::sections, because it didn't
seem useful to have the two methods returning the exact same type and
value.  Having just the const version achieves the same thing.

Change-Id: I2f29c2fb3f95605cb816cc1ff8935c10e0496052
Approved-By: Tom Tromey <tom@tromey.com>
gdb/objfiles.h