[SimplifyLibCalls] Use any_of(). Suggested by David Blaikie!
authorDavide Italiano <davide@freebsd.org>
Sat, 28 Nov 2015 22:27:48 +0000 (22:27 +0000)
committerDavide Italiano <davide@freebsd.org>
Sat, 28 Nov 2015 22:27:48 +0000 (22:27 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254239 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Utils/SimplifyLibCalls.cpp

index 8389e39f7af030fb5dbda2cdd2ea6b3988697708..6d3dfd6750a52e5a5f7c60a135317cc01d42a031 100644 (file)
@@ -86,10 +86,9 @@ static bool isOnlyUsedInEqualityComparison(Value *V, Value *With) {
 }
 
 static bool callHasFloatingPointArgument(const CallInst *CI) {
-  for (const Use &OI : CI->operands())
-    if (OI->getType()->isFloatingPointTy())
-      return true;
-  return false;
+  return std::any_of(CI->op_begin(), CI->op_end(), [](const Use &OI) {
+    return OI->getType()->isFloatingPointTy();
+  });
 }
 
 /// \brief Check whether the overloaded unary floating point function