@@ -653,7 +653,7 @@ void SignatureExpansion::expandResult(
653653 const TypeInfo *directResultTypeInfo;
654654 std::tie (ResultIRType, directResultTypeInfo) = expandDirectResult ();
655655
656- if (!fnConv.hasIndirectSILResults () && !fnConv. hasIndirectSILErrorResults ()) {
656+ if (!fnConv.hasIndirectSILErrorResults ()) {
657657 llvm::Type *directErrorType;
658658 const TypeInfo *directErrorTypeInfo;
659659 std::tie (directErrorType, directErrorTypeInfo) = expandDirectErrorType ();
@@ -2043,8 +2043,7 @@ void SignatureExpansion::expandParameters(
20432043 auto &errorTI = IGM.getTypeInfo (errorType);
20442044 auto &nativeError = errorTI.nativeReturnValueSchema (IGM);
20452045
2046- if (getSILFuncConventions ().hasIndirectSILResults () ||
2047- getSILFuncConventions ().hasIndirectSILErrorResults () ||
2046+ if (getSILFuncConventions ().hasIndirectSILErrorResults () ||
20482047 native.requiresIndirect () ||
20492048 nativeError.shouldReturnTypedErrorIndirectly ()) {
20502049 ParamIRTypes.push_back (IGM.getStorageType (errorType)->getPointerTo ());
@@ -2607,8 +2606,7 @@ class SyncCallEmission final : public CallEmission {
26072606 auto &errorSchema =
26082607 IGF.IGM .getTypeInfo (silErrorTy).nativeReturnValueSchema (IGF.IGM );
26092608
2610- if (fnConv.hasIndirectSILResults () ||
2611- nativeSchema.requiresIndirect () ||
2609+ if (nativeSchema.requiresIndirect () ||
26122610 errorSchema.shouldReturnTypedErrorIndirectly ()) {
26132611 // Return the error indirectly.
26142612 auto buf = IGF.getCalleeTypedErrorResultSlot (silErrorTy);
@@ -4367,9 +4365,8 @@ bool CallEmission::mayReturnTypedErrorDirectly() const {
43674365 SILFunctionConventions fnConv (getCallee ().getOrigFunctionType (),
43684366 IGF.getSILModule ());
43694367 bool mayReturnErrorDirectly = false ;
4370- if (!convertDirectToIndirectReturn && !fnConv.hasIndirectSILResults () &&
4371- !fnConv.hasIndirectSILErrorResults () && fnConv.funcTy ->hasErrorResult () &&
4372- fnConv.isTypedError ()) {
4368+ if (!convertDirectToIndirectReturn && !fnConv.hasIndirectSILErrorResults () &&
4369+ fnConv.funcTy ->hasErrorResult () && fnConv.isTypedError ()) {
43734370 auto errorType =
43744371 fnConv.getSILErrorType (IGF.IGM .getMaximalTypeExpansionContext ());
43754372 auto &errorSchema =
0 commit comments