]> granicus.if.org Git - clang/commitdiff
For now skip over aggregate non-byref block variables.
authorFariborz Jahanian <fjahanian@apple.com>
Thu, 5 Aug 2010 16:13:18 +0000 (16:13 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Thu, 5 Aug 2010 16:13:18 +0000 (16:13 +0000)
(objc gc specific).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110340 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGObjCMac.cpp

index a453ebb4b694e700ddaaaa710d6b8498b94e0032..b8ed516ad7da1d0d6138d1bbd7aa2d5eb2b34d5e 100644 (file)
@@ -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