Skip to content

Commit 2d8f075

Browse files
committed
[Serialization] Drop any failed overriding relationship when allowing errors
1 parent 38030dd commit 2d8f075

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/Serialization/Deserialization.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3138,6 +3138,10 @@ class DeclDeserializer {
31383138
} else if (overriddenOrError.errorIsA<FatalDeserializationError>()) {
31393139
// Pass through fatal deserialization errors.
31403140
return overriddenOrError.takeError();
3141+
} else if (MF.allowCompilerErrors()) {
3142+
// Drop overriding relationship when allowing errors.
3143+
llvm::consumeError(overriddenOrError.takeError());
3144+
overridden = nullptr;
31413145
} else {
31423146
llvm::consumeError(overriddenOrError.takeError());
31433147
if (overriddenAffectsABI || !ctx.LangOpts.EnableDeserializationRecovery) {

0 commit comments

Comments
 (0)