diff options
author | David Faust <david.faust@oracle.com> | 2021-11-15 11:17:26 -0800 |
---|---|---|
committer | David Faust <david.faust@oracle.com> | 2021-11-16 13:04:58 -0800 |
commit | b52a68d2d8676ea378f0fbb6726639cc80402542 (patch) | |
tree | fa70c52eb6f879864fa76908a2cf670b50d88e48 /gcc/rust/backend/rust-compile-stmt.h | |
parent | 7a751f354a91a8459b877c60a5e5d78203aeb3ce (diff) | |
download | gcc-b52a68d2d8676ea378f0fbb6726639cc80402542.zip gcc-b52a68d2d8676ea378f0fbb6726639cc80402542.tar.gz gcc-b52a68d2d8676ea378f0fbb6726639cc80402542.tar.bz2 |
Replace Bexpression with GCC tree
Diffstat (limited to 'gcc/rust/backend/rust-compile-stmt.h')
-rw-r--r-- | gcc/rust/backend/rust-compile-stmt.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/rust/backend/rust-compile-stmt.h b/gcc/rust/backend/rust-compile-stmt.h index 80566f6..604d9a5 100644 --- a/gcc/rust/backend/rust-compile-stmt.h +++ b/gcc/rust/backend/rust-compile-stmt.h @@ -31,7 +31,7 @@ class CompileStmt : public HIRCompileBase using Rust::Compile::HIRCompileBase::visit; public: - static Bexpression *Compile (HIR::Stmt *stmt, Context *ctx) + static tree Compile (HIR::Stmt *stmt, Context *ctx) { CompileStmt compiler (ctx); stmt->accept_vis (compiler); @@ -57,7 +57,7 @@ public: rust_assert (ok); tree type = TyTyResolveCompile::compile (ctx, resolved_type); - Bexpression *value = CompileExpr::Compile (constant.get_expr (), ctx); + tree value = CompileExpr::Compile (constant.get_expr (), ctx); const Resolver::CanonicalPath *canonical_path = nullptr; ok = ctx->get_mappings ()->lookup_canonical_path ( @@ -66,7 +66,7 @@ public: rust_assert (ok); std::string ident = canonical_path->get (); - Bexpression *const_expr + tree const_expr = ctx->get_backend ()->named_constant_expression (type, ident, value, constant.get_locus ()); @@ -101,7 +101,7 @@ public: return; } - Bexpression *init = CompileExpr::Compile (stmt.get_init_expr (), ctx); + tree init = CompileExpr::Compile (stmt.get_init_expr (), ctx); // FIXME use error_mark_node, check that CompileExpr returns error_mark_node // on failure and make this an assertion if (init == nullptr) @@ -132,7 +132,7 @@ public: private: CompileStmt (Context *ctx) : HIRCompileBase (ctx), translated (nullptr) {} - Bexpression *translated; + tree translated; }; } // namespace Compile |