Skip to content

Commit

Permalink
[NFCI] [ClangScanDeps] [P1689] Use PreprocessorOnly Action for P1689
Browse files Browse the repository at this point in the history
It is fine enough to use PreprocessorOnly action for P1689 format. We
don't need to read any PCH or module files.
  • Loading branch information
ChuanqiXu9 committed Sep 6, 2024
1 parent 30a9cac commit 62fec3d
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,9 @@ class DependencyScanningAction : public tooling::ToolAction {

std::unique_ptr<FrontendAction> Action;

if (ModuleName)
if (Format == ScanningOutputFormat::P1689)
Action = std::make_unique<PreprocessOnlyAction>();
else if (ModuleName)
Action = std::make_unique<GetDependenciesByModuleNameAction>(*ModuleName);
else
Action = std::make_unique<ReadPCHAndPreprocessAction>();
Expand Down

0 comments on commit 62fec3d

Please sign in to comment.