Don't blow up when an adapter's underlying module is missing.

Instead, emit a specific error, along with the same "SDK is missing" note
from the last commit.

Swift SVN r12416
This commit is contained in:
Jordan Rose
2014-01-16 20:08:09 +00:00
parent a5c2fedc1b
commit 5f9c652ff9
6 changed files with 48 additions and 6 deletions

View File

@@ -504,6 +504,14 @@ bool ModuleFile::associateWithFileContext(FileUnit *file) {
"invalid module name (submodules not yet supported)");
auto module = getModule(moduleID);
if (!module) {
// If we're missing the module we're shadowing, treat that specially.
if (moduleID == file->getParentModule()->Name) {
error(ModuleStatus::MissingShadowedModule);
return false;
}
// Otherwise, continue trying to load dependencies, so that we can list
// everything that's missing.
missingDependency = true;
continue;
}