diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2015-03-02 11:57:06 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2015-03-02 11:57:06 +0000 |
commit | 39ccabe500fb7af76143bf5b55a01f0767044fdc (patch) | |
tree | 8eac8b7f0272b27f77b2e4dc60a7952f111366be /clang/lib/CodeGen/TargetInfo.cpp | |
parent | 8008e9f624074ac0e59642653a2a9b460fe44639 (diff) | |
download | bcm5719-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.cpp | 7 |
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. |