[llvm] r245188 - [IR] Simplify code. No functionality change.
Benjamin Kramer via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 16 14:16:26 PDT 2015
Author: d0k
Date: Sun Aug 16 16:16:26 2015
New Revision: 245188
URL: http://llvm.org/viewvc/llvm-project?rev=245188&view=rev
Log:
[IR] Simplify code. No functionality change.
Modified:
llvm/trunk/lib/IR/Type.cpp
Modified: llvm/trunk/lib/IR/Type.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Type.cpp?rev=245188&r1=245187&r2=245188&view=diff
==============================================================================
--- llvm/trunk/lib/IR/Type.cpp (original)
+++ llvm/trunk/lib/IR/Type.cpp Sun Aug 16 16:16:26 2015
@@ -605,13 +605,11 @@ bool StructType::isValidElementType(Type
/// 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
More information about the llvm-commits
mailing list