mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Frontend] Set "failed to load" for failed partial module
If a partial module fails to load, the main module may be left without files, so let's set the failed to load bit.
This commit is contained in:
@@ -761,8 +761,12 @@ void CompilerInstance::performSemaUpTo(SourceFile::ASTStage_t LimitStage,
|
||||
// If we aren't in a parse-only context, load the remaining serialized inputs
|
||||
// and resolve implicit imports.
|
||||
if (LimitStage > SourceFile::Unprocessed &&
|
||||
loadPartialModulesAndImplicitImports())
|
||||
loadPartialModulesAndImplicitImports()) {
|
||||
// If we failed to load a partial module, mark the main module as having
|
||||
// "failed to load", as it may contain no files.
|
||||
mainModule->setFailedToLoad();
|
||||
return;
|
||||
}
|
||||
|
||||
// Then parse all the input files.
|
||||
// FIXME: This is the only demand point for InputSourceCodeBufferIDs. We
|
||||
|
||||
Reference in New Issue
Block a user