aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/Function.cpp
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2019-06-30 11:19:56 +0000
committerFangrui Song <maskray@google.com>2019-06-30 11:19:56 +0000
commit78ee2fbf984b84db814bf7b3a68e2317e32b1a24 (patch)
tree83fad2d809aa8d625b95a949b0d36ef9ceeaa2e4 /llvm/lib/IR/Function.cpp
parent2d2cb77e45d4c9ca34d05f80430e0f9404252980 (diff)
downloadllvm-78ee2fbf984b84db814bf7b3a68e2317e32b1a24.zip
llvm-78ee2fbf984b84db814bf7b3a68e2317e32b1a24.tar.gz
llvm-78ee2fbf984b84db814bf7b3a68e2317e32b1a24.tar.bz2
Cleanup: llvm::bsearch -> llvm::partition_point after r364719
llvm-svn: 364720
Diffstat (limited to 'llvm/lib/IR/Function.cpp')
-rw-r--r--llvm/lib/IR/Function.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/IR/Function.cpp b/llvm/lib/IR/Function.cpp
index 6a276b1..dc28d22 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];