mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Extends canImport to check for submodule availability
This commit is contained in:
@@ -1828,8 +1828,11 @@ std::error_code ExplicitSwiftModuleLoader::findModuleFilesInDirectory(
|
||||
return std::make_error_code(std::errc::not_supported);
|
||||
}
|
||||
|
||||
bool ExplicitSwiftModuleLoader::canImportModule(
|
||||
ImportPath::Element mID, llvm::VersionTuple version, bool underlyingVersion) {
|
||||
bool ExplicitSwiftModuleLoader::canImportModule(ImportPath::Module path,
|
||||
llvm::VersionTuple version,
|
||||
bool underlyingVersion) {
|
||||
// FIXME: Swift submodules?
|
||||
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
|
||||
// and the real module name are different. For example, '-module-alias Foo=Bar'
|
||||
|
||||
Reference in New Issue
Block a user