aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/ast
diff options
context:
space:
mode:
authorNirmal Patel <npate012@gmail.com>2021-10-28 13:58:03 -0400
committerNirmal Patel <npate012@gmail.com>2021-10-28 13:58:03 -0400
commit08b83163db07c903a6524f15f9adce4a0e7fa359 (patch)
tree22cc4400519d1b4826596dceb1faf6cb07520fc8 /gcc/rust/ast
parente28c43f2f40cf405e89b3892aa65f6a06fa1c802 (diff)
downloadgcc-08b83163db07c903a6524f15f9adce4a0e7fa359.zip
gcc-08b83163db07c903a6524f15f9adce4a0e7fa359.tar.gz
gcc-08b83163db07c903a6524f15f9adce4a0e7fa359.tar.bz2
Remove iterate_params from AST::CallExpr and AST::MethodCallExpr
These lambda iterators are removed because they make working with IR more complex. Instead, we are using the get_params () to access the parameters with the help of a for loop. Fixes #722 #723 Signed-off-by: Nirmal Patel <npate012@gmail.com>
Diffstat (limited to 'gcc/rust/ast')
-rw-r--r--gcc/rust/ast/rust-expr.h18
1 files changed, 0 insertions, 18 deletions
diff --git a/gcc/rust/ast/rust-expr.h b/gcc/rust/ast/rust-expr.h
index 0d3c50e..05c78b7 100644
--- a/gcc/rust/ast/rust-expr.h
+++ b/gcc/rust/ast/rust-expr.h
@@ -1916,15 +1916,6 @@ public:
void mark_for_strip () override { function = nullptr; }
bool is_marked_for_strip () const override { return function == nullptr; }
- void iterate_params (std::function<bool (Expr *)> cb)
- {
- for (auto &param : params)
- {
- if (!cb (param.get ()))
- return;
- }
- }
-
// TODO: this mutable getter seems really dodgy. Think up better way.
const std::vector<std::unique_ptr<Expr> > &get_params () const
{
@@ -2025,15 +2016,6 @@ public:
void mark_for_strip () override { receiver = nullptr; }
bool is_marked_for_strip () const override { return receiver == nullptr; }
- void iterate_params (std::function<bool (Expr *)> cb)
- {
- for (auto &param : params)
- {
- if (!cb (param.get ()))
- return;
- }
- }
-
// TODO: this mutable getter seems really dodgy. Think up better way.
const std::vector<std::unique_ptr<Expr> > &get_params () const
{