diff options
author | Philip Herron <philip.herron@embecosm.com> | 2022-02-10 15:40:23 +0000 |
---|---|---|
committer | Philip Herron <philip.herron@embecosm.com> | 2022-02-10 15:40:55 +0000 |
commit | 859732e4d167dfe83b29cebc757f21ba2c342f33 (patch) | |
tree | 2616a6c1fdc52ae274b836a055e710f19bc59ffb /gcc/rust/backend/rust-compile-expr.h | |
parent | f6ba472caf42db1f5f2f98b73afccf448b36c322 (diff) | |
download | gcc-859732e4d167dfe83b29cebc757f21ba2c342f33.zip gcc-859732e4d167dfe83b29cebc757f21ba2c342f33.tar.gz gcc-859732e4d167dfe83b29cebc757f21ba2c342f33.tar.bz2 |
Remove AddressTakenContext
We can reuse more C front-end code c_mark_addressable can be used instead
of trying to track TREE_ADDRESSABLE as part of type-checking. This also
pulls the GCC::Backend::address_expression to be part of the HIRCompileBase
class during code-generation.
Diffstat (limited to 'gcc/rust/backend/rust-compile-expr.h')
-rw-r--r-- | gcc/rust/backend/rust-compile-expr.h | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/gcc/rust/backend/rust-compile-expr.h b/gcc/rust/backend/rust-compile-expr.h index 43eff72..592d280 100644 --- a/gcc/rust/backend/rust-compile-expr.h +++ b/gcc/rust/backend/rust-compile-expr.h @@ -797,13 +797,7 @@ public: ctx->add_statement (goto_label); } - void visit (HIR::BorrowExpr &expr) override - { - tree main_expr = CompileExpr::Compile (expr.get_expr ().get (), ctx); - - translated - = ctx->get_backend ()->address_expression (main_expr, expr.get_locus ()); - } + void visit (HIR::BorrowExpr &expr) override; void visit (HIR::DereferenceExpr &expr) override; |