diff options
author | Owen Avery <powerboat9.gamer@gmail.com> | 2024-04-25 12:19:51 -0400 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2025-03-17 16:35:22 +0100 |
commit | 40b40970e648bd5f9a2edd2d8273544685176848 (patch) | |
tree | 5242ca4a5483c9b5e1493fcb8a8e1164fb00f433 /gcc/rust/backend/rust-compile-base.cc | |
parent | fd788dd543017cd801657b82bf80bb78e03479ed (diff) | |
download | gcc-40b40970e648bd5f9a2edd2d8273544685176848.zip gcc-40b40970e648bd5f9a2edd2d8273544685176848.tar.gz gcc-40b40970e648bd5f9a2edd2d8273544685176848.tar.bz2 |
gccrs: Remove unused Context parameter for some backend methods
gcc/rust/ChangeLog:
* backend/rust-compile-base.cc
(HIRCompileBase::compile_function_body):
Adjust unit_expression calls.
(HIRCompileBase::unit_expression):
Remove unused Context parameter.
* backend/rust-compile-base.h
(HIRCompileBase::unit_expression): Likewise.
* backend/rust-compile-block.cc
(CompileBlock::visit): Adjust unit_expression calls.
* backend/rust-compile-expr.cc
(CompileExpr::visit): Likewise.
* backend/rust-compile-pattern.cc
(CompilePatternLet::visit): Likewise.
* backend/rust-compile-resolve-path.cc
(ResolvePathRef::attempt_constructor_expression_lookup):
Likewise.
* backend/rust-compile-type.cc
(TyTyResolveCompile::get_implicit_enumeral_node_type):
Remove unused Context parameter.
(TyTyResolveCompile::get_unit_type):
Likewise.
(TyTyResolveCompile::visit):
Adjust get_implicit_enumeral_node_type and get_unit_type calls.
* backend/rust-compile-type.h
(TyTyResolveCompile::get_implicit_enumeral_node_type):
Remove unused Context parameter.
(TyTyResolveCompile::get_unit_type):
Likewise.
Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
Diffstat (limited to 'gcc/rust/backend/rust-compile-base.cc')
-rw-r--r-- | gcc/rust/backend/rust-compile-base.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/rust/backend/rust-compile-base.cc b/gcc/rust/backend/rust-compile-base.cc index e313820..64ac121 100644 --- a/gcc/rust/backend/rust-compile-base.cc +++ b/gcc/rust/backend/rust-compile-base.cc @@ -611,7 +611,7 @@ HIRCompileBase::compile_function_body (tree fndecl, ctx->add_statement (return_value); // now just return unit expression - tree unit_expr = unit_expression (ctx, locus); + tree unit_expr = unit_expression (locus); tree return_stmt = Backend::return_statement (fndecl, unit_expr, locus); ctx->add_statement (return_stmt); @@ -622,7 +622,7 @@ HIRCompileBase::compile_function_body (tree fndecl, // we can only do this if the function is of unit type otherwise other // errors should have occurred location_t locus = function_body.get_locus (); - tree return_value = unit_expression (ctx, locus); + tree return_value = unit_expression (locus); tree return_stmt = Backend::return_statement (fndecl, return_value, locus); ctx->add_statement (return_stmt); @@ -991,9 +991,9 @@ HIRCompileBase::resolve_method_address (TyTy::FnType *fntype, } tree -HIRCompileBase::unit_expression (Context *ctx, location_t locus) +HIRCompileBase::unit_expression (location_t locus) { - tree unit_type = TyTyResolveCompile::get_unit_type (ctx); + tree unit_type = TyTyResolveCompile::get_unit_type (); return Backend::constructor_expression (unit_type, false, {}, -1, locus); } |