diff options
author | David Faust <david.faust@oracle.com> | 2021-11-15 09:49:38 -0800 |
---|---|---|
committer | David Faust <david.faust@oracle.com> | 2021-11-16 13:12:53 -0800 |
commit | 95048daaffa5e16df4d663702fe80294eac7b85e (patch) | |
tree | b56f8e72ac7161b460b8e8455d1c957330680790 /gcc/rust/backend/rust-compile.cc | |
parent | 553e88f1dd4b4794334ee6d1861c185b92361a0b (diff) | |
download | gcc-95048daaffa5e16df4d663702fe80294eac7b85e.zip gcc-95048daaffa5e16df4d663702fe80294eac7b85e.tar.gz gcc-95048daaffa5e16df4d663702fe80294eac7b85e.tar.bz2 |
Replace Bfunction with GCC tree
Diffstat (limited to 'gcc/rust/backend/rust-compile.cc')
-rw-r--r-- | gcc/rust/backend/rust-compile.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/rust/backend/rust-compile.cc b/gcc/rust/backend/rust-compile.cc index 8b74c77..71435f3 100644 --- a/gcc/rust/backend/rust-compile.cc +++ b/gcc/rust/backend/rust-compile.cc @@ -322,7 +322,7 @@ void CompileBlock::visit (HIR::BlockExpr &expr) { fncontext fnctx = ctx->peek_fn (); - Bfunction *fndecl = fnctx.fndecl; + tree fndecl = fnctx.fndecl; Location start_location = expr.get_locus (); Location end_location = expr.get_closing_locus (); auto body_mappings = expr.get_mappings (); @@ -393,7 +393,7 @@ void CompileConditionalBlocks::visit (HIR::IfExpr &expr) { fncontext fnctx = ctx->peek_fn (); - Bfunction *fndecl = fnctx.fndecl; + tree fndecl = fnctx.fndecl; tree condition_expr = CompileExpr::Compile (expr.get_if_condition (), ctx); Bblock *then_block = CompileBlock::compile (expr.get_if_block (), ctx, result); @@ -407,7 +407,7 @@ void CompileConditionalBlocks::visit (HIR::IfExprConseqElse &expr) { fncontext fnctx = ctx->peek_fn (); - Bfunction *fndecl = fnctx.fndecl; + tree fndecl = fnctx.fndecl; tree condition_expr = CompileExpr::Compile (expr.get_if_condition (), ctx); Bblock *then_block = CompileBlock::compile (expr.get_if_block (), ctx, result); @@ -423,7 +423,7 @@ void CompileConditionalBlocks::visit (HIR::IfExprConseqIf &expr) { fncontext fnctx = ctx->peek_fn (); - Bfunction *fndecl = fnctx.fndecl; + tree fndecl = fnctx.fndecl; tree condition_expr = CompileExpr::Compile (expr.get_if_condition (), ctx); Bblock *then_block = CompileBlock::compile (expr.get_if_block (), ctx, result); @@ -478,7 +478,7 @@ CompileStructExprField::visit (HIR::StructExprFieldIdentifier &field) void HIRCompileBase::compile_function_body ( - Bfunction *fndecl, std::unique_ptr<HIR::BlockExpr> &function_body, + tree fndecl, std::unique_ptr<HIR::BlockExpr> &function_body, bool has_return_type) { for (auto &s : function_body->get_statements ()) @@ -523,7 +523,7 @@ HIRCompileBase::compile_function_body ( } bool -HIRCompileBase::compile_locals_for_block (Resolver::Rib &rib, Bfunction *fndecl, +HIRCompileBase::compile_locals_for_block (Resolver::Rib &rib, tree fndecl, std::vector<Bvariable *> &locals) { rib.iterate_decls ([&] (NodeId n, Location) mutable -> bool { |