Type of msgSend message dispatch API is a vararg.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70404 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGObjCMac.cpp b/lib/CodeGen/CGObjCMac.cpp
index ae3c267..5b1a082 100644
--- a/lib/CodeGen/CGObjCMac.cpp
+++ b/lib/CodeGen/CGObjCMac.cpp
@@ -1413,7 +1413,9 @@
 
   CodeGenTypes &Types = CGM.getTypes();
   const CGFunctionInfo &FnInfo = Types.getFunctionInfo(ResultType, ActualArgs);
-  const llvm::FunctionType *FTy = Types.GetFunctionType(FnInfo, false);
+  // Type is a vararg. In 32bit code gen. it is ignored. In 64bit it is
+  // looked at.
+  const llvm::FunctionType *FTy = Types.GetFunctionType(FnInfo, true);
 
   llvm::Constant *Fn;
   if (CGM.ReturnTypeUsesSret(FnInfo)) {