@@ -3366,7 +3366,7 @@ std::string RewriteObjC::SynthesizeBlockFunc(BlockExpr *CE, int i,
3366
3366
3367
3367
// Create local declarations to avoid rewriting all closure decl ref exprs.
3368
3368
// First, emit a declaration for all "by ref" decls.
3369
- for (SmallVector <ValueDecl*,8 >::iterator I = BlockByRefDecls.begin(),
3369
+ for (SmallVectorImpl <ValueDecl * >::iterator I = BlockByRefDecls.begin(),
3370
3370
E = BlockByRefDecls.end(); I != E; ++I) {
3371
3371
S += " ";
3372
3372
std::string Name = (*I)->getNameAsString();
@@ -3377,7 +3377,7 @@ std::string RewriteObjC::SynthesizeBlockFunc(BlockExpr *CE, int i,
3377
3377
S += Name + " = __cself->" + (*I)->getNameAsString() + "; // bound by ref\n";
3378
3378
}
3379
3379
// Next, emit a declaration for all "by copy" declarations.
3380
- for (SmallVector <ValueDecl*,8 >::iterator I = BlockByCopyDecls.begin(),
3380
+ for (SmallVectorImpl <ValueDecl * >::iterator I = BlockByCopyDecls.begin(),
3381
3381
E = BlockByCopyDecls.end(); I != E; ++I) {
3382
3382
S += " ";
3383
3383
// Handle nested closure invocation. For example:
@@ -3478,7 +3478,7 @@ std::string RewriteObjC::SynthesizeBlockImpl(BlockExpr *CE, std::string Tag,
3478
3478
3479
3479
if (BlockDeclRefs.size()) {
3480
3480
// Output all "by copy" declarations.
3481
- for (SmallVector <ValueDecl*,8 >::iterator I = BlockByCopyDecls.begin(),
3481
+ for (SmallVectorImpl <ValueDecl * >::iterator I = BlockByCopyDecls.begin(),
3482
3482
E = BlockByCopyDecls.end(); I != E; ++I) {
3483
3483
S += " ";
3484
3484
std::string FieldName = (*I)->getNameAsString();
@@ -3507,7 +3507,7 @@ std::string RewriteObjC::SynthesizeBlockImpl(BlockExpr *CE, std::string Tag,
3507
3507
S += FieldName + ";\n";
3508
3508
}
3509
3509
// Output all "by ref" declarations.
3510
- for (SmallVector <ValueDecl*,8 >::iterator I = BlockByRefDecls.begin(),
3510
+ for (SmallVectorImpl <ValueDecl * >::iterator I = BlockByRefDecls.begin(),
3511
3511
E = BlockByRefDecls.end(); I != E; ++I) {
3512
3512
S += " ";
3513
3513
std::string FieldName = (*I)->getNameAsString();
@@ -3526,7 +3526,7 @@ std::string RewriteObjC::SynthesizeBlockImpl(BlockExpr *CE, std::string Tag,
3526
3526
Constructor += ", int flags=0)";
3527
3527
// Initialize all "by copy" arguments.
3528
3528
bool firsTime = true;
3529
- for (SmallVector <ValueDecl*,8 >::iterator I = BlockByCopyDecls.begin(),
3529
+ for (SmallVectorImpl <ValueDecl * >::iterator I = BlockByCopyDecls.begin(),
3530
3530
E = BlockByCopyDecls.end(); I != E; ++I) {
3531
3531
std::string Name = (*I)->getNameAsString();
3532
3532
if (firsTime) {
@@ -3541,7 +3541,7 @@ std::string RewriteObjC::SynthesizeBlockImpl(BlockExpr *CE, std::string Tag,
3541
3541
Constructor += Name + "(_" + Name + ")";
3542
3542
}
3543
3543
// Initialize all "by ref" arguments.
3544
- for (SmallVector <ValueDecl*,8 >::iterator I = BlockByRefDecls.begin(),
3544
+ for (SmallVectorImpl <ValueDecl * >::iterator I = BlockByRefDecls.begin(),
3545
3545
E = BlockByRefDecls.end(); I != E; ++I) {
3546
3546
std::string Name = (*I)->getNameAsString();
3547
3547
if (firsTime) {
@@ -4548,7 +4548,7 @@ Stmt *RewriteObjC::SynthBlockInitExpr(BlockExpr *Exp,
4548
4548
if (BlockDeclRefs.size()) {
4549
4549
Expr *Exp;
4550
4550
// Output all "by copy" declarations.
4551
- for (SmallVector <ValueDecl*,8 >::iterator I = BlockByCopyDecls.begin(),
4551
+ for (SmallVectorImpl <ValueDecl * >::iterator I = BlockByCopyDecls.begin(),
4552
4552
E = BlockByCopyDecls.end(); I != E; ++I) {
4553
4553
if (isObjCType((*I)->getType())) {
4554
4554
// FIXME: Conform to ABI ([[obj retain] autorelease]).
@@ -4582,7 +4582,7 @@ Stmt *RewriteObjC::SynthBlockInitExpr(BlockExpr *Exp,
4582
4582
InitExprs.push_back(Exp);
4583
4583
}
4584
4584
// Output all "by ref" declarations.
4585
- for (SmallVector <ValueDecl*,8 >::iterator I = BlockByRefDecls.begin(),
4585
+ for (SmallVectorImpl <ValueDecl * >::iterator I = BlockByRefDecls.begin(),
4586
4586
E = BlockByRefDecls.end(); I != E; ++I) {
4587
4587
ValueDecl *ND = (*I);
4588
4588
std::string Name(ND->getNameAsString());
0 commit comments