[Fast Dependency Scanner] Produce information on whether an explicit module is a framework

In the fast dependency scanner, depending on whether a module intrface was found via the import search path or framework search path, encode into the dependency graph Swift module details, whether a given module is a framework.
This commit is contained in:
Artem Chikin
2020-08-12 10:12:35 -07:00
parent 0d25abc2c4
commit 40c1687fd2
15 changed files with 117 additions and 54 deletions

View File

@@ -950,7 +950,8 @@ std::error_code ModuleInterfaceLoader::findModuleFilesInDirectory(
SmallVectorImpl<char> *ModuleInterfacePath,
std::unique_ptr<llvm::MemoryBuffer> *ModuleBuffer,
std::unique_ptr<llvm::MemoryBuffer> *ModuleDocBuffer,
std::unique_ptr<llvm::MemoryBuffer> *ModuleSourceInfoBuffer) {
std::unique_ptr<llvm::MemoryBuffer> *ModuleSourceInfoBuffer,
bool IsFramework) {
// If running in OnlySerialized mode, ModuleInterfaceLoader
// should not have been constructed at all.
@@ -1527,7 +1528,8 @@ std::error_code ExplicitSwiftModuleLoader::findModuleFilesInDirectory(
SmallVectorImpl<char> *ModuleInterfacePath,
std::unique_ptr<llvm::MemoryBuffer> *ModuleBuffer,
std::unique_ptr<llvm::MemoryBuffer> *ModuleDocBuffer,
std::unique_ptr<llvm::MemoryBuffer> *ModuleSourceInfoBuffer) {
std::unique_ptr<llvm::MemoryBuffer> *ModuleSourceInfoBuffer,
bool IsFramework) {
StringRef moduleName = ModuleID.Item.str();
auto it = Impl.ExplicitModuleMap.find(moduleName);
// If no explicit module path is given matches the name, return with an