objc IRGen for Next runtime message API.
The prototype for objc_msgSend() is technically variadic -
`id objc_msgSend(id, SEL, ...)`.
But all method calls should use a prototype that matches the method,
not the prototype for objc_msgSend itself().
// rdar://9048030
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126678 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGObjCMac.cpp b/lib/CodeGen/CGObjCMac.cpp
index 8dbd85f..9044669 100644
--- a/lib/CodeGen/CGObjCMac.cpp
+++ b/lib/CodeGen/CGObjCMac.cpp
@@ -183,7 +183,7 @@
Params.push_back(SelectorPtrTy);
return
CGM.CreateRuntimeFunction(llvm::FunctionType::get(ObjectPtrTy,
- Params, true),
+ Params, false),
"objc_msgSend");
}
@@ -194,7 +194,7 @@
Params.push_back(SelectorPtrTy);
return
CGM.CreateRuntimeFunction(llvm::FunctionType::get(llvm::Type::getVoidTy(VMContext),
- Params, true),
+ Params, false),
"objc_msgSend_stret");
}
@@ -209,7 +209,7 @@
CGM.CreateRuntimeFunction(llvm::FunctionType::get(
llvm::Type::getDoubleTy(VMContext),
Params,
- true),
+ false),
"objc_msgSend_fpret");
}
@@ -221,7 +221,7 @@
Params.push_back(SuperPtrTy);
Params.push_back(SelectorPtrTy);
return CGM.CreateRuntimeFunction(llvm::FunctionType::get(ObjectPtrTy,
- Params, true),
+ Params, false),
SuperName);
}
@@ -232,7 +232,7 @@
Params.push_back(SuperPtrTy);
Params.push_back(SelectorPtrTy);
return CGM.CreateRuntimeFunction(llvm::FunctionType::get(ObjectPtrTy,
- Params, true),
+ Params, false),
SuperName);
}
@@ -245,7 +245,7 @@
Params.push_back(SelectorPtrTy);
return CGM.CreateRuntimeFunction(
llvm::FunctionType::get(llvm::Type::getVoidTy(VMContext),
- Params, true),
+ Params, false),
"objc_msgSendSuper_stret");
}
@@ -258,7 +258,7 @@
Params.push_back(SelectorPtrTy);
return CGM.CreateRuntimeFunction(
llvm::FunctionType::get(llvm::Type::getVoidTy(VMContext),
- Params, true),
+ Params, false),
"objc_msgSendSuper2_stret");
}
@@ -721,7 +721,7 @@
Params.push_back(ObjectPtrTy);
Params.push_back(MessageRefPtrTy);
return CGM.CreateRuntimeFunction(llvm::FunctionType::get(ObjectPtrTy,
- Params, true),
+ Params, false),
"objc_msgSend_fixup");
}
@@ -731,7 +731,7 @@
Params.push_back(ObjectPtrTy);
Params.push_back(MessageRefPtrTy);
return CGM.CreateRuntimeFunction(llvm::FunctionType::get(ObjectPtrTy,
- Params, true),
+ Params, false),
"objc_msgSend_fpret_fixup");
}
@@ -741,7 +741,7 @@
Params.push_back(ObjectPtrTy);
Params.push_back(MessageRefPtrTy);
return CGM.CreateRuntimeFunction(llvm::FunctionType::get(ObjectPtrTy,
- Params, true),
+ Params, false),
"objc_msgSend_stret_fixup");
}
@@ -752,7 +752,7 @@
Params.push_back(SuperPtrTy);
Params.push_back(SuperMessageRefPtrTy);
return CGM.CreateRuntimeFunction(llvm::FunctionType::get(ObjectPtrTy,
- Params, true),
+ Params, false),
"objc_msgSendSuper2_fixup");
}
@@ -763,7 +763,7 @@
Params.push_back(SuperPtrTy);
Params.push_back(SuperMessageRefPtrTy);
return CGM.CreateRuntimeFunction(llvm::FunctionType::get(ObjectPtrTy,
- Params, true),
+ Params, false),
"objc_msgSendSuper2_stret_fixup");
}
@@ -5693,7 +5693,7 @@
FunctionType::ExtInfo());
llvm::Value *Callee = CGF.Builder.CreateStructGEP(Arg1, 0);
Callee = CGF.Builder.CreateLoad(Callee);
- const llvm::FunctionType *FTy = Types.GetFunctionType(FnInfo1, true);
+ const llvm::FunctionType *FTy = Types.GetFunctionType(FnInfo1, false);
Callee = CGF.Builder.CreateBitCast(Callee,
llvm::PointerType::getUnqual(FTy));
return CGF.EmitCall(FnInfo1, Callee, Return, ActualArgs);