summaryrefslogtreecommitdiffstats
path: root/lib/IR/Type.cpp
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2015-09-06 18:34:38 +0000
committerdim <dim@FreeBSD.org>2015-09-06 18:34:38 +0000
commit9fcebda97d0cb3d7a2235d2ad835c3a2679e7683 (patch)
tree461d3cf041290f4a99740d540bf0973d6084f98e /lib/IR/Type.cpp
parentc5dd590220d0afe971d065bfe9324f549dd00968 (diff)
downloadFreeBSD-src-9fcebda97d0cb3d7a2235d2ad835c3a2679e7683.zip
FreeBSD-src-9fcebda97d0cb3d7a2235d2ad835c3a2679e7683.tar.gz
Import llvm 3.7.0 release (r246257).
Diffstat (limited to 'lib/IR/Type.cpp')
-rw-r--r--lib/IR/Type.cpp3
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());
}
OpenPOWER on IntegriCloud