Skip to content

Commit 1b003b2

Browse files
authored
Revert "[Dependency Scanning] Update Uses of ModuleDeps::ClangModuleDeps #81243" (#81658)
This reverts commit 024dbd0, reversing changes made to a08b1cb. The commit did not solve the fundamental issue we need to handle and is no longer necessary. rdar://144794793 <!-- If this pull request is targeting a release branch, please fill out the following form: https://github.com/swiftlang/.github/blob/main/PULL_REQUEST_TEMPLATE/release.md?plain=1 Otherwise, replace this comment with a description of your changes and rationale. Provide links to external references/discussions if appropriate. If this pull request resolves any GitHub issues, link them like so: Resolves <link to issue>, resolves <link to another issue>. For more information about linking a pull request to an issue, see: https://docs.github.com/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue --> <!-- Before merging this pull request, you must run the Swift continuous integration tests. For information about triggering CI builds via @swift-ci, see: https://github.com/apple/swift/blob/main/docs/ContinuousIntegration.md#swift-ci Thank you for your contribution to Swift! -->
1 parent e84d560 commit 1b003b2

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

lib/ClangImporter/ClangModuleDependencyScanner.cpp

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

189189
std::vector<ModuleDependencyID> directDependencyIDs;
190-
for (const auto &DepInfo : clangModuleDep.ClangModuleDeps) {
191-
auto moduleName = DepInfo.ID.ModuleName;
192-
dependencies.addModuleImport(moduleName, DepInfo.Exported, &alreadyAddedModules);
190+
for (const auto &moduleName : clangModuleDep.ClangModuleDeps) {
191+
// FIXME: This assumes, conservatively, that all Clang module imports
192+
// are exported. We need to fix this once the clang scanner gains the appropriate
193+
// API to query this.
194+
dependencies.addModuleImport(moduleName.ModuleName, /* isExported */ true, &alreadyAddedModules);
193195
// It is safe to assume that all dependencies of a Clang module are Clang modules.
194-
directDependencyIDs.push_back({moduleName, ModuleDependencyKind::Clang});
196+
directDependencyIDs.push_back({moduleName.ModuleName, ModuleDependencyKind::Clang});
195197
}
196198
dependencies.setImportedClangDependencies(directDependencyIDs);
197199
result.push_back(std::make_pair(ModuleDependencyID{clangModuleDep.ID.ModuleName,

0 commit comments

Comments
 (0)