diff options
author | Mike Stump <mrs@apple.com> | 2009-03-07 06:04:31 +0000 |
---|---|---|
committer | Mike Stump <mrs@apple.com> | 2009-03-07 06:04:31 +0000 |
commit | f4bc312fc701100af8d3b5af73366715169f5585 (patch) | |
tree | 6596ee2eeaed6626dd61e2792e90e5e8e6ef6540 /lib/CodeGen/CGDecl.cpp | |
parent | 8339b35ca05dd040a9a0ecfc92e7b49d80c5a96b (diff) |
Remove some FIXMEs for block literals that should be close to working.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66322 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDecl.cpp')
-rw-r--r-- | lib/CodeGen/CGDecl.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/CodeGen/CGDecl.cpp b/lib/CodeGen/CGDecl.cpp index 1322ca223a..abb13376c7 100644 --- a/lib/CodeGen/CGDecl.cpp +++ b/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 |