• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===--- FrontendActions.cpp ----------------------------------------------===//
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 #include "clang/StaticAnalyzer/Frontend/FrontendActions.h"
11 #include "clang/StaticAnalyzer/Frontend/AnalysisConsumer.h"
12 #include "clang/StaticAnalyzer/Frontend/ModelConsumer.h"
13 using namespace clang;
14 using namespace ento;
15 
16 std::unique_ptr<ASTConsumer>
CreateASTConsumer(CompilerInstance & CI,StringRef InFile)17 AnalysisAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) {
18   return CreateAnalysisConsumer(CI);
19 }
20 
ParseModelFileAction(llvm::StringMap<Stmt * > & Bodies)21 ParseModelFileAction::ParseModelFileAction(llvm::StringMap<Stmt *> &Bodies)
22     : Bodies(Bodies) {}
23 
24 std::unique_ptr<ASTConsumer>
CreateASTConsumer(CompilerInstance & CI,StringRef InFile)25 ParseModelFileAction::CreateASTConsumer(CompilerInstance &CI,
26                                         StringRef InFile) {
27   return llvm::make_unique<ModelConsumer>(Bodies);
28 }
29