[Serialization] Fix deserialization crash occurring when a mixed framework fails to load its ObjC part.

rdar://27709042
This commit is contained in:
Argyrios Kyrtzidis
2016-08-04 15:59:05 -07:00
parent b841f1eaa5
commit 3bc81f7df4
7 changed files with 44 additions and 1 deletions

View File

@@ -1093,7 +1093,7 @@ Status ModuleFile::associateWithFileContext(FileUnit *file,
"invalid module name (submodules not yet supported)");
}
auto module = getModule(modulePath);
if (!module) {
if (!module || module->failedToLoad()) {
// If we're missing the module we're shadowing, treat that specially.
if (modulePath.size() == 1 &&
modulePath.front() == file->getParentModule()->getName()) {