[llvm] r254239 - [SimplifyLibCalls] Use any_of(). Suggested by David Blaikie!
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Sat Nov 28 14:27:48 PST 2015
Author: davide
Date: Sat Nov 28 16:27:48 2015
New Revision: 254239
URL: http://llvm.org/viewvc/llvm-project?rev=254239&view=rev
Log:
[SimplifyLibCalls] Use any_of(). Suggested by David Blaikie!
Modified:
llvm/trunk/lib/Transforms/Utils/SimplifyLibCalls.cpp
Modified: llvm/trunk/lib/Transforms/Utils/SimplifyLibCalls.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/SimplifyLibCalls.cpp?rev=254239&r1=254238&r2=254239&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/SimplifyLibCalls.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/SimplifyLibCalls.cpp Sat Nov 28 16:27:48 2015
@@ -86,10 +86,9 @@ static bool isOnlyUsedInEqualityComparis
}
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
More information about the llvm-commits
mailing list