[NamedLazyMemberLoading] Eat errors properly with llvm::consumeError.

This commit is contained in:
Graydon Hoare
2017-11-17 13:48:20 -08:00
parent 31f32be27e
commit 412bf0bff1

View File

@@ -1838,8 +1838,9 @@ ModuleFile::loadNamedMembers(const IterableDeclContext *IDC, DeclName N,
} else {
if (!getContext().LangOpts.EnableDeserializationRecovery)
fatal(mem.takeError());
// Treat this as a cache-miss to the caller and let them attempt
// to refill through the normal loadAllMembers() path.
// Eat the error and treat this as a cache-miss to the caller; let
// them attempt to refill through the normal loadAllMembers() path.
llvm::consumeError(mem.takeError());
return None;
}
}