@@ -873,7 +873,8 @@ ProtocolConformanceDeserializer::readSpecializedProtocolConformance(
873
873
auto subMap = subMapOrError.get ();
874
874
875
875
ProtocolConformanceRef genericConformance;
876
- UNWRAP (MF.getConformanceChecked (conformanceID), genericConformance);
876
+ SET_OR_RETURN_ERROR (genericConformance,
877
+ MF.getConformanceChecked (conformanceID));
877
878
878
879
PrettyStackTraceDecl traceTo (" ... to" , genericConformance.getRequirement ());
879
880
++NumNormalProtocolConformancesLoaded;
@@ -906,7 +907,8 @@ ProtocolConformanceDeserializer::readInheritedProtocolConformance(
906
907
conformingType);
907
908
908
909
ProtocolConformanceRef inheritedConformance;
909
- UNWRAP (MF.getConformanceChecked (conformanceID), inheritedConformance);
910
+ SET_OR_RETURN_ERROR (inheritedConformance,
911
+ MF.getConformanceChecked (conformanceID));
910
912
PrettyStackTraceDecl traceTo (" ... to" ,
911
913
inheritedConformance.getRequirement ());
912
914
@@ -957,12 +959,12 @@ ProtocolConformanceDeserializer::readNormalProtocolConformanceXRef(
957
959
moduleID);
958
960
959
961
Decl *maybeNominal;
960
- UNWRAP ( MF.getDeclChecked (nominalID), maybeNominal );
962
+ SET_OR_RETURN_ERROR (maybeNominal, MF.getDeclChecked (nominalID));
961
963
auto nominal = cast<NominalTypeDecl>(maybeNominal);
962
964
PrettyStackTraceDecl trace (" cross-referencing conformance for" , nominal);
963
965
964
966
Decl *maybeProto;
965
- UNWRAP ( MF.getDeclChecked (protoID), maybeProto );
967
+ SET_OR_RETURN_ERROR (maybeProto, MF.getDeclChecked (protoID));
966
968
auto proto = cast<ProtocolDecl>(maybeProto);
967
969
PrettyStackTraceDecl traceTo (" ... to" , proto);
968
970
@@ -7915,7 +7917,8 @@ Expected<Type> DESERIALIZE_TYPE(SIL_FUNCTION_TYPE)(
7915
7917
ProtocolConformanceRef witnessMethodConformance;
7916
7918
if (*representation == swift::SILFunctionTypeRepresentation::WitnessMethod) {
7917
7919
auto conformanceID = variableData[nextVariableDataIndex++];
7918
- UNWRAP (MF.getConformanceChecked (conformanceID), witnessMethodConformance);
7920
+ SET_OR_RETURN_ERROR (witnessMethodConformance,
7921
+ MF.getConformanceChecked (conformanceID));
7919
7922
}
7920
7923
7921
7924
GenericSignature invocationSig =
0 commit comments