10b57cec5SDimitry Andric //===--- FrontendActions.cpp ----------------------------------------------===// 20b57cec5SDimitry Andric // 30b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 40b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information. 50b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 60b57cec5SDimitry Andric // 70b57cec5SDimitry Andric //===----------------------------------------------------------------------===// 80b57cec5SDimitry Andric 90b57cec5SDimitry Andric #include "clang/StaticAnalyzer/Frontend/FrontendActions.h" 100b57cec5SDimitry Andric #include "clang/StaticAnalyzer/Frontend/AnalysisConsumer.h" 110b57cec5SDimitry Andric #include "clang/StaticAnalyzer/Frontend/ModelConsumer.h" 120b57cec5SDimitry Andric using namespace clang; 130b57cec5SDimitry Andric using namespace ento; 140b57cec5SDimitry Andric 150b57cec5SDimitry Andric std::unique_ptr<ASTConsumer> CreateASTConsumer(CompilerInstance & CI,StringRef InFile)160b57cec5SDimitry AndricAnalysisAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) { 170b57cec5SDimitry Andric return CreateAnalysisConsumer(CI); 180b57cec5SDimitry Andric } 190b57cec5SDimitry Andric ParseModelFileAction(llvm::StringMap<Stmt * > & Bodies)200b57cec5SDimitry AndricParseModelFileAction::ParseModelFileAction(llvm::StringMap<Stmt *> &Bodies) 210b57cec5SDimitry Andric : Bodies(Bodies) {} 220b57cec5SDimitry Andric 230b57cec5SDimitry Andric std::unique_ptr<ASTConsumer> CreateASTConsumer(CompilerInstance & CI,StringRef InFile)240b57cec5SDimitry AndricParseModelFileAction::CreateASTConsumer(CompilerInstance &CI, 250b57cec5SDimitry Andric StringRef InFile) { 26*a7dea167SDimitry Andric return std::make_unique<ModelConsumer>(Bodies); 270b57cec5SDimitry Andric } 28