diff options
Diffstat (limited to 'lld/ELF/DWARF.cpp')
-rw-r--r-- | lld/ELF/DWARF.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lld/ELF/DWARF.cpp b/lld/ELF/DWARF.cpp index 2e0e677d7c7..6b90a038e87 100644 --- a/lld/ELF/DWARF.cpp +++ b/lld/ELF/DWARF.cpp @@ -81,9 +81,8 @@ template <class RelTy> Optional<RelocAddrEntry> LLDDwarfObj<ELFT>::findAux(const InputSectionBase &Sec, uint64_t Pos, ArrayRef<RelTy> Rels) const { - auto It = std::lower_bound( - Rels.begin(), Rels.end(), Pos, - [](const RelTy &A, uint64_t B) { return A.r_offset < B; }); + auto It = + llvm::bsearch(Rels, [=](const RelTy &A) { return Pos <= A.r_offset; }); if (It == Rels.end() || It->r_offset != Pos) return None; const RelTy &Rel = *It; |