Fixes synthesis of type for the object which holds info.
about a __block cxx object.
llvm-svn: 119411
diff --git a/clang/lib/CodeGen/CGDecl.cpp b/clang/lib/CodeGen/CGDecl.cpp
index cb0b09d..7ccd80d 100644
--- a/clang/lib/CodeGen/CGDecl.cpp
+++ b/clang/lib/CodeGen/CGDecl.cpp
@@ -659,7 +659,8 @@
if (Ty->isBlockPointerType()) {
flag |= BLOCK_FIELD_IS_BLOCK;
flags |= BLOCK_HAS_COPY_DISPOSE;
- } else if (BlockRequiresCopying(Ty)) {
+ } else if (getContext().isObjCNSObjectType(Ty) ||
+ Ty->isObjCObjectPointerType()) {
flag |= BLOCK_FIELD_IS_OBJECT;
flags |= BLOCK_HAS_COPY_DISPOSE;
}