@@ -7088,7 +7088,8 @@ static llvm::Error consumeErrorIfXRefNonLoadedModule(llvm::Error &&error) {
7088
7088
// Missing module errors are most likely caused by an
7089
7089
// implementation-only import hiding types and decls.
7090
7090
// rdar://problem/60291019
7091
- if (error.isA <XRefNonLoadedModuleError>()) {
7091
+ if (error.isA <XRefNonLoadedModuleError>() ||
7092
+ error.isA <UnsafeDeserializationError>()) {
7092
7093
consumeError (std::move (error));
7093
7094
return llvm::Error::success ();
7094
7095
}
@@ -7100,7 +7101,8 @@ static llvm::Error consumeErrorIfXRefNonLoadedModule(llvm::Error &&error) {
7100
7101
auto errorInfo = takeErrorInfo (std::move (error));
7101
7102
auto *TE = static_cast <TypeError*>(errorInfo.get ());
7102
7103
7103
- if (TE->underlyingReasonIsA <XRefNonLoadedModuleError>()) {
7104
+ if (TE->underlyingReasonIsA <XRefNonLoadedModuleError>() ||
7105
+ TE->underlyingReasonIsA <UnsafeDeserializationError>()) {
7104
7106
consumeError (std::move (errorInfo));
7105
7107
return llvm::Error::success ();
7106
7108
}
@@ -7436,6 +7438,7 @@ void ModuleFile::finishNormalConformance(NormalProtocolConformance *conformance,
7436
7438
// errors - we're just doing a best effort to create the
7437
7439
// module in that case.
7438
7440
if (witnessSubstitutions.errorIsA <XRefNonLoadedModuleError>() ||
7441
+ witnessSubstitutions.errorIsA <UnsafeDeserializationError>() ||
7439
7442
allowCompilerErrors ()) {
7440
7443
consumeError (witnessSubstitutions.takeError ());
7441
7444
isOpaque = true ;
0 commit comments