]> granicus.if.org Git - clang/commitdiff
Use CGCall infrastructure to call enumeration mutation function.
authorDaniel Dunbar <daniel@zuster.org>
Tue, 3 Feb 2009 23:55:40 +0000 (23:55 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Tue, 3 Feb 2009 23:55:40 +0000 (23:55 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63685 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGObjC.cpp

index ef4cf04073d182a2a14dd7cfa916c0745840c000..1443f2e4e9cbdc397ef8efb4fad3851212583eba 100644 (file)
@@ -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);