summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/TargetInfo.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2015-03-02 11:57:06 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2015-03-02 11:57:06 +0000
commit39ccabe500fb7af76143bf5b55a01f0767044fdc (patch)
tree8eac8b7f0272b27f77b2e4dc60a7952f111366be /clang/lib/CodeGen/TargetInfo.cpp
parent8008e9f624074ac0e59642653a2a9b460fe44639 (diff)
downloadbcm5719-llvm-39ccabe500fb7af76143bf5b55a01f0767044fdc.tar.gz
bcm5719-llvm-39ccabe500fb7af76143bf5b55a01f0767044fdc.zip
Replace loop with equivalent ArrayRef function. NFC.
llvm-svn: 230949
Diffstat (limited to 'clang/lib/CodeGen/TargetInfo.cpp')
-rw-r--r--clang/lib/CodeGen/TargetInfo.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/clang/lib/CodeGen/TargetInfo.cpp b/clang/lib/CodeGen/TargetInfo.cpp
index a4136994968..7ee698ba1fe 100644
--- a/clang/lib/CodeGen/TargetInfo.cpp
+++ b/clang/lib/CodeGen/TargetInfo.cpp
@@ -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.
OpenPOWER on IntegriCloud