Ted Kremenek | f4381fd | 2008-07-02 00:03:09 +0000 | [diff] [blame] | 1 | //===--- AnalysisConsumer.cpp - ASTConsumer for running Analyses ----------===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
| 10 | // "Meta" ASTConsumer for running different source analyses. |
| 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | #ifndef DRIVER_ANALYSISCONSUMER_H |
| 15 | #define DRIVER_ANALYSISCONSUMER_H |
| 16 | |
| 17 | namespace clang { |
| 18 | |
| 19 | enum Analyses { |
Ted Kremenek | f7f3c20 | 2008-07-15 00:46:02 +0000 | [diff] [blame] | 20 | #define ANALYSIS(NAME, CMDFLAG, DESC, SCOPE) NAME, |
Ted Kremenek | fb9a48c | 2008-07-14 23:41:13 +0000 | [diff] [blame] | 21 | #include "Analyses.def" |
| 22 | NumAnalyses |
Ted Kremenek | f4381fd | 2008-07-02 00:03:09 +0000 | [diff] [blame] | 23 | }; |
Ted Kremenek | 95c7b00 | 2008-10-24 01:04:59 +0000 | [diff] [blame] | 24 | |
| 25 | enum AnalysisStores { |
| 26 | #define ANALYSIS_STORE(NAME, CMDFLAG, DESC) NAME##Model, |
| 27 | #include "Analyses.def" |
| 28 | NumStores |
| 29 | }; |
Ted Kremenek | 4fc82c8 | 2008-11-03 23:18:07 +0000 | [diff] [blame] | 30 | |
| 31 | enum AnalysisDiagClients { |
| 32 | #define ANALYSIS_DIAGNOSTICS(NAME, CMDFLAG, DESC, CREATFN) PD_##NAME, |
| 33 | #include "Analyses.def" |
| 34 | NUM_ANALYSIS_DIAG_CLIENTS |
| 35 | }; |
Ted Kremenek | fb9a48c | 2008-07-14 23:41:13 +0000 | [diff] [blame] | 36 | |
Ted Kremenek | f4381fd | 2008-07-02 00:03:09 +0000 | [diff] [blame] | 37 | ASTConsumer* CreateAnalysisConsumer(Analyses* Beg, Analyses* End, |
Ted Kremenek | 4fc82c8 | 2008-11-03 23:18:07 +0000 | [diff] [blame] | 38 | AnalysisStores SM, AnalysisDiagClients DC, |
Ted Kremenek | f4381fd | 2008-07-02 00:03:09 +0000 | [diff] [blame] | 39 | Diagnostic &diags, Preprocessor* pp, |
| 40 | PreprocessorFactory* ppf, |
| 41 | const LangOptions& lopts, |
| 42 | const std::string& fname, |
| 43 | const std::string& htmldir, |
Ted Kremenek | f8ce699 | 2008-08-27 22:31:43 +0000 | [diff] [blame] | 44 | bool VisualizeGraphViz, |
| 45 | bool VisualizeUbi, |
Ted Kremenek | 95c7b00 | 2008-10-24 01:04:59 +0000 | [diff] [blame] | 46 | bool VizTrimGraph, |
Ted Kremenek | f8ce699 | 2008-08-27 22:31:43 +0000 | [diff] [blame] | 47 | bool AnalyzeAll); |
Ted Kremenek | f4381fd | 2008-07-02 00:03:09 +0000 | [diff] [blame] | 48 | } // end clang namespace |
| 49 | |
| 50 | #endif |