Skip to content

Commit 94902b2

Browse files
hmelderdavidchisnall
authored andcommitted
Remove np suffix from objc_msgSend_stret2_np
1 parent 333dbf5 commit 94902b2

File tree

2 files changed

+11
-18
lines changed

2 files changed

+11
-18
lines changed

clang/lib/CodeGen/CGObjCGNU.cpp

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -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

clang/test/CodeGenObjCXX/msabi-stret-arm64.mm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ void test0(MsgTest *t) {
7070
F1 ret2 = [t smallF1];
7171
// CHECK: call {{.*}} @objc_msgSend_stret
7272
S2 ret3 = [t stretS2];
73-
// CHECK: call {{.*}} @objc_msgSend_stret2_np
73+
// CHECK: call {{.*}} @objc_msgSend_stret2
7474
S3 ret4 = [t stretInRegS3];
75-
// CHECK: call {{.*}} @objc_msgSend_stret2_np
75+
// CHECK: call {{.*}} @objc_msgSend_stret2
7676
S3 ret5 = [MsgTest msgTestStretInRegS3];
7777
}

0 commit comments

Comments
 (0)