diff options
author | David Faust <david.faust@oracle.com> | 2021-11-15 10:12:20 -0800 |
---|---|---|
committer | David Faust <david.faust@oracle.com> | 2021-11-16 13:15:54 -0800 |
commit | a4e5aee5863c7d898ee640296bc837e0baa8e796 (patch) | |
tree | f40c90287ae41fa3689cdc38d4bb021fb6cc8394 /gcc/rust/backend/rust-compile-expr.h | |
parent | 95048daaffa5e16df4d663702fe80294eac7b85e (diff) | |
download | gcc-a4e5aee5863c7d898ee640296bc837e0baa8e796.zip gcc-a4e5aee5863c7d898ee640296bc837e0baa8e796.tar.gz gcc-a4e5aee5863c7d898ee640296bc837e0baa8e796.tar.bz2 |
Replace Bblock with GCC tree
Diffstat (limited to 'gcc/rust/backend/rust-compile-expr.h')
-rw-r--r-- | gcc/rust/backend/rust-compile-expr.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gcc/rust/backend/rust-compile-expr.h b/gcc/rust/backend/rust-compile-expr.h index f739273..52cc58a 100644 --- a/gcc/rust/backend/rust-compile-expr.h +++ b/gcc/rust/backend/rust-compile-expr.h @@ -514,7 +514,7 @@ public: if (needs_temp) { fncontext fnctx = ctx->peek_fn (); - Bblock *enclosing_scope = ctx->peek_enclosing_scope (); + tree enclosing_scope = ctx->peek_enclosing_scope (); tree block_type = TyTyResolveCompile::compile (ctx, if_type); bool is_address_taken = false; @@ -551,7 +551,7 @@ public: if (needs_temp) { fncontext fnctx = ctx->peek_fn (); - Bblock *enclosing_scope = ctx->peek_enclosing_scope (); + tree enclosing_scope = ctx->peek_enclosing_scope (); tree block_type = TyTyResolveCompile::compile (ctx, if_type); bool is_address_taken = false; @@ -587,7 +587,7 @@ public: if (needs_temp) { fncontext fnctx = ctx->peek_fn (); - Bblock *enclosing_scope = ctx->peek_enclosing_scope (); + tree enclosing_scope = ctx->peek_enclosing_scope (); tree block_type = TyTyResolveCompile::compile (ctx, block_tyty); bool is_address_taken = false; @@ -740,7 +740,7 @@ public: bool needs_temp = !block_tyty->is_unit (); if (needs_temp) { - Bblock *enclosing_scope = ctx->peek_enclosing_scope (); + tree enclosing_scope = ctx->peek_enclosing_scope (); tree block_type = TyTyResolveCompile::compile (ctx, block_tyty); bool is_address_taken = false; @@ -773,7 +773,7 @@ public: ctx->add_statement (loop_begin_label_decl); ctx->push_loop_begin_label (loop_begin_label); - Bblock *code_block + tree code_block = CompileBlock::compile (expr.get_loop_block ().get (), ctx, nullptr); tree loop_expr = ctx->get_backend ()->loop_expression (code_block, expr.get_locus ()); @@ -811,8 +811,8 @@ public: Location start_location = expr.get_loop_block ()->get_locus (); Location end_location = expr.get_loop_block ()->get_locus (); // FIXME - Bblock *enclosing_scope = ctx->peek_enclosing_scope (); - Bblock *loop_block + tree enclosing_scope = ctx->peek_enclosing_scope (); + tree loop_block = ctx->get_backend ()->block (fnctx.fndecl, enclosing_scope, locals, start_location, end_location); ctx->push_block (loop_block); @@ -832,7 +832,7 @@ public: = ctx->get_backend ()->expression_statement (fnctx.fndecl, exit_expr); ctx->add_statement (break_stmt); - Bblock *code_block + tree code_block = CompileBlock::compile (expr.get_loop_block ().get (), ctx, nullptr); tree code_block_stmt = ctx->get_backend ()->block_statement (code_block); ctx->add_statement (code_block_stmt); |