Skip to content

Commit e4ad174

Browse files
committed
Serialization: Don't crash in loadAllConformances in extended recovery
In extended recovery mode we should recover from all errors without crashing. Protect loadAllConformances and drop all conformance errors in this mode. rdar://81811394
1 parent fb3944f commit e4ad174

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/Serialization/Deserialization.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8584,9 +8584,9 @@ ModuleFile::loadAllConformances(const Decl *D, uint64_t contextData,
85848584
auto unconsumedError =
85858585
consumeExpectedError(conformance.takeError());
85868586
if (unconsumedError) {
8587-
// Ignore if allowing errors, it's just doing a best effort to produce
8588-
// *some* module anyway.
8589-
if (allowCompilerErrors())
8587+
// Ignore when we're not building a binary, it's just doing a best
8588+
// effort to produce *some* module anyway.
8589+
if (enableExtendedDeserializationRecovery())
85908590
diagnoseAndConsumeError(std::move(unconsumedError));
85918591
else
85928592
fatal(std::move(unconsumedError));

0 commit comments

Comments
 (0)