diff options
-rw-r--r-- | llvm/lib/IR/Type.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/IR/Type.cpp b/llvm/lib/IR/Type.cpp index 18c2e8c2b48..2f6dbab7201 100644 --- a/llvm/lib/IR/Type.cpp +++ b/llvm/lib/IR/Type.cpp @@ -612,7 +612,8 @@ bool StructType::isLayoutIdentical(StructType *Other) const { getNumElements() != Other->getNumElements()) return false; - return std::equal(element_begin(), element_end(), Other->element_begin()); + return element_begin() && + std::equal(element_begin(), element_end(), Other->element_begin()); } /// getTypeByName - Return the type with the specified name, or null if there |