@@ -160,8 +160,6 @@ void UnsafeDeserializationError::anchor() {}
160160const char ModularizationError::ID = ' \0 ' ;
161161void ModularizationError::anchor () {}
162162
163- static llvm::Error consumeErrorIfXRefNonLoadedModule (llvm::Error &&error);
164-
165163// / Skips a single record in the bitstream.
166164// /
167165// / Destroys the stream position if the next entry is not a record.
@@ -3999,7 +3997,7 @@ class DeclDeserializer {
39993997 if (!subMapOrError) {
40003998 // If the underlying type references internal details, ignore it.
40013999 auto unconsumedError =
4002- consumeErrorIfXRefNonLoadedModule (subMapOrError.takeError ());
4000+ MF. consumeExpectedError (subMapOrError.takeError ());
40034001 if (unconsumedError)
40044002 return std::move (unconsumedError);
40054003 } else {
@@ -7267,13 +7265,16 @@ Decl *handleErrorAndSupplyMissingProtoMember(ASTContext &context,
72677265 return suppliedMissingMember;
72687266}
72697267
7270- Decl *handleErrorAndSupplyMissingMiscMember (llvm::Error &&error) {
7271- llvm::consumeError (std::move (error));
7268+ Decl *
7269+ ModuleFile::handleErrorAndSupplyMissingMiscMember (llvm::Error &&error) const {
7270+ diagnoseAndConsumeError (std::move (error));
72727271 return nullptr ;
72737272}
72747273
7275- Decl *handleErrorAndSupplyMissingMember (ASTContext &context, Decl *container,
7276- llvm::Error &&error) {
7274+ Decl *
7275+ ModuleFile::handleErrorAndSupplyMissingMember (ASTContext &context,
7276+ Decl *container,
7277+ llvm::Error &&error) const {
72777278 // Drop the member if it had a problem.
72787279 // FIXME: Handle overridable members in class extensions too, someday.
72797280 if (auto *containingClass = dyn_cast<ClassDecl>(container)) {
@@ -7347,7 +7348,7 @@ void ModuleFile::loadAllMembers(Decl *container, uint64_t contextData) {
73477348 }
73487349}
73497350
7350- static llvm::Error consumeErrorIfXRefNonLoadedModule (llvm::Error &&error) {
7351+ llvm::Error ModuleFile::consumeExpectedError (llvm::Error &&error) {
73517352 // Missing module errors are most likely caused by an
73527353 // implementation-only import hiding types and decls.
73537354 // rdar://problem/60291019
@@ -7441,7 +7442,7 @@ ModuleFile::loadAllConformances(const Decl *D, uint64_t contextData,
74417442
74427443 if (!conformance) {
74437444 auto unconsumedError =
7444- consumeErrorIfXRefNonLoadedModule (conformance.takeError ());
7445+ consumeExpectedError (conformance.takeError ());
74457446 if (unconsumedError) {
74467447 // Ignore if allowing errors, it's just doing a best effort to produce
74477448 // *some* module anyway.
0 commit comments