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
This commit is contained in:
Daniel Dunbar 2008-09-04 21:54:37 +00:00
Родитель b497ebdce3
Коммит fe2b2c0898
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -435,7 +435,7 @@ void CodeGenFunction::EmitObjCForCollectionStmt(const ObjCForCollectionStmt &S)
llvm::BasicBlock *FetchMore = llvm::BasicBlock::Create("fetchmore"); llvm::BasicBlock *FetchMore = llvm::BasicBlock::Create("fetchmore");
llvm::Value *IsLess = Builder.CreateICmpULT(Counter, Limit, "isless"); llvm::Value *IsLess = Builder.CreateICmpULT(Counter, Limit, "isless");
Builder.CreateCondBr(IsLess, LoopStart, FetchMore); Builder.CreateCondBr(IsLess, LoopBody, FetchMore);
// Fetch more elements. // Fetch more elements.
EmitBlock(FetchMore); EmitBlock(FetchMore);