labath accepted this revision.
labath added a comment.
This revision is now accepted and ready to land.
lgtm
================
Comment at: lldb/include/lldb/Utility/RangeMap.h:728-729
- if (!m_entries.empty()) {
- for (const auto &entry : m_entries) {
- if (entry.Contains(addr))
- indexes.push_back(entry.data);
- }
+ if (m_entries.empty())
+ return indexes.size();
+
----------------
This pattern seems to be common in lldb, but I really don't understand the
reason behind it -- it just checks the condition that would be checked by the
for loop anyway. I've personally just started removing checks like these
whenever I touch some code which uses them...
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67123/new/
https://reviews.llvm.org/D67123
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits