blob: 27c8e6e07ab05f3c076e4675d31027ac8298f9ca [file] [log] [blame]
Ted Kremenek81ea7992008-07-02 00:03:09 +00001//===--- 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
17namespace clang {
18
19enum Analyses {
Ted Kremenekfbda0ef2008-07-15 00:46:02 +000020#define ANALYSIS(NAME, CMDFLAG, DESC, SCOPE) NAME,
Ted Kremenek8ce61b32008-07-14 23:41:13 +000021#include "Analyses.def"
22NumAnalyses
Ted Kremenek81ea7992008-07-02 00:03:09 +000023};
Ted Kremenekc3803992008-10-24 01:04:59 +000024
25enum AnalysisStores {
26#define ANALYSIS_STORE(NAME, CMDFLAG, DESC) NAME##Model,
27#include "Analyses.def"
28NumStores
29};
Ted Kremeneka3f825e2008-11-03 23:18:07 +000030
31enum AnalysisDiagClients {
32#define ANALYSIS_DIAGNOSTICS(NAME, CMDFLAG, DESC, CREATFN) PD_##NAME,
33#include "Analyses.def"
34NUM_ANALYSIS_DIAG_CLIENTS
35};
Ted Kremenek8ce61b32008-07-14 23:41:13 +000036
Ted Kremenek81ea7992008-07-02 00:03:09 +000037ASTConsumer* CreateAnalysisConsumer(Analyses* Beg, Analyses* End,
Ted Kremeneka3f825e2008-11-03 23:18:07 +000038 AnalysisStores SM, AnalysisDiagClients DC,
Ted Kremenek81ea7992008-07-02 00:03:09 +000039 Diagnostic &diags, Preprocessor* pp,
40 PreprocessorFactory* ppf,
41 const LangOptions& lopts,
42 const std::string& fname,
43 const std::string& htmldir,
Ted Kremenekcf262252008-08-27 22:31:43 +000044 bool VisualizeGraphViz,
45 bool VisualizeUbi,
Ted Kremenekc3803992008-10-24 01:04:59 +000046 bool VizTrimGraph,
Ted Kremenekcf262252008-08-27 22:31:43 +000047 bool AnalyzeAll);
Ted Kremenek81ea7992008-07-02 00:03:09 +000048} // end clang namespace
49
50#endif