clang API Documentation

StaticAnalyzer/Frontend/FrontendActions.cpp
Go to the documentation of this file.
00001 //===--- FrontendActions.cpp ----------------------------------------------===//
00002 //
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file is distributed under the University of Illinois Open Source
00006 // License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 
00010 #include "clang/StaticAnalyzer/Frontend/FrontendActions.h"
00011 #include "clang/StaticAnalyzer/Frontend/AnalysisConsumer.h"
00012 #include "clang/StaticAnalyzer/Frontend/ModelConsumer.h"
00013 using namespace clang;
00014 using namespace ento;
00015 
00016 std::unique_ptr<ASTConsumer>
00017 AnalysisAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) {
00018   return CreateAnalysisConsumer(CI);
00019 }
00020 
00021 ParseModelFileAction::ParseModelFileAction(llvm::StringMap<Stmt *> &Bodies)
00022     : Bodies(Bodies) {}
00023 
00024 std::unique_ptr<ASTConsumer>
00025 ParseModelFileAction::CreateASTConsumer(CompilerInstance &CI,
00026                                         StringRef InFile) {
00027   return llvm::make_unique<ModelConsumer>(Bodies);
00028 }