mirror of
https://github.com/RPCS3/llvm.git
synced 2025-04-02 13:21:43 +00:00
Use std::find instead of manual loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250624 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f67852f012
commit
7a2d52ce5d
@ -2044,11 +2044,8 @@ bool llvm::isImageOrSamplerVal(const Value *arg, const Module *context) {
|
||||
auto *STy = dyn_cast<StructType>(PTy->getElementType());
|
||||
const std::string TypeName = STy && !STy->isLiteral() ? STy->getName() : "";
|
||||
|
||||
for (int i = 0, e = array_lengthof(specialTypes); i != e; ++i)
|
||||
if (TypeName == specialTypes[i])
|
||||
return true;
|
||||
|
||||
return false;
|
||||
return std::find(std::begin(specialTypes), std::end(specialTypes),
|
||||
TypeName) != std::end(specialTypes);
|
||||
}
|
||||
|
||||
SDValue NVPTXTargetLowering::LowerFormalArguments(
|
||||
|
Loading…
x
Reference in New Issue
Block a user