r230949 - Replace loop with equivalent ArrayRef function. NFC.
Benjamin Kramer
benny.kra at googlemail.com
Mon Mar 2 03:57:06 PST 2015
Author: d0k
Date: Mon Mar 2 05:57:06 2015
New Revision: 230949
URL: http://llvm.org/viewvc/llvm-project?rev=230949&view=rev
Log:
Replace loop with equivalent ArrayRef function. NFC.
Modified:
cfe/trunk/lib/CodeGen/TargetInfo.cpp
Modified: cfe/trunk/lib/CodeGen/TargetInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/TargetInfo.cpp?rev=230949&r1=230948&r2=230949&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/TargetInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/TargetInfo.cpp Mon Mar 2 05:57:06 2015
@@ -6131,12 +6131,7 @@ private:
// Check if Ty is a usable substitute for the coercion type.
bool isUsableType(llvm::StructType *Ty) const {
- if (Ty->getNumElements() != Elems.size())
- return false;
- for (unsigned i = 0, e = Elems.size(); i != e; ++i)
- if (Elems[i] != Ty->getElementType(i))
- return false;
- return true;
+ return llvm::makeArrayRef(Elems) == Ty->elements();
}
// Get the coercion type as a literal struct type.
More information about the cfe-commits
mailing list