diff options
Diffstat (limited to 'llvm/lib/IR/Function.cpp')
-rw-r--r-- | llvm/lib/IR/Function.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/IR/Function.cpp b/llvm/lib/IR/Function.cpp index 6a276b18023..dc28d22548d 100644 --- a/llvm/lib/IR/Function.cpp +++ b/llvm/lib/IR/Function.cpp @@ -533,9 +533,8 @@ static ArrayRef<const char *> findTargetSubtable(StringRef Name) { // Drop "llvm." and take the first dotted component. That will be the target // if this is target specific. StringRef Target = Name.drop_front(5).split('.').first; - auto It = llvm::bsearch(Targets, [=](const IntrinsicTargetInfo &TI) { - return Target <= TI.Name; - }); + auto It = partition_point( + Targets, [=](const IntrinsicTargetInfo &TI) { return TI.Name < Target; }); // We've either found the target or just fall back to the generic set, which // is always first. const auto &TI = It != Targets.end() && It->Name == Target ? *It : Targets[0]; |