From 62fec3d23d2325869e6eba0263b0b9f834c2067f Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Fri, 6 Sep 2024 15:20:08 +0800 Subject: [PATCH] [NFCI] [ClangScanDeps] [P1689] Use PreprocessorOnly Action for P1689 It is fine enough to use PreprocessorOnly action for P1689 format. We don't need to read any PCH or module files. --- .../Tooling/DependencyScanning/DependencyScanningWorker.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/clang/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp b/clang/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp index 1a21a4f5e30ff80..09ad5ebc7954cf8 100644 --- a/clang/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp +++ b/clang/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp @@ -430,7 +430,9 @@ class DependencyScanningAction : public tooling::ToolAction { std::unique_ptr Action; - if (ModuleName) + if (Format == ScanningOutputFormat::P1689) + Action = std::make_unique(); + else if (ModuleName) Action = std::make_unique(*ModuleName); else Action = std::make_unique();