summaryrefslogtreecommitdiffstats
path: root/clang/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
commita00076cda5ed9dec83b851f165eb335782d71d92 (patch)
treed19e985f3b7f378d519b91d1bf8214a9b8b372f8 /clang/lib/CodeGen/CGDecl.cpp
parent68dbaead7b3ecd2a13e38488e4aa32c363733d4d (diff)
downloadbcm5719-llvm-a00076cda5ed9dec83b851f165eb335782d71d92.tar.gz
bcm5719-llvm-a00076cda5ed9dec83b851f165eb335782d71d92.zip
Fixes synthesis of type for the object which holds info.
about a __block cxx object. llvm-svn: 119411
Diffstat (limited to 'clang/lib/CodeGen/CGDecl.cpp')
-rw-r--r--clang/lib/CodeGen/CGDecl.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGDecl.cpp b/clang/lib/CodeGen/CGDecl.cpp
index cb0b09da5c6..7ccd80d0e8f 100644
--- a/clang/lib/CodeGen/CGDecl.cpp
+++ b/clang/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;
}
OpenPOWER on IntegriCloud