SerializeLoc: ensure we can load serialized source locations when we are importing a module from a Swift interface file

This commit is contained in:
Xi Ge
2019-10-03 17:24:16 -07:00
parent d6dc7c3331
commit 212fe43d79
4 changed files with 43 additions and 26 deletions

View File

@@ -1036,7 +1036,10 @@ std::error_code ModuleInterfaceLoader::findModuleFilesInDirectory(
if (ModuleBuffer) {
*ModuleBuffer = std::move(*ModuleBufferOrErr);
}
// Open .swiftsourceinfo file if it's present.
SerializedModuleLoaderBase::openModuleSourceInfoFile(ModuleID, ModPath,
ModuleSourceInfoFilename,
ModuleSourceInfoBuffer);
// Delegate back to the serialized module loader to load the module doc.
llvm::SmallString<256> DocPath{DirPath};
path::append(DocPath, ModuleDocFilename);