Skip to content

Commit 8600e19

Browse files
committed
fixup: Use std::partition_point in place of std::lower_bound for binary search
1 parent c21ba68 commit 8600e19

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lld/ELF/Driver.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1732,9 +1732,9 @@ static void readConfigs(Ctx &ctx, opt::InputArgList &args) {
17321732
for (opt::Arg *arg : args.filtered(OPT_z)) {
17331733
std::pair<StringRef, StringRef> option =
17341734
StringRef(arg->getValue()).split('=');
1735-
ReportOptDesc *const desc = std::lower_bound(
1736-
std::begin(reports), std::end(reports), option.first,
1737-
[](const ReportOptDesc &d, const StringRef &s) { return d.name < s; });
1735+
ReportOptDesc *const desc = std::partition_point(
1736+
std::begin(reports), std::end(reports),
1737+
[&](const ReportOptDesc &d) { return d.name < option.first; });
17381738
if (desc == std::end(reports) || desc->name != option.first)
17391739
continue;
17401740

0 commit comments

Comments
 (0)