summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGBlocks.cpp
diff options
context:
space:
mode:
authorMike Stump <mrs@apple.com>2009-05-01 01:31:57 +0000
committerMike Stump <mrs@apple.com>2009-05-01 01:31:57 +0000
commitd898026e8a8e4798b72db393cf73d256f0fb5451 (patch)
treea45f1e909a3a4347a041fed8669eba7784f8ce44 /clang/lib/CodeGen/CGBlocks.cpp
parentf8949a61bf8d9bd23cb5027244f1de68b30fda10 (diff)
downloadbcm5719-llvm-d898026e8a8e4798b72db393cf73d256f0fb5451.tar.gz
bcm5719-llvm-d898026e8a8e4798b72db393cf73d256f0fb5451.zip
Don't assert when we think we need copy/dispose, but don't need them.
Radar 6838889 llvm-svn: 70525
Diffstat (limited to 'clang/lib/CodeGen/CGBlocks.cpp')
-rw-r--r--clang/lib/CodeGen/CGBlocks.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGBlocks.cpp b/clang/lib/CodeGen/CGBlocks.cpp
index 8ab4a44f40b..dee9d4ce9b4 100644
--- a/clang/lib/CodeGen/CGBlocks.cpp
+++ b/clang/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();
OpenPOWER on IntegriCloud