diff options
| author | Fangrui Song <maskray@google.com> | 2019-04-17 07:58:05 +0000 |
|---|---|---|
| committer | Fangrui Song <maskray@google.com> | 2019-04-17 07:58:05 +0000 |
| commit | c82e92bca89f3b9740e8c66afae0298965c3183a (patch) | |
| tree | 7731c7923970f33e032136221a4ea177659a7ccf /llvm/lib/CodeGen | |
| parent | b0b65cae592206d49e155bfc6ed0cbcf368061f4 (diff) | |
| download | bcm5719-llvm-c82e92bca89f3b9740e8c66afae0298965c3183a.tar.gz bcm5719-llvm-c82e92bca89f3b9740e8c66afae0298965c3183a.zip | |
Change some llvm::{lower,upper}_bound to llvm::bsearch. NFC
llvm-svn: 358564
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/GlobalISel/LegalizerInfo.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/GlobalISel/LegalizerInfo.cpp b/llvm/lib/CodeGen/GlobalISel/LegalizerInfo.cpp index 5dca699827b..17609175951 100644 --- a/llvm/lib/CodeGen/GlobalISel/LegalizerInfo.cpp +++ b/llvm/lib/CodeGen/GlobalISel/LegalizerInfo.cpp @@ -506,10 +506,8 @@ LegalizerInfo::findAction(const SizeAndActionsVec &Vec, const uint32_t Size) { // Find the last element in Vec that has a bitsize equal to or smaller than // the requested bit size. // That is the element just before the first element that is bigger than Size. - auto VecIt = llvm::upper_bound( - Vec, Size, [](const uint32_t Size, const SizeAndAction lhs) -> bool { - return Size < lhs.first; - }); + auto VecIt = llvm::bsearch( + Vec, [=](const SizeAndAction &A) { return Size < A.first; }); assert(VecIt != Vec.begin() && "Does Vec not start with size 1?"); --VecIt; int VecIdx = VecIt - Vec.begin(); |

