@@ -873,7 +873,8 @@ ProtocolConformanceDeserializer::readSpecializedProtocolConformance(
873873 auto subMap = subMapOrError.get ();
874874
875875 ProtocolConformanceRef genericConformance;
876- UNWRAP (MF.getConformanceChecked (conformanceID), genericConformance);
876+ SET_OR_RETURN_ERROR (genericConformance,
877+ MF.getConformanceChecked (conformanceID));
877878
878879 PrettyStackTraceDecl traceTo (" ... to" , genericConformance.getRequirement ());
879880 ++NumNormalProtocolConformancesLoaded;
@@ -906,7 +907,8 @@ ProtocolConformanceDeserializer::readInheritedProtocolConformance(
906907 conformingType);
907908
908909 ProtocolConformanceRef inheritedConformance;
909- UNWRAP (MF.getConformanceChecked (conformanceID), inheritedConformance);
910+ SET_OR_RETURN_ERROR (inheritedConformance,
911+ MF.getConformanceChecked (conformanceID));
910912 PrettyStackTraceDecl traceTo (" ... to" ,
911913 inheritedConformance.getRequirement ());
912914
@@ -957,12 +959,12 @@ ProtocolConformanceDeserializer::readNormalProtocolConformanceXRef(
957959 moduleID);
958960
959961 Decl *maybeNominal;
960- UNWRAP ( MF.getDeclChecked (nominalID), maybeNominal );
962+ SET_OR_RETURN_ERROR (maybeNominal, MF.getDeclChecked (nominalID));
961963 auto nominal = cast<NominalTypeDecl>(maybeNominal);
962964 PrettyStackTraceDecl trace (" cross-referencing conformance for" , nominal);
963965
964966 Decl *maybeProto;
965- UNWRAP ( MF.getDeclChecked (protoID), maybeProto );
967+ SET_OR_RETURN_ERROR (maybeProto, MF.getDeclChecked (protoID));
966968 auto proto = cast<ProtocolDecl>(maybeProto);
967969 PrettyStackTraceDecl traceTo (" ... to" , proto);
968970
@@ -7915,7 +7917,8 @@ Expected<Type> DESERIALIZE_TYPE(SIL_FUNCTION_TYPE)(
79157917 ProtocolConformanceRef witnessMethodConformance;
79167918 if (*representation == swift::SILFunctionTypeRepresentation::WitnessMethod) {
79177919 auto conformanceID = variableData[nextVariableDataIndex++];
7918- UNWRAP (MF.getConformanceChecked (conformanceID), witnessMethodConformance);
7920+ SET_OR_RETURN_ERROR (witnessMethodConformance,
7921+ MF.getConformanceChecked (conformanceID));
79197922 }
79207923
79217924 GenericSignature invocationSig =
0 commit comments