[Explicit Module Loader] Refactor ESWL to use findModule instead of findModuleFilesInDirectory

And add isFramework to the Explicit Module Map and its parser.
This commit is contained in:
Artem Chikin
2020-08-12 12:06:46 -07:00
parent 40c1687fd2
commit cf773c3d0e
4 changed files with 56 additions and 29 deletions

View File

@@ -682,7 +682,6 @@ FileUnit *SerializedModuleLoaderBase::loadAST(
std::unique_ptr<llvm::MemoryBuffer> moduleSourceInfoInputBuffer,
bool isFramework) {
assert(moduleInputBuffer);
StringRef moduleBufferID = moduleInputBuffer->getBufferIdentifier();
StringRef moduleDocBufferID;
if (moduleDocInputBuffer)
@@ -993,7 +992,6 @@ SerializedModuleLoaderBase::loadModule(SourceLoc importLoc,
StringRef moduleInterfacePathStr =
Ctx.AllocateCopy(moduleInterfacePath.str());
auto *file =
loadAST(*M, moduleID.Loc, moduleInterfacePathStr,
std::move(moduleInputBuffer), std::move(moduleDocInputBuffer),