From 4908d36c3a6c28a231d60de8a2bfc6a516ec4940 Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Mon, 18 May 2009 22:25:55 +0000 Subject: [PATCH] Move AnalysisConsumer out of ASTConsumers.h in preparation for moving ASTConsumers.h to include/clang/Frontend. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72054 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/clang-cc/ASTConsumers.h | 7 ------- tools/clang-cc/AnalysisConsumer.cpp | 2 +- tools/clang-cc/clang-cc.h | 10 ++++++++++ 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/tools/clang-cc/ASTConsumers.h b/tools/clang-cc/ASTConsumers.h index bb31e5c158..36fc0b38d0 100644 --- a/tools/clang-cc/ASTConsumers.h +++ b/tools/clang-cc/ASTConsumers.h @@ -97,13 +97,6 @@ ASTConsumer *CreateBlockRewriter(const std::string &InFile, // tree for the given class and displays it with "dotty". ASTConsumer *CreateInheritanceViewer(const std::string& clsname); -// Analyzer: runs various code analysis passes. (The exact analyses -// run is controlled by command-line options.) -ASTConsumer* CreateAnalysisConsumer(Diagnostic &diags, Preprocessor *pp, - PreprocessorFactory *ppf, - const LangOptions &lopts, - const std::string &output); - } // end clang namespace #endif diff --git a/tools/clang-cc/AnalysisConsumer.cpp b/tools/clang-cc/AnalysisConsumer.cpp index 381b9d0ba2..dc69058c99 100644 --- a/tools/clang-cc/AnalysisConsumer.cpp +++ b/tools/clang-cc/AnalysisConsumer.cpp @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#include "ASTConsumers.h" +#include "clang-cc.h" #include "clang/Frontend/PathDiagnosticClients.h" #include "clang/Frontend/ManagerRegistry.h" #include "clang/AST/ASTConsumer.h" diff --git a/tools/clang-cc/clang-cc.h b/tools/clang-cc/clang-cc.h index eee310bd2f..d4ee39a4ba 100644 --- a/tools/clang-cc/clang-cc.h +++ b/tools/clang-cc/clang-cc.h @@ -25,6 +25,8 @@ class Diagnostic; class ASTConsumer; class IdentifierTable; class SourceManager; +class PreprocessorFactory; +class LangOptions; /// ProcessWarningOptions - Initialize the diagnostic client and process the /// warning options specified on the command line. @@ -55,6 +57,14 @@ bool CreateDependencyFileGen(Preprocessor *PP, std::string &ErrStr); /// CacheTokens - Cache tokens for use with PCH. void CacheTokens(Preprocessor& PP, const std::string& OutFile); +/// CreateAnalysisConsumer - Creates an ASTConsumer to run various code +/// analysis passes. (The set of analyses run is controlled by command-line +/// options.) +ASTConsumer* CreateAnalysisConsumer(Diagnostic &diags, Preprocessor *pp, + PreprocessorFactory *ppf, + const LangOptions &lopts, + const std::string &output); + } // end namespace clang #endif -- 2.40.0