diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2009-01-06 18:56:31 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2009-01-06 18:56:31 +0000 |
commit | f0906c4edb37b20141428ca77fa7dfd00b976eaf (patch) | |
tree | 4e07a3888b994cf0e12daa594761a34c203f6007 /lib/CodeGen/CGObjC.cpp | |
parent | 7ec5658f92fd5b65f682b6e942b95210426fc6e2 (diff) |
Couple of code gen. fixes in ObjC's colection-statement. Hard
to track down, easy to fix. This is on going.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61817 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGObjC.cpp')
-rw-r--r-- | lib/CodeGen/CGObjC.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/CodeGen/CGObjC.cpp b/lib/CodeGen/CGObjC.cpp index b8261a0c9f..fffd011fd6 100644 --- a/lib/CodeGen/CGObjC.cpp +++ b/lib/CodeGen/CGObjC.cpp @@ -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); |