Don't treat missing imports as a fatal error in REPL mode.

We don't want typos in import statements to take down the whole REPL, but we
/do/ want the REPL to be honoring fatal errors that effectively take down the
ASTContext.

This doesn't (yet) apply to the real LLDB REPL, which does not use
SourceFileKind::REPL for its input. The right option to test there is
LangOpts.DebuggerSupport, but that's currently being set for Playgrounds as
well. I've filed <rdar://problem/18090611> for LLDB to adjust their input.

Part of <rdar://problem/17994094>

Swift SVN r21383
This commit is contained in:
Jordan Rose
2014-08-21 22:36:22 +00:00
parent f8face49ab
commit 9ddf57f7ba
7 changed files with 33 additions and 18 deletions

View File

@@ -299,7 +299,7 @@ Module *SerializedModuleLoader::loadModule(SourceLoc importLoc,
isFramework)) {
if (err != std::errc::no_such_file_or_directory) {
Ctx.Diags.diagnose(moduleID.second, diag::sema_opening_import,
moduleID.first.str(), err.message());
moduleID.first, err.message());
}
return nullptr;