Use the range variant of count_if instead of unpacking begin/end

No functionality change is intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278474 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Majnemer 2016-08-12 04:32:29 +00:00
parent 2d62ce6ee8
commit 33ebfce237

View File

@ -1857,7 +1857,7 @@ ARMTargetLowering::LowerCall(TargetLowering::CallLoweringInfo &CLI,
auto *BB = CLI.CS->getParent();
bool PreferIndirect =
Subtarget->isThumb() && MF.getFunction()->optForMinSize() &&
std::count_if(GV->user_begin(), GV->user_end(), [&BB](const User *U) {
count_if(GV->users(), [&BB](const User *U) {
return isa<Instruction>(U) && cast<Instruction>(U)->getParent() == BB;
}) > 2;