[SimplifyLibCalls] Use any_of(). Suggested by David Blaikie!

llvm-svn: 254239
This commit is contained in:
Davide Italiano 2015-11-28 22:27:48 +00:00
parent 89766e5b1d
commit da3beebad1
1 changed files with 3 additions and 4 deletions

View 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