summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/CodeGen/CGObjCMac.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGObjCMac.cpp b/clang/lib/CodeGen/CGObjCMac.cpp
index b8ed516ad7d..b3921a48165 100644
--- a/clang/lib/CodeGen/CGObjCMac.cpp
+++ b/clang/lib/CodeGen/CGObjCMac.cpp
@@ -1727,10 +1727,18 @@ llvm::Constant *CGObjCCommonMac::GCBlockLayout(CodeGen::CodeGenFunction &CGF,
QualType Ty = VD->getType();
assert(!Ty->isArrayType() &&
"Array block variable should have been caught");
+ if (Ty->isRecordType() && !BDRE->isByRef()) {
+ bool HasUnion = false;
+ BuildAggrIvarRecordLayout(Ty->getAs<RecordType>(),
+ FieldOffset,
+ true,
+ HasUnion);
+ continue;
+ }
// FIXME. Handle none __block Aggregate variables
#if 0
- if ((Ty->isRecordType() || Ty->isUnionType()) && !BDRE->isByRef())
- assert(false && "Aggregate block variable layout NYI");
+ if (Ty->isUnionType() && !BDRE->isByRef())
+ assert(false && "union block variable layout NYI");
#endif
Qualifiers::GC GCAttr = GetGCAttrTypeForType(CGM.getContext(), Ty);
unsigned FieldSize = CGM.getContext().getTypeSize(Ty);
OpenPOWER on IntegriCloud