[Lldb-commits] [PATCH] D94136: [lldb] Make ModuleList iterable (NFC)

2021-01-07 Thread Jonas Devlieghere via Phabricator via lldb-commits
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 ___

[Lldb-commits] [PATCH] D94136: [lldb] Make ModuleList iterable (NFC)

2021-01-05 Thread Jonas Devlieghere via Phabricator via lldb-commits
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

[Lldb-commits] [PATCH] D94136: [lldb] Make ModuleList iterable (NFC)

2021-01-05 Thread David Blaikie via Phabricator via lldb-commits
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_

[Lldb-commits] [PATCH] D94136: [lldb] Make ModuleList iterable (NFC)

2021-01-05 Thread Jonas Devlieghere via Phabricator via lldb-commits
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

[Lldb-commits] [PATCH] D94136: [lldb] Make ModuleList iterable (NFC)

2021-01-05 Thread David Blaikie via Phabricator via lldb-commits
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

[Lldb-commits] [PATCH] D94136: [lldb] Make ModuleList iterable (NFC)

2021-01-05 Thread Jonas Devlieghere via Phabricator via lldb-commits
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

[Lldb-commits] [PATCH] D94136: [lldb] Make ModuleList iterable (NFC)

2021-01-05 Thread David Blaikie via Phabricator via lldb-commits
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

[Lldb-commits] [PATCH] D94136: [lldb] Make ModuleList iterable (NFC)

2021-01-05 Thread Jonas Devlieghere via Phabricator via lldb-commits
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