Skip to content

Commit fdfadf8

Browse files
committed
[Dependency scanner] Get the Clang module file name from Clang.
1 parent 702c38e commit fdfadf8

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

lib/ClangImporter/ClangModuleDependencyScanner.cpp

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -205,16 +205,11 @@ static void recordModuleDependencies(
205205
fileDeps.push_back(fileDep.getKey());
206206
}
207207

208-
// Create a module filename.
209-
// FIXME: Query Clang to determine an appropriate hashed name for the
210-
// module file.
211-
llvm::SmallString<32> modulePath(clangModuleDep.ModuleName);
212-
llvm::sys::path::replace_extension(modulePath, "pcm");
213-
214208
// Module-level dependencies.
215209
llvm::StringSet<> alreadyAddedModules;
216210
auto dependencies = ModuleDependencies::forClangModule(
217-
modulePath.str(), clangModuleDep.ClangModuleMapFile, fileDeps);
211+
clangModuleDep.ImplicitModulePCMPath,
212+
clangModuleDep.ClangModuleMapFile, fileDeps);
218213
for (const auto &moduleName : clangModuleDep.ClangModuleDeps) {
219214
dependencies.addModuleDependency(moduleName.ModuleName, alreadyAddedModules);
220215
}
@@ -333,7 +328,7 @@ bool ClangImporter::addBridgingHeaderDependencies(
333328
targetModule.addBridgingModuleDependency(
334329
moduleDep.ModuleName, alreadyAddedModules);
335330
}
336-
331+
337332
// Update the cache with the new information for the module.
338333
cache.updateDependencies(
339334
{moduleName, ModuleDependenciesKind::Swift},

0 commit comments

Comments
 (0)