summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGObjCRuntime.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen/CGObjCRuntime.cpp')
-rw-r--r--clang/lib/CodeGen/CGObjCRuntime.cpp20
1 files changed, 5 insertions, 15 deletions
diff --git a/clang/lib/CodeGen/CGObjCRuntime.cpp b/clang/lib/CodeGen/CGObjCRuntime.cpp
index 01042536a52..0caf6d9f210 100644
--- a/clang/lib/CodeGen/CGObjCRuntime.cpp
+++ b/clang/lib/CodeGen/CGObjCRuntime.cpp
@@ -363,25 +363,15 @@ CGObjCRuntime::getMessageSendInfo(const ObjCMethodDecl *method,
llvm::PointerType *signatureType =
CGM.getTypes().GetFunctionType(signature)->getPointerTo();
- // If that's not variadic, there's no need to recompute the ABI
- // arrangement.
- if (!signature.isVariadic())
- return MessageSendInfo(signature, signatureType);
-
- // Otherwise, there is.
- FunctionType::ExtInfo einfo = signature.getExtInfo();
- const CGFunctionInfo &argsInfo =
- CGM.getTypes().arrangeFreeFunctionCall(resultType, callArgs, einfo,
- signature.getRequiredArgs());
-
- return MessageSendInfo(argsInfo, signatureType);
+ const CGFunctionInfo &signatureForCall =
+ CGM.getTypes().arrangeCall(signature, callArgs);
+
+ return MessageSendInfo(signatureForCall, signatureType);
}
// There's no method; just use a default CC.
const CGFunctionInfo &argsInfo =
- CGM.getTypes().arrangeFreeFunctionCall(resultType, callArgs,
- FunctionType::ExtInfo(),
- RequiredArgs::All);
+ CGM.getTypes().arrangeUnprototypedObjCMessageSend(resultType, callArgs);
// Derive the signature to call from that.
llvm::PointerType *signatureType =
OpenPOWER on IntegriCloud