aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGObjC.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2009-01-06 18:56:31 +0000
committerFariborz Jahanian <fjahanian@apple.com>2009-01-06 18:56:31 +0000
commitf0906c4edb37b20141428ca77fa7dfd00b976eaf (patch)
tree4e07a3888b994cf0e12daa594761a34c203f6007 /lib/CodeGen/CGObjC.cpp
parent7ec5658f92fd5b65f682b6e942b95210426fc6e2 (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.cpp4
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);