aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-compile-expr.h
diff options
context:
space:
mode:
authorPhilip Herron <philip.herron@embecosm.com>2021-07-20 20:06:14 +0100
committerPhilip Herron <philip.herron@embecosm.com>2021-07-20 20:06:14 +0100
commit857953b3c70a170955afb181018b0231a16a63df (patch)
tree63ca1463f6aecb90ec27a1a32adf22ecddde799a /gcc/rust/backend/rust-compile-expr.h
parent02713d245aaffd45d8daaf8c914b1dda5baa6eb4 (diff)
downloadgcc-857953b3c70a170955afb181018b0231a16a63df.zip
gcc-857953b3c70a170955afb181018b0231a16a63df.tar.gz
gcc-857953b3c70a170955afb181018b0231a16a63df.tar.bz2
HIR and GENERIC lowering for unsafe blocks
This does not implement the rules for unsafe this wires up the code so we can compile unsafe blocks. No checks are being performed on the code yet. Fixes #382
Diffstat (limited to 'gcc/rust/backend/rust-compile-expr.h')
-rw-r--r--gcc/rust/backend/rust-compile-expr.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/rust/backend/rust-compile-expr.h b/gcc/rust/backend/rust-compile-expr.h
index fc8ad81..dff4712 100644
--- a/gcc/rust/backend/rust-compile-expr.h
+++ b/gcc/rust/backend/rust-compile-expr.h
@@ -527,6 +527,11 @@ public:
}
}
+ void visit (HIR::UnsafeBlockExpr &expr) override
+ {
+ expr.get_block_expr ()->accept_vis (*this);
+ }
+
void visit (HIR::StructExprStruct &struct_expr) override
{
TyTy::BaseType *tyty = nullptr;