[cfe-commits] r57056 - /cfe/trunk/Driver/RewriteBlocks.cpp
Steve Naroff
snaroff at apple.com
Sat Oct 4 11:00:11 PDT 2008
Author: snaroff
Date: Sat Oct 4 13:00:11 2008
New Revision: 57056
URL: http://llvm.org/viewvc/llvm-project?rev=57056&view=rev
Log:
Handle bookkeeping for imported blocks (in SynthesizeBlockImpl).
This code was "lost" with my recent changes to SynthesizeBlockFunc.
Modified:
cfe/trunk/Driver/RewriteBlocks.cpp
Modified: cfe/trunk/Driver/RewriteBlocks.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Driver/RewriteBlocks.cpp?rev=57056&r1=57055&r2=57056&view=diff
==============================================================================
--- cfe/trunk/Driver/RewriteBlocks.cpp (original)
+++ cfe/trunk/Driver/RewriteBlocks.cpp Sat Oct 4 13:00:11 2008
@@ -483,7 +483,14 @@
for (unsigned i = 0; i < BlockDeclRefs.size(); i++)
if (BlockDeclRefs[i]->isByRef())
BlockByRefDecls.insert(BlockDeclRefs[i]->getDecl());
-
+
+ // Find any imported blocks...they will need special attention.
+ for (unsigned i = 0; i < BlockDeclRefs.size(); i++)
+ if (isBlockPointerType(BlockDeclRefs[i]->getType())) {
+ GetBlockCallExprs(CE);
+ ImportedBlockDecls.insert(BlockDeclRefs[i]->getDecl());
+ }
+
// Output all "by copy" declarations.
for (llvm::SmallPtrSet<ValueDecl*,8>::iterator I = BlockByCopyDecls.begin(),
E = BlockByCopyDecls.end(); I != E; ++I) {
More information about the cfe-commits
mailing list