@@ -2905,13 +2905,11 @@ CGObjCGNU::GenerateMessageSend(CodeGenFunction &CGF,
2905
2905
break ;
2906
2906
case CodeGenOptions::Mixed:
2907
2907
case CodeGenOptions::NonLegacy:
2908
+ StringRef name = " objc_msgSend" ;
2908
2909
if (CGM.ReturnTypeUsesFPRet (ResultType)) {
2909
- imp =
2910
- CGM.CreateRuntimeFunction (llvm::FunctionType::get (IdTy, IdTy, true ),
2911
- " objc_msgSend_fpret" )
2912
- .getCallee ();
2910
+ name = " objc_msgSend_fpret" ;
2913
2911
} else if (CGM.ReturnTypeUsesSRet (MSI.CallInfo )) {
2914
- StringRef name = " objc_msgSend_stret" ;
2912
+ name = " objc_msgSend_stret" ;
2915
2913
2916
2914
// The address of the memory block is be passed in x8 for POD type,
2917
2915
// or in x0 for non-POD type (marked as inreg).
@@ -2922,19 +2920,14 @@ CGObjCGNU::GenerateMessageSend(CodeGenFunction &CGF,
2922
2920
.isWindowsMSVCEnvironment () &&
2923
2921
CGM.getContext ().getTargetInfo ().getTriple ().isAArch64 ();
2924
2922
if (shouldCheckForInReg && CGM.ReturnTypeHasInReg (MSI.CallInfo )) {
2925
- name = " objc_msgSend_stret2_np " ;
2923
+ name = " objc_msgSend_stret2 " ;
2926
2924
}
2927
-
2928
- // The actual types here don't matter - we're going to bitcast the
2929
- // function anyway
2930
- imp = CGM.CreateRuntimeFunction (
2931
- llvm::FunctionType::get (IdTy, IdTy, true ), name)
2932
- .getCallee ();
2933
- } else {
2934
- imp = CGM.CreateRuntimeFunction (
2935
- llvm::FunctionType::get (IdTy, IdTy, true ), " objc_msgSend" )
2936
- .getCallee ();
2937
2925
}
2926
+ // The actual types here don't matter - we're going to bitcast the
2927
+ // function anyway
2928
+ imp = CGM.CreateRuntimeFunction (
2929
+ llvm::FunctionType::get (IdTy, IdTy, true ), name)
2930
+ .getCallee ();
2938
2931
}
2939
2932
2940
2933
// Reset the receiver in case the lookup modified it
0 commit comments