aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGBlocks.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/CGBlocks.cpp')
-rw-r--r--lib/CodeGen/CGBlocks.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/CodeGen/CGBlocks.cpp b/lib/CodeGen/CGBlocks.cpp
index 7c35091a2c..0bc99e2ea8 100644
--- a/lib/CodeGen/CGBlocks.cpp
+++ b/lib/CodeGen/CGBlocks.cpp
@@ -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: