blob: 420714fd60bfa9d6ed8d143d62768d996d18ba2c [file] [log] [blame]
Ted Kremenekf4381fd2008-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 Kremenekf7f3c202008-07-15 00:46:02 +000020#define ANALYSIS(NAME, CMDFLAG, DESC, SCOPE) NAME,
Ted Kremenekfb9a48c2008-07-14 23:41:13 +000021#include "Analyses.def"
22NumAnalyses
Ted Kremenekf4381fd2008-07-02 00:03:09 +000023};
Ted Kremenek95c7b002008-10-24 01:04:59 +000024
25enum AnalysisStores {
26#define ANALYSIS_STORE(NAME, CMDFLAG, DESC) NAME##Model,
27#include "Analyses.def"
28NumStores
29};
Ted Kremenekfb9a48c2008-07-14 23:41:13 +000030
Ted Kremenekf4381fd2008-07-02 00:03:09 +000031ASTConsumer* CreateAnalysisConsumer(Analyses* Beg, Analyses* End,
Ted Kremenek95c7b002008-10-24 01:04:59 +000032 AnalysisStores SM,
Ted Kremenekf4381fd2008-07-02 00:03:09 +000033 Diagnostic &diags, Preprocessor* pp,
34 PreprocessorFactory* ppf,
35 const LangOptions& lopts,
36 const std::string& fname,
37 const std::string& htmldir,
Ted Kremenekf8ce6992008-08-27 22:31:43 +000038 bool VisualizeGraphViz,
39 bool VisualizeUbi,
Ted Kremenek95c7b002008-10-24 01:04:59 +000040 bool VizTrimGraph,
Ted Kremenekf8ce6992008-08-27 22:31:43 +000041 bool AnalyzeAll);
Ted Kremenekf4381fd2008-07-02 00:03:09 +000042} // end clang namespace
43
44#endif