diff options
author | Mike Stump <mrs@apple.com> | 2009-05-01 01:31:57 +0000 |
---|---|---|
committer | Mike Stump <mrs@apple.com> | 2009-05-01 01:31:57 +0000 |
commit | dd2fb9c5ebc02f48a5b91a9c2a5f1e4562d02a0b (patch) | |
tree | dcc7af7b431730efd269220965e8b38fdac147d4 /lib/CodeGen/CGBlocks.cpp | |
parent | bad3a94d506874355fc15b336c6f0ed360e46a06 (diff) |
Don't assert when we think we need copy/dispose, but don't need them.
Radar 6838889
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70525 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGBlocks.cpp')
-rw-r--r-- | lib/CodeGen/CGBlocks.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/CGBlocks.cpp b/lib/CodeGen/CGBlocks.cpp index 8ab4a44f40..dee9d4ce9b 100644 --- a/lib/CodeGen/CGBlocks.cpp +++ b/lib/CodeGen/CGBlocks.cpp @@ -158,6 +158,8 @@ llvm::Value *CodeGenFunction::BuildBlockLiteralTmp(const BlockExpr *BE) { BlockHasCopyDispose |= subBlockHasCopyDispose; Elts[3] = Fn; + // FIXME: Don't use BlockHasCopyDispose, it is set more often then necessary, for + // example: { ^{ __block int i; ^{ i = 1; }(); }(); } if (subBlockHasCopyDispose) flags |= BLOCK_HAS_COPY_DISPOSE; @@ -557,7 +559,6 @@ BlockModule::GetAddrOfGlobalBlock(const BlockExpr *BE, const char * n) { subBlockHasCopyDispose); assert(subBlockSize == BlockLiteralSize && "no imports allowed for global block"); - assert(!subBlockHasCopyDispose && "no imports allowed for global block"); // isa LiteralFields[0] = getNSConcreteGlobalBlock(); |