Skip to content

Commit 62fec3d

Browse files
committed
[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.
1 parent 30a9cac commit 62fec3d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

clang/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,9 @@ class DependencyScanningAction : public tooling::ToolAction {
430430

431431
std::unique_ptr<FrontendAction> Action;
432432

433-
if (ModuleName)
433+
if (Format == ScanningOutputFormat::P1689)
434+
Action = std::make_unique<PreprocessOnlyAction>();
435+
else if (ModuleName)
434436
Action = std::make_unique<GetDependenciesByModuleNameAction>(*ModuleName);
435437
else
436438
Action = std::make_unique<ReadPCHAndPreprocessAction>();

0 commit comments

Comments
 (0)