Use the range variant of count_if instead of unpacking begin/end
authorDavid Majnemer <david.majnemer@gmail.com>
Fri, 12 Aug 2016 04:32:29 +0000 (04:32 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Fri, 12 Aug 2016 04:32:29 +0000 (04:32 +0000)
No functionality change is intended.

llvm-svn: 278474

llvm/lib/Target/ARM/ARMISelLowering.cpp

index c341794..308d974 100644 (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;