]> 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)
committerCohenArthur <arthur.cohen@embecosm.com>
Thu, 10 Apr 2025 15:53:50 +0000 (15:53 +0000)
commitf20261115987df04a9e62dd9e857561fb1530c8e
treee2222902f7e022ce5f6b842c04fa85bdbc1b3328
parent4b64c35a8f6093eb3851f9149e2465117c392492
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