From d652ac82b099e789ae7aa05d639651518419a1c1 Mon Sep 17 00:00:00 2001 From: Fariborz Jahanian Date: Thu, 5 Aug 2010 16:13:18 +0000 Subject: For now skip over aggregate non-byref block variables. (objc gc specific). llvm-svn: 110340 --- clang/lib/CodeGen/CGObjCMac.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'clang/lib/CodeGen/CGObjCMac.cpp') diff --git a/clang/lib/CodeGen/CGObjCMac.cpp b/clang/lib/CodeGen/CGObjCMac.cpp index a453ebb4b69..b8ed516ad7d 100644 --- a/clang/lib/CodeGen/CGObjCMac.cpp +++ b/clang/lib/CodeGen/CGObjCMac.cpp @@ -1727,8 +1727,11 @@ llvm::Constant *CGObjCCommonMac::GCBlockLayout(CodeGen::CodeGenFunction &CGF, QualType Ty = VD->getType(); assert(!Ty->isArrayType() && "Array block variable should have been caught"); - if (Ty->isRecordType() || Ty->isUnionType()) + // FIXME. Handle none __block Aggregate variables +#if 0 + if ((Ty->isRecordType() || Ty->isUnionType()) && !BDRE->isByRef()) assert(false && "Aggregate block variable layout NYI"); +#endif Qualifiers::GC GCAttr = GetGCAttrTypeForType(CGM.getContext(), Ty); unsigned FieldSize = CGM.getContext().getTypeSize(Ty); // __block variables are passed by their descriptior address. So, size -- cgit v1.2.3