================ @@ -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)) ---------------- Jlalond wrote:
I'm open to `std::prev`, but I mostly copied the examples from the other functions which did `pos[-1]`. https://github.com/llvm/llvm-project/pull/138206 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits