xref: /minix3/external/bsd/llvm/dist/clang/lib/StaticAnalyzer/Frontend/FrontendActions.cpp (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1f4a2713aSLionel Sambuc //===--- FrontendActions.cpp ----------------------------------------------===//
2f4a2713aSLionel Sambuc //
3f4a2713aSLionel Sambuc //                     The LLVM Compiler Infrastructure
4f4a2713aSLionel Sambuc //
5f4a2713aSLionel Sambuc // This file is distributed under the University of Illinois Open Source
6f4a2713aSLionel Sambuc // License. See LICENSE.TXT for details.
7f4a2713aSLionel Sambuc //
8f4a2713aSLionel Sambuc //===----------------------------------------------------------------------===//
9f4a2713aSLionel Sambuc 
10f4a2713aSLionel Sambuc #include "clang/StaticAnalyzer/Frontend/FrontendActions.h"
11*0a6a1f1dSLionel Sambuc #include "clang/StaticAnalyzer/Frontend/AnalysisConsumer.h"
12*0a6a1f1dSLionel Sambuc #include "clang/StaticAnalyzer/Frontend/ModelConsumer.h"
13f4a2713aSLionel Sambuc using namespace clang;
14f4a2713aSLionel Sambuc using namespace ento;
15f4a2713aSLionel Sambuc 
16*0a6a1f1dSLionel Sambuc std::unique_ptr<ASTConsumer>
CreateASTConsumer(CompilerInstance & CI,StringRef InFile)17*0a6a1f1dSLionel Sambuc AnalysisAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) {
18*0a6a1f1dSLionel Sambuc   return CreateAnalysisConsumer(CI);
19f4a2713aSLionel Sambuc }
20f4a2713aSLionel Sambuc 
ParseModelFileAction(llvm::StringMap<Stmt * > & Bodies)21*0a6a1f1dSLionel Sambuc ParseModelFileAction::ParseModelFileAction(llvm::StringMap<Stmt *> &Bodies)
22*0a6a1f1dSLionel Sambuc     : Bodies(Bodies) {}
23*0a6a1f1dSLionel Sambuc 
24*0a6a1f1dSLionel Sambuc std::unique_ptr<ASTConsumer>
CreateASTConsumer(CompilerInstance & CI,StringRef InFile)25*0a6a1f1dSLionel Sambuc ParseModelFileAction::CreateASTConsumer(CompilerInstance &CI,
26*0a6a1f1dSLionel Sambuc                                         StringRef InFile) {
27*0a6a1f1dSLionel Sambuc   return llvm::make_unique<ModelConsumer>(Bodies);
28*0a6a1f1dSLionel Sambuc }
29