@@ -46,6 +46,8 @@ class SwiftModuleScanner : public SerializedModuleLoaderBase {
4646 // / Clang-specific (-Xcc) command-line flags to include on
4747 // / Swift module compilation commands
4848 std::vector<std::string> swiftModuleClangCC1CommandLineArgs;
49+ // / Module inputs specified with -swift-module-input
50+ llvm::StringMap<std::string> explicitSwiftModuleInputs;
4951
5052public:
5153 std::optional<ModuleDependencyInfo> dependencies;
@@ -55,13 +57,15 @@ class SwiftModuleScanner : public SerializedModuleLoaderBase {
5557 InterfaceSubContextDelegate &astDelegate,
5658 StringRef moduleOutputPath, StringRef sdkModuleOutputPath,
5759 std::vector<std::string> swiftModuleClangCC1CommandLineArgs,
60+ llvm::StringMap<std::string> explicitSwiftModuleInputs,
5861 ScannerKind kind = MDS_plain)
5962 : SerializedModuleLoaderBase(ctx, nullptr , LoadMode,
6063 /* IgnoreSwiftSourceInfoFile=*/ true ),
6164 kind (kind), moduleName(moduleName), astDelegate(astDelegate),
6265 moduleOutputPath(moduleOutputPath),
6366 sdkModuleOutputPath(sdkModuleOutputPath),
64- swiftModuleClangCC1CommandLineArgs(swiftModuleClangCC1CommandLineArgs) {}
67+ swiftModuleClangCC1CommandLineArgs(swiftModuleClangCC1CommandLineArgs),
68+ explicitSwiftModuleInputs(explicitSwiftModuleInputs) {}
6569
6670 std::error_code findModuleFilesInDirectory (
6771 ImportPath::Element ModuleID, const SerializedModuleBaseName &BaseName,
@@ -73,6 +77,10 @@ class SwiftModuleScanner : public SerializedModuleLoaderBase {
7377 bool SkipBuildingInterface, bool IsFramework,
7478 bool IsTestableDependencyLookup) override ;
7579
80+ bool canImportModule (ImportPath::Module named, SourceLoc loc,
81+ ModuleVersionInfo *versionInfo,
82+ bool isTestableImport) override ;
83+
7684 virtual void collectVisibleTopLevelModuleNames (
7785 SmallVectorImpl<Identifier> &names) const override {
7886 llvm_unreachable (" Not used" );
@@ -105,7 +113,7 @@ class PlaceholderSwiftModuleScanner : public SwiftModuleScanner {
105113 StringRef moduleOutputPath,
106114 StringRef sdkModuleOutputPath)
107115 : SwiftModuleScanner(ctx, LoadMode, moduleName, astDelegate,
108- moduleOutputPath, sdkModuleOutputPath, {},
116+ moduleOutputPath, sdkModuleOutputPath, {}, {},
109117 MDS_placeholder) {
110118 // FIXME: Find a better place for this map to live, to avoid
111119 // doing the parsing on every module.
0 commit comments