aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGObjC.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-02-03 23:55:40 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-02-03 23:55:40 +0000
commit2b2105e92fc77016992dae3f117f526e73af5ea9 (patch)
treeea65711235682e116b37699736442e8de27c36f3 /lib/CodeGen/CGObjC.cpp
parent2e4672b53107245deb998f55fb9dd77650d610dd (diff)
Use CGCall infrastructure to call enumeration mutation function.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63685 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGObjC.cpp')
-rw-r--r--lib/CodeGen/CGObjC.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/CodeGen/CGObjC.cpp b/lib/CodeGen/CGObjC.cpp
index ef4cf04073..1443f2e4e9 100644
--- a/lib/CodeGen/CGObjC.cpp
+++ b/lib/CodeGen/CGObjC.cpp
@@ -472,7 +472,13 @@ void CodeGenFunction::EmitObjCForCollectionStmt(const ObjCForCollectionStmt &S)
Builder.CreateBitCast(Collection,
ConvertType(getContext().getObjCIdType()),
"tmp");
- Builder.CreateCall(EnumerationMutationFn, V);
+ CallArgList Args2;
+ Args2.push_back(std::make_pair(RValue::get(V),
+ getContext().getObjCIdType()));
+ // FIXME: We shouldn't need to get the function info here, the
+ // runtime already should have computed it to build the function.
+ EmitCall(CGM.getTypes().getFunctionInfo(getContext().VoidTy, Args),
+ EnumerationMutationFn, Args2);
EmitBlock(WasNotMutated);