[SimplifyLibCalls] Use any_of(). Suggested by David Blaikie!
[oota-llvm.git] / 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