@@ -1336,8 +1336,8 @@ std::error_code ModuleInterfaceLoader::findModuleFilesInDirectory(
13361336 std::unique_ptr<llvm::MemoryBuffer> *ModuleBuffer,
13371337 std::unique_ptr<llvm::MemoryBuffer> *ModuleDocBuffer,
13381338 std::unique_ptr<llvm::MemoryBuffer> *ModuleSourceInfoBuffer,
1339- bool skipBuildingInterface , bool IsFramework,
1340- bool isTestableImport ) {
1339+ bool IsCanImportLookup , bool IsFramework,
1340+ bool IsTestableImport ) {
13411341
13421342 // If running in OnlySerialized mode, ModuleInterfaceLoader
13431343 // should not have been constructed at all.
@@ -1361,11 +1361,9 @@ std::error_code ModuleInterfaceLoader::findModuleFilesInDirectory(
13611361 if (ModuleInterfaceSourcePath)
13621362 ModuleInterfaceSourcePath->assign (InPath->begin (), InPath->end ());
13631363
1364- // If we've been told to skip building interfaces, we are done here and do
1365- // not need to have the module actually built. For example, if we are
1366- // currently answering a `canImport` query, it is enough to have found
1367- // the interface.
1368- if (skipBuildingInterface) {
1364+ // If we are currently answering a `canImport` query, it is enough to have
1365+ // found the interface.
1366+ if (IsCanImportLookup) {
13691367 if (ModuleInterfacePath)
13701368 ModuleInterfacePath->assign (InPath->begin (), InPath->end ());
13711369 return std::error_code ();
@@ -2317,7 +2315,7 @@ bool ExplicitSwiftModuleLoader::findModule(
23172315 std::unique_ptr<llvm::MemoryBuffer> *ModuleBuffer,
23182316 std::unique_ptr<llvm::MemoryBuffer> *ModuleDocBuffer,
23192317 std::unique_ptr<llvm::MemoryBuffer> *ModuleSourceInfoBuffer,
2320- bool skipBuildingInterface , bool isTestableDependencyLookup,
2318+ bool IsCanImportLookup , bool isTestableDependencyLookup,
23212319 bool &IsFramework, bool &IsSystemModule) {
23222320 // Find a module with an actual, physical name on disk, in case
23232321 // -module-alias is used (otherwise same).
@@ -2396,7 +2394,7 @@ std::error_code ExplicitSwiftModuleLoader::findModuleFilesInDirectory(
23962394 std::unique_ptr<llvm::MemoryBuffer> *ModuleBuffer,
23972395 std::unique_ptr<llvm::MemoryBuffer> *ModuleDocBuffer,
23982396 std::unique_ptr<llvm::MemoryBuffer> *ModuleSourceInfoBuffer,
2399- bool skipBuildingInterface , bool IsFramework,
2397+ bool IsCanImportLookup , bool IsFramework,
24002398 bool IsTestableDependencyLookup) {
24012399 llvm_unreachable (" Not supported in the Explicit Swift Module Loader." );
24022400 return std::make_error_code (std::errc::not_supported);
@@ -2674,7 +2672,7 @@ bool ExplicitCASModuleLoader::findModule(
26742672 std::unique_ptr<llvm::MemoryBuffer> *ModuleBuffer,
26752673 std::unique_ptr<llvm::MemoryBuffer> *ModuleDocBuffer,
26762674 std::unique_ptr<llvm::MemoryBuffer> *ModuleSourceInfoBuffer,
2677- bool skipBuildingInterface , bool isTestableDependencyLookup ,
2675+ bool IsCanImportLookup , bool IsTestableDependencyLookup ,
26782676 bool &IsFramework, bool &IsSystemModule) {
26792677 // Find a module with an actual, physical name on disk, in case
26802678 // -module-alias is used (otherwise same).
@@ -2763,7 +2761,7 @@ std::error_code ExplicitCASModuleLoader::findModuleFilesInDirectory(
27632761 std::unique_ptr<llvm::MemoryBuffer> *ModuleBuffer,
27642762 std::unique_ptr<llvm::MemoryBuffer> *ModuleDocBuffer,
27652763 std::unique_ptr<llvm::MemoryBuffer> *ModuleSourceInfoBuffer,
2766- bool skipBuildingInterface , bool IsFramework,
2764+ bool IsCanImportLookup , bool IsFramework,
27672765 bool IsTestableDependencyLookup) {
27682766 llvm_unreachable (" Not supported in the Explicit Swift Module Loader." );
27692767 return std::make_error_code (std::errc::not_supported);
0 commit comments