diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2011-01-03 19:23:18 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2011-01-03 19:23:18 +0000 |
commit | f96bdf409fc9e5570e35aaf8a9167265e63d58d8 (patch) | |
tree | 5021bf0b8258750a0ebf4bdbc7d0c53c4cb04240 /lib/CodeGen | |
parent | aa165f8458b51c546bebff947343e1a36f3594cb (diff) |
Consider zero-length array of structs when
computing ivar layouts for objc-gc.
Fixes // rdar://8800513
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122762 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/CGObjCMac.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/CGObjCMac.cpp b/lib/CodeGen/CGObjCMac.cpp index 66913c8ee2..2a27e91925 100644 --- a/lib/CodeGen/CGObjCMac.cpp +++ b/lib/CodeGen/CGObjCMac.cpp @@ -3681,7 +3681,7 @@ void CGObjCCommonMac::BuildAggrIvarLayout(const ObjCImplementationDecl *OI, assert(!FQT->isUnionType() && "layout for array of unions not supported"); - if (FQT->isRecordType()) { + if (FQT->isRecordType() && ElCount) { int OldIndex = IvarsInfo.size() - 1; int OldSkIndex = SkipIvars.size() -1; |