aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/hir/tree/rust-hir-expr.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/rust/hir/tree/rust-hir-expr.h')
-rw-r--r--gcc/rust/hir/tree/rust-hir-expr.h67
1 files changed, 0 insertions, 67 deletions
diff --git a/gcc/rust/hir/tree/rust-hir-expr.h b/gcc/rust/hir/tree/rust-hir-expr.h
index f0e9a36..3bfadbf 100644
--- a/gcc/rust/hir/tree/rust-hir-expr.h
+++ b/gcc/rust/hir/tree/rust-hir-expr.h
@@ -3092,73 +3092,6 @@ protected:
}
};
-// For loop expression HIR node (iterator loop)
-class ForLoopExpr : public BaseLoopExpr
-{
- std::unique_ptr<Pattern> pattern;
- std::unique_ptr<Expr> iterator_expr;
-
-public:
- std::string as_string () const override;
-
- // Constructor with loop label
- ForLoopExpr (Analysis::NodeMapping mappings,
- std::unique_ptr<Pattern> loop_pattern,
- std::unique_ptr<Expr> iterator_expr,
- std::unique_ptr<BlockExpr> loop_body, location_t locus,
- LoopLabel loop_label,
- AST::AttrVec outer_attribs = AST::AttrVec ())
- : BaseLoopExpr (std::move (mappings), std::move (loop_body), locus,
- std::move (loop_label), std::move (outer_attribs)),
- pattern (std::move (loop_pattern)),
- iterator_expr (std::move (iterator_expr))
- {}
-
- // Copy constructor with clone
- ForLoopExpr (ForLoopExpr const &other)
- : BaseLoopExpr (other), pattern (other.pattern->clone_pattern ()),
- iterator_expr (other.iterator_expr->clone_expr ())
- {}
-
- // Overloaded assignment operator to clone
- ForLoopExpr &operator= (ForLoopExpr const &other)
- {
- BaseLoopExpr::operator= (other);
- pattern = other.pattern->clone_pattern ();
- iterator_expr = other.iterator_expr->clone_expr ();
- /*loop_block = other.loop_block->clone_block_expr();
- loop_label = other.loop_label;
- outer_attrs = other.outer_attrs;*/
-
- return *this;
- }
-
- // move constructors
- ForLoopExpr (ForLoopExpr &&other) = default;
- ForLoopExpr &operator= (ForLoopExpr &&other) = default;
-
- void accept_vis (HIRFullVisitor &vis) override;
- void accept_vis (HIRExpressionVisitor &vis) override;
-
- std::unique_ptr<Expr> &get_iterator_expr () { return iterator_expr; }
- std::unique_ptr<Pattern> &get_pattern () { return pattern; };
-
-protected:
- /* Use covariance to implement clone function as returning this object rather
- * than base */
- ForLoopExpr *clone_expr_impl () const override
- {
- return new ForLoopExpr (*this);
- }
-
- /* Use covariance to implement clone function as returning this object rather
- * than base */
- ForLoopExpr *clone_expr_with_block_impl () const override
- {
- return new ForLoopExpr (*this);
- }
-};
-
// forward decl for IfExpr
class IfLetExpr;