diff options
author | Kazu Hirata <kazu@google.com> | 2021-01-05 21:15:59 -0800 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2021-01-05 21:15:59 -0800 |
commit | cd088ba7e61a6132659d066918a1175861c9afe7 (patch) | |
tree | 1d05565d6435e6650935cbfce9df228253d987bf /llvm/lib/Object/ELF.cpp | |
parent | cea1c63756f92f29595251943262b73f7f290f45 (diff) | |
download | llvm-cd088ba7e61a6132659d066918a1175861c9afe7.zip llvm-cd088ba7e61a6132659d066918a1175861c9afe7.tar.gz llvm-cd088ba7e61a6132659d066918a1175861c9afe7.tar.bz2 |
[llvm] Use llvm::lower_bound and llvm::upper_bound (NFC)
Diffstat (limited to 'llvm/lib/Object/ELF.cpp')
-rw-r--r-- | llvm/lib/Object/ELF.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/Object/ELF.cpp b/llvm/lib/Object/ELF.cpp index 28a6914..264f115 100644 --- a/llvm/lib/Object/ELF.cpp +++ b/llvm/lib/Object/ELF.cpp @@ -589,11 +589,10 @@ ELFFile<ELFT>::toMappedAddr(uint64_t VAddr, WarningHandler WarnHandler) const { llvm::stable_sort(LoadSegments, SortPred); } - const Elf_Phdr *const *I = - std::upper_bound(LoadSegments.begin(), LoadSegments.end(), VAddr, - [](uint64_t VAddr, const Elf_Phdr_Impl<ELFT> *Phdr) { - return VAddr < Phdr->p_vaddr; - }); + const Elf_Phdr *const *I = llvm::upper_bound( + LoadSegments, VAddr, [](uint64_t VAddr, const Elf_Phdr_Impl<ELFT> *Phdr) { + return VAddr < Phdr->p_vaddr; + }); if (I == LoadSegments.begin()) return createError("virtual address is not in any segment: 0x" + |