projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8008e9f
)
Replace loop with equivalent ArrayRef function. NFC.
author
Benjamin Kramer
<benny.kra@googlemail.com>
Mon, 2 Mar 2015 11:57:06 +0000
(11:57 +0000)
committer
Benjamin Kramer
<benny.kra@googlemail.com>
Mon, 2 Mar 2015 11:57:06 +0000
(11:57 +0000)
llvm-svn: 230949
clang/lib/CodeGen/TargetInfo.cpp
patch
|
blob
|
history
diff --git
a/clang/lib/CodeGen/TargetInfo.cpp
b/clang/lib/CodeGen/TargetInfo.cpp
index
a413699
..
7ee698b
100644
(file)
--- 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.