[PATCH] D60813: [ELF] Use llvm::bsearch. NFC
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 17 00:39:11 PDT 2019
ruiu accepted this revision.
ruiu added a comment.
This revision is now accepted and ready to land.
LGTM
Nice
================
Comment at: ELF/DWARF.cpp:85
+ auto It =
+ llvm::bsearch(Rels, [Pos](const RelTy &A) { return Pos <= A.r_offset; });
if (It == Rels.end() || It->r_offset != Pos)
----------------
We usually just use `=` or `&` to capture variables.
================
Comment at: ELF/InputSection.cpp:1228
+ auto It = llvm::bsearch(
+ Pieces, [Offset](SectionPiece P) { return Offset < P.InputOff; });
+ return &It[-1];
----------------
Ditto
Repository:
rLLD LLVM Linker
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60813/new/
https://reviews.llvm.org/D60813
More information about the llvm-commits
mailing list