================
@@ -380,6 +380,25 @@ template <typename B, typename S, unsigned N = 0> class
RangeVector {
return nullptr;
}
+ const Entry *FindEntryThatIntersects(const Entry &range) const {
+#ifdef ASSERT_RANGEMAP_ARE_SORTED
+ assert(IsSorted());
+#endif
+ if (!m_entries.empty()) {
+ typename Collection::const_iterator begin = m_entries.begin();
+ typename Collection::const_iterator end = m_entries.end();
+ typename Collection::const_iterator pos =
+ std::lower_bound(begin, end, range, BaseLessThan);
+
+ while (pos != begin && pos[-1].DoesIntersect(range))
----------------
dmpots wrote:
The indexing by -1 looks suspicious to me, but maybe its well defined. I would
feel better about something like `std::prev(pos)->DoesIntersect(range)`.
https://github.com/llvm/llvm-project/pull/138206
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits