]> git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: Used `IndexVec` for BasicBlocks
authorKushal Pal <kushalpal109@gmail.com>
Mon, 19 Aug 2024 10:06:49 +0000 (10:06 +0000)
committerArthur Cohen <arthur.cohen@embecosm.com>
Wed, 19 Mar 2025 14:32:09 +0000 (15:32 +0100)
commit139304f77910315e163210a6d92bff05319e0808
treea04519bef19f765ee2c33194a1896e588f503068
parent7ec5d6bcbff36d98ae3dce2b928ae1202d208e48
gccrs: Used `IndexVec` for BasicBlocks

gcc/rust/ChangeLog:

* checks/errors/borrowck/rust-bir-builder-expr-stmt.cc
(ExprStmtBuilder::visit): Use strong type as index and
remove access to numeric value.
* checks/errors/borrowck/rust-bir-builder-internal.h
(struct BuilderContext): Likewise.
* checks/errors/borrowck/rust-bir-dump.cc (simplify_cfg):
Likewise.
(Dump::go): Likewise.
(Dump::visit): Likewise.
* checks/errors/borrowck/rust-bir-fact-collector.h
(class FactCollector): Likewise.
(points): Likewise.
* checks/errors/borrowck/rust-bir.h (struct BasicBlockId): Used
IndexVec for BasicBlocks.
(struct Function): Likewise.
* checks/errors/borrowck/rust-borrow-checker-diagnostics.cc
(BorrowCheckerDiagnostics::get_statement): Change the extracted
index to strong type.

Signed-off-by: Kushal Pal <kushalpal109@gmail.com>
gcc/rust/checks/errors/borrowck/rust-bir-builder-expr-stmt.cc
gcc/rust/checks/errors/borrowck/rust-bir-builder-internal.h
gcc/rust/checks/errors/borrowck/rust-bir-dump.cc
gcc/rust/checks/errors/borrowck/rust-bir-fact-collector.h
gcc/rust/checks/errors/borrowck/rust-bir.h
gcc/rust/checks/errors/borrowck/rust-borrow-checker-diagnostics.cc