diff options
| author | Benjamin Kramer <benny.kra@googlemail.com> | 2015-08-16 21:16:26 +0000 |
|---|---|---|
| committer | Benjamin Kramer <benny.kra@googlemail.com> | 2015-08-16 21:16:26 +0000 |
| commit | dc1d1cbd826b9265b5150021279f63273f032979 (patch) | |
| tree | cce3f5a08a9fd8b031f6d4e7deb504afc575991f /llvm/lib/IR | |
| parent | 57fd1dc5db880044c6899eae5b840caac1fe790e (diff) | |
| download | bcm5719-llvm-dc1d1cbd826b9265b5150021279f63273f032979.tar.gz bcm5719-llvm-dc1d1cbd826b9265b5150021279f63273f032979.zip | |
[IR] Simplify code. No functionality change.
llvm-svn: 245188
Diffstat (limited to 'llvm/lib/IR')
| -rw-r--r-- | llvm/lib/IR/Type.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/llvm/lib/IR/Type.cpp b/llvm/lib/IR/Type.cpp index c3c3f492b5b..649962690dd 100644 --- a/llvm/lib/IR/Type.cpp +++ b/llvm/lib/IR/Type.cpp @@ -605,13 +605,11 @@ bool StructType::isValidElementType(Type *ElemTy) { /// specified struct. bool StructType::isLayoutIdentical(StructType *Other) const { if (this == Other) return true; - - if (isPacked() != Other->isPacked() || - getNumElements() != Other->getNumElements()) + + if (isPacked() != Other->isPacked()) return false; - - return element_begin() && - std::equal(element_begin(), element_end(), Other->element_begin()); + + return elements() == Other->elements(); } /// getTypeByName - Return the type with the specified name, or null if there |

