Replace loop with equivalent ArrayRef function. NFC.
llvm-svn: 230949
This commit is contained in:
@@ -6131,12 +6131,7 @@ private:
|
|||||||
|
|
||||||
// Check if Ty is a usable substitute for the coercion type.
|
// Check if Ty is a usable substitute for the coercion type.
|
||||||
bool isUsableType(llvm::StructType *Ty) const {
|
bool isUsableType(llvm::StructType *Ty) const {
|
||||||
if (Ty->getNumElements() != Elems.size())
|
return llvm::makeArrayRef(Elems) == Ty->elements();
|
||||||
return false;
|
|
||||||
for (unsigned i = 0, e = Elems.size(); i != e; ++i)
|
|
||||||
if (Elems[i] != Ty->getElementType(i))
|
|
||||||
return false;
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the coercion type as a literal struct type.
|
// Get the coercion type as a literal struct type.
|
||||||
|
|||||||
Reference in New Issue
Block a user