summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGDecl.cpp
diff options
context:
space:
mode:
authorMike Stump <mrs@apple.com>2009-03-07 06:04:31 +0000
committerMike Stump <mrs@apple.com>2009-03-07 06:04:31 +0000
commit90d8daf5922b6ef88933a466cf064313a922e3f8 (patch)
tree874f0f6f5b67225db8201d4c8e77ebac4a3b621f /clang/lib/CodeGen/CGDecl.cpp
parenta374b68b5ad5278842b4b7c27d6f9562762dc7ce (diff)
downloadbcm5719-llvm-90d8daf5922b6ef88933a466cf064313a922e3f8.tar.gz
bcm5719-llvm-90d8daf5922b6ef88933a466cf064313a922e3f8.zip
Remove some FIXMEs for block literals that should be close to working.
llvm-svn: 66322
Diffstat (limited to 'clang/lib/CodeGen/CGDecl.cpp')
-rw-r--r--clang/lib/CodeGen/CGDecl.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGDecl.cpp b/clang/lib/CodeGen/CGDecl.cpp
index 1322ca223ac..abb13376c7b 100644
--- a/clang/lib/CodeGen/CGDecl.cpp
+++ b/clang/lib/CodeGen/CGDecl.cpp
@@ -340,6 +340,7 @@ void CodeGenFunction::EmitLocalBlockVarDecl(const VarDecl &D) {
// The block literal will need a copy/destroy helper.
BlockHasCopyDispose = true;
+ needsDispose = true;
if (Ty->isBlockPointerType()) {
flag |= BLOCK_FIELD_IS_BLOCK;
@@ -348,7 +349,10 @@ void CodeGenFunction::EmitLocalBlockVarDecl(const VarDecl &D) {
flag |= BLOCK_FIELD_IS_OBJECT;
flags |= BLOCK_HAS_COPY_DISPOSE;
}
- // FIXME: Need to set BLOCK_FIELD_IS_WEAK as appropriate.
+
+ // FIXME: Someone double check this.
+ if (Ty.isObjCGCWeak())
+ flag |= BLOCK_FIELD_IS_WEAK;
int isa = 0;
if (flag&BLOCK_FIELD_IS_WEAK)
@@ -380,7 +384,6 @@ void CodeGenFunction::EmitLocalBlockVarDecl(const VarDecl &D) {
Builder.CreateStore(BuildbyrefDestroyHelper(DeclPtr->getType(), flag),
destroy_helper);
}
- needsDispose = true;
}
// Handle the cleanup attribute
OpenPOWER on IntegriCloud