Merge pull request #40777 from ApolloZhu/fix-canImport-submodule-checking

Fix canImport submodule checking in loaders not supporting submodules
This commit is contained in:
swift-ci
2022-07-01 15:10:13 -07:00
committed by GitHub
8 changed files with 37 additions and 3 deletions

View File

@@ -1867,6 +1867,8 @@ bool ExplicitSwiftModuleLoader::canImportModule(ImportPath::Module path,
llvm::VersionTuple version,
bool underlyingVersion) {
// FIXME: Swift submodules?
if (path.hasSubmodule())
return false;
ImportPath::Element mID = path.front();
// Look up the module with the real name (physical name on disk);
// in case `-module-alias` is used, the name appearing in source files