diff options
author | John McCall <rjmccall@apple.com> | 2011-08-05 00:14:38 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2011-08-05 00:14:38 +0000 |
commit | 91e82dd47734ecd8a190a0e10b2283bae34319ef (patch) | |
tree | bd4529a6a1757bd074dda5aad07fcd266935e1b5 /clang/lib/CodeGen | |
parent | 4283092a4b86aed16a5e27f822d641012d31267d (diff) | |
download | bcm5719-llvm-91e82dd47734ecd8a190a0e10b2283bae34319ef.tar.gz bcm5719-llvm-91e82dd47734ecd8a190a0e10b2283bae34319ef.zip |
The continue label in an ARC for-in loop should not involve
releasing the collection.
llvm-svn: 136949
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r-- | clang/lib/CodeGen/CGObjC.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGObjC.cpp b/clang/lib/CodeGen/CGObjC.cpp index a51a8705f48..944a0bd2a2c 100644 --- a/clang/lib/CodeGen/CGObjC.cpp +++ b/clang/lib/CodeGen/CGObjC.cpp @@ -995,7 +995,6 @@ void CodeGenFunction::EmitObjCForCollectionStmt(const ObjCForCollectionStmt &S){ variable = EmitAutoVarAlloca(*cast<VarDecl>(SD->getSingleDecl())); JumpDest LoopEnd = getJumpDestInCurrentScope("forcoll.end"); - JumpDest AfterBody = getJumpDestInCurrentScope("forcoll.next"); // Fast enumeration state. QualType StateTy = getContext().getObjCFastEnumerationStateType(); @@ -1031,6 +1030,10 @@ void CodeGenFunction::EmitObjCForCollectionStmt(const ObjCForCollectionStmt &S){ Collection = EmitScalarExpr(S.getCollection()); } + // The 'continue' label needs to appear within the cleanup for the + // collection object. + JumpDest AfterBody = getJumpDestInCurrentScope("forcoll.next"); + // Send it our message: CallArgList Args; |