Fix a regression where write-barrier was not being generated
for block pointer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81479 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp
index bf1fac9..84a5195 100644
--- a/lib/AST/ASTContext.cpp
+++ b/lib/AST/ASTContext.cpp
@@ -3391,7 +3391,7 @@
// (or pointers to them) be treated as though they were declared
// as __strong.
if (GCAttrs == QualType::GCNone) {
- if (Ty->isObjCObjectPointerType())
+ if (Ty->isObjCObjectPointerType() || Ty->isBlockPointerType())
GCAttrs = QualType::Strong;
else if (Ty->isPointerType())
return getObjCGCAttrKind(Ty->getAs<PointerType>()->getPointeeType());