diff options
Diffstat (limited to 'gcc/rust/resolve/rust-name-resolver.h')
-rw-r--r-- | gcc/rust/resolve/rust-name-resolver.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/rust/resolve/rust-name-resolver.h b/gcc/rust/resolve/rust-name-resolver.h index f22eba7..5544f30 100644 --- a/gcc/rust/resolve/rust-name-resolver.h +++ b/gcc/rust/resolve/rust-name-resolver.h @@ -290,6 +290,23 @@ public: return it->second.size (); } + void iterate_name_ribs (std::function<void (Rib *)> cb) + { + for (auto it = name_ribs.begin (); it != name_ribs.end (); it++) + cb (it->second); + } + + void iterate_type_ribs (std::function<void (Rib *)> cb) + { + for (auto it = type_ribs.begin (); it != type_ribs.end (); it++) + { + if (it->first == global_type_node_id) + continue; + + cb (it->second); + } + } + private: Resolver (); |