auto &sec_cs = m_sec_contribs[sec];
auto offset = SectionContrib->getAddressOffset();
- auto it =
- std::upper_bound(sec_cs.begin(), sec_cs.end(), offset, pred_upper);
+ auto it = llvm::upper_bound(sec_cs, offset, pred_upper);
auto size = SectionContrib->getLength();
sec_cs.insert(it, {offset, size, comp_id});
if (DataSection) {
// Search by section contributions
auto &sec_cs = m_sec_contribs[DataSection];
- auto it =
- std::upper_bound(sec_cs.begin(), sec_cs.end(), DataOffset, pred_upper);
+ auto it = llvm::upper_bound(sec_cs, DataOffset, pred_upper);
if (it != sec_cs.begin()) {
--it;
if (DataOffset < it->Offset + it->Size)
const uint8_t *
ArmUnwindInfo::GetExceptionHandlingTableEntry(const Address &addr) {
- auto it = std::upper_bound(m_exidx_entries.begin(), m_exidx_entries.end(),
- ArmExidxEntry{0, addr.GetFileAddress(), 0});
+ auto it = llvm::upper_bound(m_exidx_entries,
+ ArmExidxEntry{0, addr.GetFileAddress(), 0});
if (it == m_exidx_entries.begin())
return nullptr;
--it;
m_threads.push_back(thread_sp);
else {
m_threads.insert(
- std::upper_bound(m_threads.begin(), m_threads.end(), thread_sp,
- [](const ThreadSP &lhs, const ThreadSP &rhs) -> bool {
- return lhs->GetIndexID() < rhs->GetIndexID();
- }),
+ llvm::upper_bound(m_threads, thread_sp,
+ [](const ThreadSP &lhs, const ThreadSP &rhs) -> bool {
+ return lhs->GetIndexID() < rhs->GetIndexID();
+ }),
thread_sp);
}
}
}
DWARFUnit *DWARFUnitVector::addUnit(std::unique_ptr<DWARFUnit> Unit) {
- auto I = std::upper_bound(begin(), end(), Unit,
- [](const std::unique_ptr<DWARFUnit> &LHS,
- const std::unique_ptr<DWARFUnit> &RHS) {
- return LHS->getOffset() < RHS->getOffset();
- });
+ auto I = llvm::upper_bound(*this, Unit,
+ [](const std::unique_ptr<DWARFUnit> &LHS,
+ const std::unique_ptr<DWARFUnit> &RHS) {
+ return LHS->getOffset() < RHS->getOffset();
+ });
return this->insert(I, std::move(Unit))->get();
}