]> git.ipfire.org Git - thirdparty/gcc.git/commit
rust: use range for inside rust-gcc.cc [PR119341]
authorAndrew Pinski <quic_apinski@quicinc.com>
Thu, 20 Mar 2025 00:30:01 +0000 (17:30 -0700)
committerArthur Cohen <arthur.cohen@embecosm.com>
Mon, 14 Apr 2025 16:23:52 +0000 (18:23 +0200)
commitec2edeffedeaaeceecf8c85fded9fd2ee3c1aa52
tree0d371089c16ad4e14f4982bbde01052fc8373bb4
parenta2db03fdf37ba823c9acf479aaed841b7d0de761
rust: use range for inside rust-gcc.cc [PR119341]

There are some places inside rust-gcc.cc which are candidates
to use range for instead of iterators directly. This changes
the locations I saw and makes the code slightly more readable.

gcc/rust/ChangeLog:

PR rust/119341
* rust-gcc.cc (function_type): Use range fors.
(function_type_variadic): Likewise.
(fill_in_fields): Likewise.
(statement_list): Likewise.
(block): Likewise.
(block_add_statements): Likewise.
(function_set_parameters): Likewise.
(write_global_definitions): Likewise.

Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
gcc/rust/rust-gcc.cc