Couple of code gen. fixes in ObjC's colection-statement. Hard

to track down, easy to fix. This is on going.

llvm-svn: 61817
This commit is contained in:
Fariborz Jahanian 2009-01-06 18:56:31 +00:00
parent 1f42c2e94d
commit 6e7ecc84c8
1 changed files with 3 additions and 1 deletions

View File

@ -504,7 +504,9 @@ void CodeGenFunction::EmitObjCForCollectionStmt(const ObjCForCollectionStmt &S)
EmitBlock(AfterBody);
llvm::BasicBlock *FetchMore = createBasicBlock("fetchmore");
Counter = Builder.CreateLoad(CounterPtr);
Limit = Builder.CreateLoad(LimitPtr);
llvm::Value *IsLess = Builder.CreateICmpULT(Counter, Limit, "isless");
Builder.CreateCondBr(IsLess, LoopBody, FetchMore);