[Lldb-commits] [PATCH] D150219: [lldb][NFCI] Remove n^2 loops and simplify iterator usage

2023-05-10 Thread Felipe de Azevedo Piovezan via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG25495c9b4c05: [lldb][NFCI] Remove n^2 loops and simplify iterator usage (authored by fdeazeve). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150219/new/

[Lldb-commits] [PATCH] D150219: [lldb][NFCI] Remove n^2 loops and simplify iterator usage

2023-05-09 Thread Felipe de Azevedo Piovezan via Phabricator via lldb-commits
fdeazeve added inline comments. Comment at: lldb/source/Utility/Broadcaster.cpp:381 + for (auto begin = m_event_map.begin(), end = m_event_map.end();;) { +auto iter = find_if(begin, end, listener_matches_and_shared_bits); +if (iter == m_event_map.end())

[Lldb-commits] [PATCH] D150219: [lldb][NFCI] Remove n^2 loops and simplify iterator usage

2023-05-09 Thread Felipe de Azevedo Piovezan via Phabricator via lldb-commits
fdeazeve updated this revision to Diff 520796. fdeazeve edited the summary of this revision. fdeazeve added a comment. Address review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150219/new/ https://reviews.llvm.org/D150219 Files:

[Lldb-commits] [PATCH] D150219: [lldb][NFCI] Remove n^2 loops and simplify iterator usage

2023-05-09 Thread Jim Ingham via Phabricator via lldb-commits
jingham accepted this revision. jingham added a comment. You are inconsistent in a couple of places about whether you re-look up m_event_map.end or use the version you captured in a variable, which is a little confusing. Other than that this looks equivalent Comment at:

[Lldb-commits] [PATCH] D150219: [lldb][NFCI] Remove n^2 loops and simplify iterator usage

2023-05-09 Thread Alex Langford via Phabricator via lldb-commits
bulbazord accepted this revision. bulbazord added a comment. I like this. :) Comment at: lldb/source/Utility/Broadcaster.cpp:392 } -m_event_map.erase(iter); +iter = m_event_map.erase(iter); } I don't think you need to actually capture the

[Lldb-commits] [PATCH] D150219: [lldb][NFCI] Remove n^2 loops and simplify iterator usage

2023-05-09 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib accepted this revision. mib added a comment. This revision is now accepted and ready to land. LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150219/new/ https://reviews.llvm.org/D150219 ___

[Lldb-commits] [PATCH] D150219: [lldb][NFCI] Remove n^2 loops and simplify iterator usage

2023-05-09 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib added inline comments. Comment at: lldb/source/Utility/Broadcaster.cpp:430 - while (true) { -auto events_predicate = -[](const event_listener_key ) -> bool { - return input.second.get() == listener; -}; -collection::iterator iter, end_iter =

[Lldb-commits] [PATCH] D150219: [lldb][NFCI] Remove n^2 loops and simplify iterator usage

2023-05-09 Thread Felipe de Azevedo Piovezan via Phabricator via lldb-commits
fdeazeve added inline comments. Comment at: lldb/source/Utility/Broadcaster.cpp:430 - while (true) { -auto events_predicate = -[](const event_listener_key ) -> bool { - return input.second.get() == listener; -}; -collection::iterator iter, end_iter =

[Lldb-commits] [PATCH] D150219: [lldb][NFCI] Remove n^2 loops and simplify iterator usage

2023-05-09 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib added inline comments. Comment at: lldb/source/Utility/Broadcaster.cpp:430 - while (true) { -auto events_predicate = -[](const event_listener_key ) -> bool { - return input.second.get() == listener; -}; -collection::iterator iter, end_iter =

[Lldb-commits] [PATCH] D150219: [lldb][NFCI] Remove n^2 loops and simplify iterator usage

2023-05-09 Thread Felipe de Azevedo Piovezan via Phabricator via lldb-commits
fdeazeve added inline comments. Comment at: lldb/source/Utility/Broadcaster.cpp:382 +auto iter = find_if(begin, end, listener_matches_and_shared_bits); +if (iter == m_event_map.end()) break; Oh, this should be `== end` Comment

[Lldb-commits] [PATCH] D150219: [lldb][NFCI] Remove n^2 loops and simplify iterator usage

2023-05-09 Thread Felipe de Azevedo Piovezan via Phabricator via lldb-commits
fdeazeve added a comment. Heavily inspired by @bulbazord's D150168 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150219/new/ https://reviews.llvm.org/D150219 ___

[Lldb-commits] [PATCH] D150219: [lldb][NFCI] Remove n^2 loops and simplify iterator usage

2023-05-09 Thread Felipe de Azevedo Piovezan via Phabricator via lldb-commits
fdeazeve updated this revision to Diff 520786. fdeazeve added a comment. Herald added a subscriber: JDevlieghere. Update commit message Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150219/new/ https://reviews.llvm.org/D150219 Files:

[Lldb-commits] [PATCH] D150219: [lldb][NFCI] Remove n^2 loops and simplify iterator usage

2023-05-09 Thread Felipe de Azevedo Piovezan via Phabricator via lldb-commits
fdeazeve created this revision. Herald added a project: All. fdeazeve requested review of this revision. Herald added a project: LLDB. Herald added a subscriber: lldb-commits. The code inside Broadcaster makes usage of iterators using olden C++ coding style. Hidden in this old style is a couple