]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Change type::fields to return an array_view
authorTom Tromey <tromey@adacore.com>
Fri, 1 Aug 2025 17:11:41 +0000 (11:11 -0600)
committerTom Tromey <tromey@adacore.com>
Tue, 12 Aug 2025 14:30:37 +0000 (08:30 -0600)
commit89495c33260b3f637acb8f79181cc6db08771f90
tree525da36fc4d6846f8b8b34ae12c449b414d38dbc
parent55c91b7e5c7f7829ff69738f159e0380383a7356
Change type::fields to return an array_view

This patch changes type::fields to return an array_view of the fields,
then fixes up the fallout.

More cleanups would be possible here (in particular in the field
initialization code) but I haven't done so.

The main motivation for this patch was to make it simpler to iterate
over the fields of a type.

Regression tested on x86-64 Fedora 41.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
14 files changed:
gdb/ada-lang.c
gdb/amd64-tdep.c
gdb/c-typeprint.c
gdb/dwarf2/read.c
gdb/eval.c
gdb/f-typeprint.c
gdb/gdbtypes.c
gdb/gdbtypes.h
gdb/guile/scm-type.c
gdb/mdebugread.c
gdb/python/py-type.c
gdb/rust-lang.c
gdb/stabsread.c
gdb/valops.c