[DependencyScanning] Reenable Clang Module Dependency Scanning through the Shared Clang Compiler Instance (#87319)

This PR enables the lookup using shared compiler instance since
https://github.com/llvm/llvm-project/pull/178542 (and
https://github.com/swiftlang/llvm-project/pull/12245) fixed the
incorrect diagnostics coming from the shared compiler instance.

Fixes rdar://136303612.
This commit is contained in:
Qiongsi Wu
2026-02-19 13:36:31 -08:00
committed by GitHub
parent 6075e13741
commit bfc8a842a7

View File

@@ -326,10 +326,9 @@ ModuleDependencyScanningWorker::scanFilesystemForClangModuleDependency(
const llvm::DenseSet<clang::tooling::dependencies::ModuleID>
&alreadySeenModules) {
diagnosticReporter.registerNamedClangModuleQuery();
auto clangModuleDependencies = clangScanningTool.getModuleDependencies(
moduleName.str(), clangScanningModuleCommandLineArgs,
clangScanningWorkingDirectoryPath, alreadySeenModules,
lookupModuleOutput);
auto clangModuleDependencies =
clangScanningTool.computeDependenciesByNameWithContext(
moduleName.str(), alreadySeenModules, lookupModuleOutput);
if (!clangModuleDependencies) {
llvm::handleAllErrors(
clangModuleDependencies.takeError(),