Generate correct prototype for objc_enumerationMutation.
 - This was a latent bug exposed by the recent objc type changes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75383 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGObjCMac.cpp b/lib/CodeGen/CGObjCMac.cpp
index 4677e1d..699fb9a 100644
--- a/lib/CodeGen/CGObjCMac.cpp
+++ b/lib/CodeGen/CGObjCMac.cpp
@@ -314,11 +314,14 @@
   }
   
   llvm::Constant *getEnumerationMutationFn() {
+    CodeGen::CodeGenTypes &Types = CGM.getTypes();
+    ASTContext &Ctx = CGM.getContext();
     // void objc_enumerationMutation (id)
-    std::vector<const llvm::Type*> Args;
-    Args.push_back(ObjectPtrTy);
-    llvm::FunctionType *FTy = 
-      llvm::FunctionType::get(llvm::Type::VoidTy, Args, false);
+    llvm::SmallVector<QualType,16> Params;
+    QualType IdType = Ctx.getObjCIdType();
+    Params.push_back(IdType);
+    const llvm::FunctionType *FTy =
+      Types.GetFunctionType(Types.getFunctionInfo(Ctx.VoidTy, Params), false);
     return CGM.CreateRuntimeFunction(FTy, "objc_enumerationMutation");
   }