]> granicus.if.org Git - clang/commitdiff
Ugh, use this compiler workaround again.
authorJohn McCall <rjmccall@apple.com>
Tue, 12 Jul 2011 16:53:04 +0000 (16:53 +0000)
committerJohn McCall <rjmccall@apple.com>
Tue, 12 Jul 2011 16:53:04 +0000 (16:53 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134989 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGBlocks.cpp

index 7c35091a2c43605677010635c62065dfafe8f6a4..0bc99e2ea8025b5126ea32fa79b6f5165137cdcc 100644 (file)
@@ -633,11 +633,13 @@ llvm::Value *CodeGenFunction::EmitBlockLiteral(const BlockExpr *blockExpr) {
 
       // Block captures count as local values and have imprecise semantics.
       // They also can't be arrays, so need to worry about that.
-      case QualType::DK_objc_strong_lifetime:
+      case QualType::DK_objc_strong_lifetime: {
+        // This local is a GCC and MSVC compiler workaround.
+        Destroyer *destroyer = &destroyARCStrongImprecise;
         pushDestroy(getCleanupKind(dtorKind), blockField, type,
-                    destroyARCStrongImprecise,
-                    /*useEHCleanupForArray*/ false);
+                    *destroyer, /*useEHCleanupForArray*/ false);
         break;
+      }
 
       case QualType::DK_objc_weak_lifetime:
       case QualType::DK_cxx_destructor: