]> git.ipfire.org Git - thirdparty/gcc.git/commit
RISC-V: Implement full-featured iterator for riscv_subset_list [NFC]
authorKito Cheng <kito.cheng@sifive.com>
Mon, 26 May 2025 06:43:47 +0000 (14:43 +0800)
committerKito Cheng <kito.cheng@sifive.com>
Mon, 2 Jun 2025 06:47:18 +0000 (14:47 +0800)
commit54e9cb8ec2633764b59746101883f9c3397125e5
treead5e630ae7849e49761f5ad67ef2d67d3cc6f474
parent08c299a410b9314957e48a87f5bf50a4c034b744
RISC-V: Implement full-featured iterator for riscv_subset_list [NFC]

This commit implements a full-featured iterator for the
riscv_subset_list, that it able to use range-based-for-loop.

That could simplfy the code in the future, and make it more readable,
also more compatible with standard C++ containers.

gcc/ChangeLog:

* config/riscv/riscv-c.cc (riscv_cpu_cpp_builtins): Use
range-based-for-loop.
* config/riscv/riscv-subset.h (riscv_subset_list::iterator):
New.
(riscv_subset_list::const_iterator): New.
gcc/config/riscv/riscv-c.cc
gcc/config/riscv/riscv-subset.h