From 46cdbe20488d4ea26320c96868f5c24f8ba42b0c Mon Sep 17 00:00:00 2001 From: Davide Italiano Date: Sat, 28 Nov 2015 22:27:48 +0000 Subject: [PATCH] [SimplifyLibCalls] Use any_of(). Suggested by David Blaikie! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254239 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Utils/SimplifyLibCalls.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/Transforms/Utils/SimplifyLibCalls.cpp b/lib/Transforms/Utils/SimplifyLibCalls.cpp index 8389e39f7af..6d3dfd6750a 100644 --- a/lib/Transforms/Utils/SimplifyLibCalls.cpp +++ b/lib/Transforms/Utils/SimplifyLibCalls.cpp @@ -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 -- 2.34.1