llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-clang Author: Steven Wu (cachemeifyoucan) <details> <summary>Changes</summary> Rename `ReadPCHAndPreprocessAction` class. This frontend action is used for dependency scanning only and the current name is confusing for what it actually does. Rename the class to `DependencyScanningFrontendAction` to be clear for its usage. --- Full diff: https://github.com/llvm/llvm-project/pull/122390.diff 3 Files Affected: - (modified) clang/include/clang/Frontend/FrontendActions.h (+2-2) - (modified) clang/lib/Frontend/FrontendActions.cpp (+2-2) - (modified) clang/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp (+1-1) ``````````diff diff --git a/clang/include/clang/Frontend/FrontendActions.h b/clang/include/clang/Frontend/FrontendActions.h index a620ddfc40447d..f16c68344479e4 100644 --- a/clang/include/clang/Frontend/FrontendActions.h +++ b/clang/include/clang/Frontend/FrontendActions.h @@ -32,8 +32,8 @@ class InitOnlyAction : public FrontendAction { bool usesPreprocessorOnly() const override { return false; } }; -/// Preprocessor-based frontend action that also loads PCH files. -class ReadPCHAndPreprocessAction : public FrontendAction { +/// Preprocessor-based frontend action that is used for dependency scanning. +class DependencyScanningFrontendAction : public FrontendAction { void ExecuteAction() override; std::unique_ptr<ASTConsumer> CreateASTConsumer(CompilerInstance &CI, diff --git a/clang/lib/Frontend/FrontendActions.cpp b/clang/lib/Frontend/FrontendActions.cpp index 30dfa5481d070a..f2a9602bdcafaf 100644 --- a/clang/lib/Frontend/FrontendActions.cpp +++ b/clang/lib/Frontend/FrontendActions.cpp @@ -69,7 +69,7 @@ void InitOnlyAction::ExecuteAction() { } // Basically PreprocessOnlyAction::ExecuteAction. -void ReadPCHAndPreprocessAction::ExecuteAction() { +void DependencyScanningFrontendAction::ExecuteAction() { Preprocessor &PP = getCompilerInstance().getPreprocessor(); // Ignore unknown pragmas. @@ -84,7 +84,7 @@ void ReadPCHAndPreprocessAction::ExecuteAction() { } std::unique_ptr<ASTConsumer> -ReadPCHAndPreprocessAction::CreateASTConsumer(CompilerInstance &CI, +DependencyScanningFrontendAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) { return std::make_unique<ASTConsumer>(); } diff --git a/clang/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp b/clang/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp index 5a648df05e4fd3..6db5a1cb41da1f 100644 --- a/clang/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp +++ b/clang/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp @@ -439,7 +439,7 @@ class DependencyScanningAction : public tooling::ToolAction { else if (ModuleName) Action = std::make_unique<GetDependenciesByModuleNameAction>(*ModuleName); else - Action = std::make_unique<ReadPCHAndPreprocessAction>(); + Action = std::make_unique<DependencyScanningFrontendAction>(); if (ScanInstance.getDiagnostics().hasErrorOccurred()) return false; `````````` </details> https://github.com/llvm/llvm-project/pull/122390 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits