JDevlieghere abandoned this revision.
JDevlieghere added a comment.
Abandoning this in favor of using the ModuleIterable everywhere:
https://reviews.llvm.org/D94271
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94136/new/
https://reviews.llvm.org/D94136
___
JDevlieghere added inline comments.
Comment at: lldb/include/lldb/Core/ModuleList.h:73-74
+public:
+ explicit ModuleIterator(const ModuleList *module_list, size_t idx);
+ ModuleIterator(const ModuleList *module_list);
+
dblaikie wrote:
> Interesting choice to m
dblaikie accepted this revision.
dblaikie added a comment.
This revision is now accepted and ready to land.
Looks good to me with a few minor cleanups.
Comment at: lldb/include/lldb/Core/ModuleList.h:73-74
+public:
+ explicit ModuleIterator(const ModuleList *module_list, size_
JDevlieghere updated this revision to Diff 314767.
JDevlieghere marked 4 inline comments as done.
JDevlieghere added a comment.
Address Dave's feedback.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94136/new/
https://reviews.llvm.org/D94136
Files:
lldb/include/lldb/Core/ModuleList.h
dblaikie added inline comments.
Comment at: lldb/include/lldb/Core/ModuleList.h:71
+: public llvm::iterator_facade_base<
+ ModuleIterator, std::bidirectional_iterator_tag, lldb::ModuleSP> {
+public:
On the fence, but this could be a random access ite
JDevlieghere updated this revision to Diff 314755.
JDevlieghere marked an inline comment as done.
JDevlieghere added a comment.
Use `iterator_facade_base` as suggested by @dblaikie.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94136/new/
https://reviews.llvm.org/D94136
Files:
lldb/i
dblaikie added inline comments.
Comment at: lldb/include/lldb/Core/ModuleList.h:70
+class ModuleIterator
+: public std::iterator {
+public:
FWIW, std::iterator is deprecated since C++17 - probably best not to add new
uses of it. (I think the idea is that the
JDevlieghere created this revision.
JDevlieghere added a reviewer: LLDB.
Herald added a subscriber: mgorny.
JDevlieghere requested review of this revision.
Add begin and end iterators to the ModuleList so we can use range-based for
loops.
https://reviews.llvm.org/D94136
Files:
lldb/include/l