Skip to content

Commit 1392926

Browse files
authored
Merge pull request #79927 from xymus/deser-protect-loadAllConformances
Serialization: Don't crash in loadAllConformances in extended recovery
2 parents 00af0ee + e4ad174 commit 1392926

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/Serialization/Deserialization.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -8588,9 +8588,9 @@ ModuleFile::loadAllConformances(const Decl *D, uint64_t contextData,
85888588
auto unconsumedError =
85898589
consumeExpectedError(conformance.takeError());
85908590
if (unconsumedError) {
8591-
// Ignore if allowing errors, it's just doing a best effort to produce
8592-
// *some* module anyway.
8593-
if (allowCompilerErrors())
8591+
// Ignore when we're not building a binary, it's just doing a best
8592+
// effort to produce *some* module anyway.
8593+
if (enableExtendedDeserializationRecovery())
85948594
diagnoseAndConsumeError(std::move(unconsumedError));
85958595
else
85968596
fatal(std::move(unconsumedError));

0 commit comments

Comments
 (0)