aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/ast/rust-expr.h
diff options
context:
space:
mode:
authorPhilip Herron <herron.philip@googlemail.com>2020-05-28 19:09:43 +0100
committerPhilip Herron <philip.herron@embecosm.com>2020-11-28 21:13:15 +0000
commit121ebe3f8338aeef47846cef83e4108c5e3aa0e6 (patch)
tree95fcac598e12c16f13dc489f531a7c4cb62a2c44 /gcc/rust/ast/rust-expr.h
parentab24b0549e3c0b358875d86c7528f301ddcc0e49 (diff)
downloadgcc-121ebe3f8338aeef47846cef83e4108c5e3aa0e6.zip
gcc-121ebe3f8338aeef47846cef83e4108c5e3aa0e6.tar.gz
gcc-121ebe3f8338aeef47846cef83e4108c5e3aa0e6.tar.bz2
Compile LazyBooleans and ComparisonExpr to gimple
Diffstat (limited to 'gcc/rust/ast/rust-expr.h')
-rw-r--r--gcc/rust/ast/rust-expr.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/rust/ast/rust-expr.h b/gcc/rust/ast/rust-expr.h
index 06ac06e..ee4368f 100644
--- a/gcc/rust/ast/rust-expr.h
+++ b/gcc/rust/ast/rust-expr.h
@@ -662,7 +662,6 @@ public:
LESS_OR_EQUAL // std::cmp::PartialEq::le
};
-private:
// Note: overloading trait specified in comments
ExprType expr_type;
@@ -714,6 +713,8 @@ public:
virtual void accept_vis (ASTVisitor &vis) OVERRIDE;
+ Expr *get_lhs () { return main_or_left_expr.get (); }
+
// TODO: implement via a function call to std::cmp::PartialEq::eq(&op1, &op2)
// maybe?
protected:
@@ -746,7 +747,6 @@ public:
LOGICAL_AND
};
-private:
ExprType expr_type;
// Expr* right_expr;
@@ -796,6 +796,8 @@ public:
virtual void accept_vis (ASTVisitor &vis) OVERRIDE;
+ Expr *get_lhs () { return main_or_left_expr.get (); }
+
protected:
// Use covariance to implement clone function as returning this object rather
// than base