aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-compile-item.h
diff options
context:
space:
mode:
authorDavid Faust <david.faust@oracle.com>2021-11-15 11:17:26 -0800
committerDavid Faust <david.faust@oracle.com>2021-11-16 13:04:58 -0800
commitb52a68d2d8676ea378f0fbb6726639cc80402542 (patch)
treefa70c52eb6f879864fa76908a2cf670b50d88e48 /gcc/rust/backend/rust-compile-item.h
parent7a751f354a91a8459b877c60a5e5d78203aeb3ce (diff)
downloadgcc-b52a68d2d8676ea378f0fbb6726639cc80402542.zip
gcc-b52a68d2d8676ea378f0fbb6726639cc80402542.tar.gz
gcc-b52a68d2d8676ea378f0fbb6726639cc80402542.tar.bz2
Replace Bexpression with GCC tree
Diffstat (limited to 'gcc/rust/backend/rust-compile-item.h')
-rw-r--r--gcc/rust/backend/rust-compile-item.h17
1 files changed, 8 insertions, 9 deletions
diff --git a/gcc/rust/backend/rust-compile-item.h b/gcc/rust/backend/rust-compile-item.h
index 87c577c..95de611 100644
--- a/gcc/rust/backend/rust-compile-item.h
+++ b/gcc/rust/backend/rust-compile-item.h
@@ -37,11 +37,10 @@ protected:
using Rust::Compile::HIRCompileBase::visit;
public:
- static Bexpression *compile (HIR::Item *item, Context *ctx,
- bool compile_fns = true,
- TyTy::BaseType *concrete = nullptr,
- bool is_query_mode = false,
- Location ref_locus = Location ())
+ static tree compile (HIR::Item *item, Context *ctx, bool compile_fns = true,
+ TyTy::BaseType *concrete = nullptr,
+ bool is_query_mode = false,
+ Location ref_locus = Location ())
{
CompileItem compiler (ctx, compile_fns, concrete, ref_locus);
item->accept_vis (compiler);
@@ -62,7 +61,7 @@ public:
rust_assert (ok);
tree type = TyTyResolveCompile::compile (ctx, resolved_type);
- Bexpression *value = CompileExpr::Compile (var.get_expr (), ctx);
+ tree value = CompileExpr::Compile (var.get_expr (), ctx);
const Resolver::CanonicalPath *canonical_path = nullptr;
ok = ctx->get_mappings ()->lookup_canonical_path (
@@ -98,7 +97,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 (
@@ -107,7 +106,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 ());
@@ -347,7 +346,7 @@ protected:
bool compile_fns;
TyTy::BaseType *concrete;
- Bexpression *reference;
+ tree reference;
Location ref_locus;
};