From 08b83163db07c903a6524f15f9adce4a0e7fa359 Mon Sep 17 00:00:00 2001 From: Nirmal Patel Date: Thu, 28 Oct 2021 13:58:03 -0400 Subject: 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 --- gcc/rust/ast/rust-expr.h | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'gcc/rust/ast') 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 cb) - { - for (auto ¶m : params) - { - if (!cb (param.get ())) - return; - } - } - // TODO: this mutable getter seems really dodgy. Think up better way. const std::vector > &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 cb) - { - for (auto ¶m : params) - { - if (!cb (param.get ())) - return; - } - } - // TODO: this mutable getter seems really dodgy. Think up better way. const std::vector > &get_params () const { -- cgit v1.1