aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-compile-expr.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/rust/backend/rust-compile-expr.h')
-rw-r--r--gcc/rust/backend/rust-compile-expr.h17
1 files changed, 1 insertions, 16 deletions
diff --git a/gcc/rust/backend/rust-compile-expr.h b/gcc/rust/backend/rust-compile-expr.h
index 8ed84c7..bdcc5b6 100644
--- a/gcc/rust/backend/rust-compile-expr.h
+++ b/gcc/rust/backend/rust-compile-expr.h
@@ -388,22 +388,7 @@ public:
ctx->add_statement (assignment);
}
- void visit (HIR::CompoundAssignmentExpr &expr) override
- {
- fncontext fn = ctx->peek_fn ();
- auto lvalue = CompileExpr::Compile (expr.get_left_expr ().get (), ctx);
- auto rvalue = CompileExpr::Compile (expr.get_right_expr ().get (), ctx);
-
- auto op = expr.get_expr_type ();
- auto operator_expr = ctx->get_backend ()->arithmetic_or_logical_expression (
- op, lvalue, rvalue, expr.get_locus ());
-
- Bstatement *assignment
- = ctx->get_backend ()->assignment_statement (fn.fndecl, lvalue,
- operator_expr,
- expr.get_locus ());
- ctx->add_statement (assignment);
- }
+ void visit (HIR::CompoundAssignmentExpr &expr) override;
void visit (HIR::ArrayIndexExpr &expr) override
{