[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

@@ -73,12 +73,12 @@ protected:
StringRef extension) const;
using AccessPathElem = Located<Identifier>;
bool findModule(AccessPathElem moduleID,
SmallVectorImpl<char> *moduleInterfacePath,
std::unique_ptr<llvm::MemoryBuffer> *moduleBuffer,
std::unique_ptr<llvm::MemoryBuffer> *moduleDocBuffer,
std::unique_ptr<llvm::MemoryBuffer> *moduleSourceInfoBuffer,
bool &isFramework, bool &isSystemModule);
virtual bool findModule(AccessPathElem moduleID,
SmallVectorImpl<char> *moduleInterfacePath,
std::unique_ptr<llvm::MemoryBuffer> *moduleBuffer,
std::unique_ptr<llvm::MemoryBuffer> *moduleDocBuffer,
std::unique_ptr<llvm::MemoryBuffer> *moduleSourceInfoBuffer,
bool &isFramework, bool &isSystemModule);
/// Attempts to search the provided directory for a loadable serialized
/// .swiftmodule with the provided `ModuleFilename`. Subclasses must