mirror of
https://github.com/RPCS3/llvm.git
synced 2025-04-02 13:21:43 +00:00
[IR] Simplify code. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245188 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
69ab373dfe
commit
282ee13246
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user