Skip to content

Commit 8430e56

Browse files
qiongsiwuCatfish-Man
authored andcommitted
Fix the API breaking change introduced by llvm/llvm-project#137421.
1 parent 908ca38 commit 8430e56

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

lib/ClangImporter/ClangModuleDependencyScanner.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -296,13 +296,11 @@ ModuleDependencyVector ClangImporter::bridgeClangModuleDependencies(
296296
clangModuleDep.IsSystem);
297297

298298
std::vector<ModuleDependencyID> directDependencyIDs;
299-
for (const auto &moduleName : clangModuleDep.ClangModuleDeps) {
300-
// FIXME: This assumes, conservatively, that all Clang module imports
301-
// are exported. We need to fix this once the clang scanner gains the appropriate
302-
// API to query this.
303-
dependencies.addModuleImport(moduleName.ModuleName, /* isExported */ true, &alreadyAddedModules);
299+
for (const auto &DepInfo : clangModuleDep.ClangModuleDeps) {
300+
auto moduleName = DepInfo.ID.ModuleName;
301+
dependencies.addModuleImport(moduleName, DepInfo.Exported, &alreadyAddedModules);
304302
// It is safe to assume that all dependencies of a Clang module are Clang modules.
305-
directDependencyIDs.push_back({moduleName.ModuleName, ModuleDependencyKind::Clang});
303+
directDependencyIDs.push_back({moduleName, ModuleDependencyKind::Clang});
306304
}
307305
dependencies.setImportedClangDependencies(directDependencyIDs);
308306
result.push_back(std::make_pair(ModuleDependencyID{clangModuleDep.ID.ModuleName,

0 commit comments

Comments
 (0)