@@ -1441,8 +1441,6 @@ InterfaceSubContextDelegateImpl::InterfaceSubContextDelegateImpl(
14411441 genericSubInvocation.getFrontendOptions ().DisableImplicitModules = true ;
14421442 GenericArgs.push_back (" -disable-implicit-swift-modules" );
14431443 }
1444- genericSubInvocation.getSearchPathOptions ().ExplicitSwiftModules =
1445- searchPathOpts.ExplicitSwiftModules ;
14461444 // Pass down -explicit-swift-module-map-file
14471445 // FIXME: we shouldn't need this. Remove it?
14481446 StringRef explictSwiftModuleMap = searchPathOpts.ExplicitSwiftModuleMap ;
@@ -1721,12 +1719,6 @@ bool ExplicitSwiftModuleLoader::findModule(ImportPath::Element ModuleID,
17211719 return false ;
17221720 }
17231721 auto &moduleInfo = it->getValue ();
1724- if (moduleInfo.moduleBuffer ) {
1725- // We found an explicit module matches the given name, give the buffer
1726- // back to the caller side.
1727- *ModuleBuffer = std::move (moduleInfo.moduleBuffer );
1728- return true ;
1729- }
17301722
17311723 // Set IsFramework bit according to the moduleInfo
17321724 IsFramework = moduleInfo.isFramework ;
@@ -1815,7 +1807,6 @@ void ExplicitSwiftModuleLoader::collectVisibleTopLevelModuleNames(
18151807std::unique_ptr<ExplicitSwiftModuleLoader>
18161808ExplicitSwiftModuleLoader::create (ASTContext &ctx,
18171809 DependencyTracker *tracker, ModuleLoadingMode loadMode,
1818- ArrayRef<std::string> ExplicitModulePaths,
18191810 StringRef ExplicitSwiftModuleMap,
18201811 bool IgnoreSwiftSourceInfoFile) {
18211812 auto result = std::unique_ptr<ExplicitSwiftModuleLoader>(
@@ -1827,24 +1818,6 @@ ExplicitSwiftModuleLoader::create(ASTContext &ctx,
18271818 // Parse a JSON file to collect explicitly built modules.
18281819 Impl.parseSwiftExplicitModuleMap (ExplicitSwiftModuleMap);
18291820 }
1830- // Collect .swiftmodule paths from -swift-module-path
1831- // FIXME: remove these.
1832- for (auto path: ExplicitModulePaths) {
1833- std::string name;
1834- // Load the explicit module into a buffer and get its name.
1835- std::unique_ptr<llvm::MemoryBuffer> buffer = getModuleName (ctx, path, name);
1836- if (buffer) {
1837- // Register this module for future loading.
1838- auto &entry = Impl.ExplicitModuleMap [name];
1839- entry.modulePath = path;
1840- entry.moduleBuffer = std::move (buffer);
1841- } else {
1842- // We cannot read the module content, diagnose.
1843- ctx.Diags .diagnose (SourceLoc (),
1844- diag::error_opening_explicit_module_file,
1845- path);
1846- }
1847- }
18481821
18491822 return result;
18501823}
0 commit comments