https://github.com/cachemeifyoucan created https://github.com/llvm/llvm-project/pull/122390
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. >From 1796a6e4fa0492b9676637245a394d3029474d4e Mon Sep 17 00:00:00 2001 From: Steven Wu <steve...@apple.com> Date: Thu, 9 Jan 2025 15:46:06 -0800 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?= =?UTF-8?q?l=20version?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Created using spr 1.3.5 --- clang/include/clang/Frontend/FrontendActions.h | 4 ++-- clang/lib/Frontend/FrontendActions.cpp | 4 ++-- .../Tooling/DependencyScanning/DependencyScanningWorker.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) 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; _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits