summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGDecl.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2010-11-17 00:21:28 +0000
committerFariborz Jahanian <fjahanian@apple.com>2010-11-17 00:21:28 +0000
commite38be617437ccdcc180c5a49e447cbcd07539292 (patch)
tree49bbb2e609b767a523648d1ac6c2c5714190ac6d /lib/CodeGen/CGDecl.cpp
parente3c60a7ce9e0f42c7ca2344b33203266aceca1db (diff)
downloadclang-e38be617437ccdcc180c5a49e447cbcd07539292.tar.gz
clang-e38be617437ccdcc180c5a49e447cbcd07539292.tar.bz2
clang-e38be617437ccdcc180c5a49e447cbcd07539292.tar.xz
Fixes synthesis of type for the object which holds info.
about a __block cxx object. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119411 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDecl.cpp')
-rw-r--r--lib/CodeGen/CGDecl.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/CGDecl.cpp b/lib/CodeGen/CGDecl.cpp
index cb0b09da5c..7ccd80d0e8 100644
--- a/lib/CodeGen/CGDecl.cpp
+++ b/lib/CodeGen/CGDecl.cpp
@@ -659,7 +659,8 @@ void CodeGenFunction::EmitAutoVarDecl(const VarDecl &D,
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;
}