diff options
Diffstat (limited to 'lib/IR/Type.cpp')
-rw-r--r-- | lib/IR/Type.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/IR/Type.cpp b/lib/IR/Type.cpp index b5c4e5d..a9ca800 100644 --- a/lib/IR/Type.cpp +++ b/lib/IR/Type.cpp @@ -613,6 +613,9 @@ bool StructType::isLayoutIdentical(StructType *Other) const { if (isPacked() != Other->isPacked() || getNumElements() != Other->getNumElements()) return false; + + if (!getNumElements()) + return true; return std::equal(element_begin(), element_end(), Other->element_begin()); } |