blob: b33608042ce3d21cdcab44e67b99ec44381faa05 [file] [log] [blame]
Daniel Dunbarc1b17292010-06-15 17:48:49 +00001//===--- 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
Argyrios Kyrtzidis556c45e2011-02-14 18:13:31 +000010#include "clang/StaticAnalyzer/Frontend/FrontendActions.h"
Alexander Kornienko6de39492014-01-03 17:23:10 +000011#include "clang/StaticAnalyzer/Frontend/AnalysisConsumer.h"
Ted Kremenekeeccb302014-08-27 15:14:15 +000012#include "clang/StaticAnalyzer/Frontend/ModelConsumer.h"
Daniel Dunbarc1b17292010-06-15 17:48:49 +000013using namespace clang;
Ted Kremenek98857c92010-12-23 07:20:52 +000014using namespace ento;
Daniel Dunbarc1b17292010-06-15 17:48:49 +000015
David Blaikie6beb6aa2014-08-10 19:56:51 +000016std::unique_ptr<ASTConsumer>
17AnalysisAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) {
Ted Kremenekeeccb302014-08-27 15:14:15 +000018 return CreateAnalysisConsumer(CI);
Daniel Dunbarc1b17292010-06-15 17:48:49 +000019}
20
Ted Kremenekeeccb302014-08-27 15:14:15 +000021ParseModelFileAction::ParseModelFileAction(llvm::StringMap<Stmt *> &Bodies)
22 : Bodies(Bodies) {}
23
24std::unique_ptr<ASTConsumer>
25ParseModelFileAction::CreateASTConsumer(CompilerInstance &CI,
26 StringRef InFile) {
27 return llvm::make_unique<ModelConsumer>(Bodies);
28}