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.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/rust/backend/rust-compile-expr.h b/gcc/rust/backend/rust-compile-expr.h
index 6ea97ee..5c3206a 100644
--- a/gcc/rust/backend/rust-compile-expr.h
+++ b/gcc/rust/backend/rust-compile-expr.h
@@ -211,6 +211,15 @@ public:
});
}
+ void visit (HIR::ArrayElemsCopied &elems)
+ {
+ Bexpression *translated_expr
+ = CompileExpr::Compile (elems.get_elem_to_copy (), ctx);
+
+ for (size_t i = 0; i < elems.get_num_elements (); ++i)
+ constructor.push_back (translated_expr);
+ }
+
void visit (HIR::ArithmeticOrLogicalExpr &expr)
{
Operator op;