@@ -653,7 +653,7 @@ void SignatureExpansion::expandResult(
653
653
const TypeInfo *directResultTypeInfo;
654
654
std::tie (ResultIRType, directResultTypeInfo) = expandDirectResult ();
655
655
656
- if (!fnConv.hasIndirectSILResults () && !fnConv. hasIndirectSILErrorResults ()) {
656
+ if (!fnConv.hasIndirectSILErrorResults ()) {
657
657
llvm::Type *directErrorType;
658
658
const TypeInfo *directErrorTypeInfo;
659
659
std::tie (directErrorType, directErrorTypeInfo) = expandDirectErrorType ();
@@ -2043,8 +2043,7 @@ void SignatureExpansion::expandParameters(
2043
2043
auto &errorTI = IGM.getTypeInfo (errorType);
2044
2044
auto &nativeError = errorTI.nativeReturnValueSchema (IGM);
2045
2045
2046
- if (getSILFuncConventions ().hasIndirectSILResults () ||
2047
- getSILFuncConventions ().hasIndirectSILErrorResults () ||
2046
+ if (getSILFuncConventions ().hasIndirectSILErrorResults () ||
2048
2047
native.requiresIndirect () ||
2049
2048
nativeError.shouldReturnTypedErrorIndirectly ()) {
2050
2049
ParamIRTypes.push_back (IGM.getStorageType (errorType)->getPointerTo ());
@@ -2607,8 +2606,7 @@ class SyncCallEmission final : public CallEmission {
2607
2606
auto &errorSchema =
2608
2607
IGF.IGM .getTypeInfo (silErrorTy).nativeReturnValueSchema (IGF.IGM );
2609
2608
2610
- if (fnConv.hasIndirectSILResults () ||
2611
- nativeSchema.requiresIndirect () ||
2609
+ if (nativeSchema.requiresIndirect () ||
2612
2610
errorSchema.shouldReturnTypedErrorIndirectly ()) {
2613
2611
// Return the error indirectly.
2614
2612
auto buf = IGF.getCalleeTypedErrorResultSlot (silErrorTy);
@@ -4367,9 +4365,8 @@ bool CallEmission::mayReturnTypedErrorDirectly() const {
4367
4365
SILFunctionConventions fnConv (getCallee ().getOrigFunctionType (),
4368
4366
IGF.getSILModule ());
4369
4367
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 ()) {
4373
4370
auto errorType =
4374
4371
fnConv.getSILErrorType (IGF.IGM .getMaximalTypeExpansionContext ());
4375
4372
auto &errorSchema =
0 commit comments