Failure to load a bridging header -> failure to load a module.

This is important for both test targets and for debugging.

rdar://problem/20616099

Swift SVN r30784
This commit is contained in:
Jordan Rose
2015-07-30 00:39:35 +00:00
parent d0b61a8bd7
commit 3028dc8f44
12 changed files with 87 additions and 25 deletions

View File

@@ -270,6 +270,12 @@ FileUnit *SerializedModuleLoader::loadAST(
break;
}
case serialization::Status::FailedToLoadBridgingHeader:
// We already emitted a diagnostic about the bridging header. Just emit
// a generic message here.
Ctx.Diags.diagnose(*diagLoc, diag::serialization_load_failed, M.getName());
break;
case serialization::Status::NameMismatch: {
// FIXME: This doesn't handle a non-debugger REPL, which should also treat
// this as a non-fatal error.