forked from OSchip/llvm-project
[SimplifyLibCalls] Use any_of(). Suggested by David Blaikie!
llvm-svn: 254239
This commit is contained in:
parent
89766e5b1d
commit
da3beebad1
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue