From fe2b2c08984f861f82339138302689480c658ecd Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Thu, 4 Sep 2008 21:54:37 +0000 Subject: [PATCH] Fix infinite loop in for ... in code generation. - Patch via Thomas Clement, thanks! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55804 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGObjC.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/CodeGen/CGObjC.cpp b/lib/CodeGen/CGObjC.cpp index af79b66106..f7b8efbfe7 100644 --- a/lib/CodeGen/CGObjC.cpp +++ b/lib/CodeGen/CGObjC.cpp @@ -435,7 +435,7 @@ void CodeGenFunction::EmitObjCForCollectionStmt(const ObjCForCollectionStmt &S) llvm::BasicBlock *FetchMore = llvm::BasicBlock::Create("fetchmore"); llvm::Value *IsLess = Builder.CreateICmpULT(Counter, Limit, "isless"); - Builder.CreateCondBr(IsLess, LoopStart, FetchMore); + Builder.CreateCondBr(IsLess, LoopBody, FetchMore); // Fetch more elements. EmitBlock(FetchMore);