mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Serialization] Handle llvm::Error in member deserialization recovery (#16957)
llvm::Expected/llvm::Error require that the error is not just checked but explicitly handled. Since we're currently recovering as if nothing happened, we need to use llvm::consumeError to throw the error info away. rdar://problem/40738521
This commit is contained in:
@@ -1860,6 +1860,8 @@ ModuleFile::loadNamedMembers(const IterableDeclContext *IDC, DeclBaseName N,
|
||||
} else {
|
||||
if (!getContext().LangOpts.EnableDeserializationRecovery)
|
||||
fatal(mem.takeError());
|
||||
llvm::consumeError(mem.takeError());
|
||||
|
||||
// Treat this as a cache-miss to the caller and let them attempt
|
||||
// to refill through the normal loadAllMembers() path.
|
||||
return None;
|
||||
|
||||
Reference in New Issue
Block a user