@@ -2905,13 +2905,11 @@ CGObjCGNU::GenerateMessageSend(CodeGenFunction &CGF,
29052905 break ;
29062906 case CodeGenOptions::Mixed:
29072907 case CodeGenOptions::NonLegacy:
2908+ StringRef name = " objc_msgSend" ;
29082909 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" ;
29132911 } else if (CGM.ReturnTypeUsesSRet (MSI.CallInfo )) {
2914- StringRef name = " objc_msgSend_stret" ;
2912+ name = " objc_msgSend_stret" ;
29152913
29162914 // The address of the memory block is be passed in x8 for POD type,
29172915 // or in x0 for non-POD type (marked as inreg).
@@ -2922,19 +2920,14 @@ CGObjCGNU::GenerateMessageSend(CodeGenFunction &CGF,
29222920 .isWindowsMSVCEnvironment () &&
29232921 CGM.getContext ().getTargetInfo ().getTriple ().isAArch64 ();
29242922 if (shouldCheckForInReg && CGM.ReturnTypeHasInReg (MSI.CallInfo )) {
2925- name = " objc_msgSend_stret2_np " ;
2923+ name = " objc_msgSend_stret2 " ;
29262924 }
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 ();
29372925 }
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 ();
29382931 }
29392932
29402933 // Reset the receiver in case the lookup modified it
0 commit comments