diff options
author | Philip Herron <philip.herron@embecosm.com> | 2022-02-11 10:02:46 +0000 |
---|---|---|
committer | Philip Herron <philip.herron@embecosm.com> | 2022-02-11 10:02:46 +0000 |
commit | df2dbbc0343afcca95d515d8843612b0334bc17b (patch) | |
tree | e762da6a57371929a844d3b526cca7d2ed84f345 /gcc/rust/backend/rust-compile-expr.h | |
parent | b2aa172ff69591452e3566c105f2a4cd8450eab5 (diff) | |
download | gcc-df2dbbc0343afcca95d515d8843612b0334bc17b.zip gcc-df2dbbc0343afcca95d515d8843612b0334bc17b.tar.gz gcc-df2dbbc0343afcca95d515d8843612b0334bc17b.tar.bz2 |
Remove error_mark_node wrappers from backend proxy class.
Diffstat (limited to 'gcc/rust/backend/rust-compile-expr.h')
-rw-r--r-- | gcc/rust/backend/rust-compile-expr.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/rust/backend/rust-compile-expr.h b/gcc/rust/backend/rust-compile-expr.h index 592d280..2fee3be 100644 --- a/gcc/rust/backend/rust-compile-expr.h +++ b/gcc/rust/backend/rust-compile-expr.h @@ -383,8 +383,8 @@ public: ctx->add_statement (ret_var_stmt); } - auto code_block = CompileBlock::compile (&expr, ctx, tmp); - auto block_stmt = ctx->get_backend ()->block_statement (code_block); + auto block_stmt = CompileBlock::compile (&expr, ctx, tmp); + rust_assert (TREE_CODE (block_stmt) == BIND_EXPR); ctx->add_statement (block_stmt); if (tmp != NULL) @@ -680,9 +680,9 @@ public: = ctx->get_backend ()->expression_statement (fnctx.fndecl, exit_expr); ctx->add_statement (break_stmt); - tree code_block + tree code_block_stmt = CompileBlock::compile (expr.get_loop_block ().get (), ctx, nullptr); - tree code_block_stmt = ctx->get_backend ()->block_statement (code_block); + rust_assert (TREE_CODE (code_block_stmt) == BIND_EXPR); ctx->add_statement (code_block_stmt); ctx->pop_loop_begin_label (); |