]> git.ipfire.org Git - thirdparty/gcc.git/commit
Add location to BIR::Statement of kind RETURN
authorKushal Pal <kushalpal109@gmail.com>
Fri, 19 Jul 2024 07:30:03 +0000 (07:30 +0000)
committerCohenArthur <arthur.cohen@embecosm.com>
Fri, 2 Aug 2024 11:41:15 +0000 (11:41 +0000)
commit155f6a9c80854b2181fdcd9e230ff8359f63fc27
treed0129f123d31c56db4a384c166a59bd3cb945489
parent812c5347bc088783ac3587f3ffab709968a7e628
Add location to BIR::Statement of kind RETURN

This commit adds location_t to BIR::Statement where type is RETURN.

gcc/rust/ChangeLog:

* checks/errors/borrowck/rust-bir-builder-expr-stmt.cc (ExprStmtBuilder::visit):
Add location parameter.
* checks/errors/borrowck/rust-bir-builder.h: Likewise.
* checks/errors/borrowck/rust-bir-builder-internal.h: Add helper
function for pushing return statements.
* checks/errors/borrowck/rust-bir.h: Remove `expr` parameter as
it is only needed for ASSIGNMENT statements, for which we
already have a constructor.

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-builder.h
gcc/rust/checks/errors/borrowck/rust-bir.h