Daniel Dunbar | c1b1729 | 2010-06-15 17:48:49 +0000 | [diff] [blame] | 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 | |
Argyrios Kyrtzidis | 556c45e | 2011-02-14 18:13:31 +0000 | [diff] [blame] | 10 | #include "clang/StaticAnalyzer/Frontend/FrontendActions.h" |
Alexander Kornienko | 6de3949 | 2014-01-03 17:23:10 +0000 | [diff] [blame] | 11 | #include "clang/StaticAnalyzer/Frontend/AnalysisConsumer.h" |
Ted Kremenek | eeccb30 | 2014-08-27 15:14:15 +0000 | [diff] [blame^] | 12 | #include "clang/StaticAnalyzer/Frontend/ModelConsumer.h" |
Daniel Dunbar | c1b1729 | 2010-06-15 17:48:49 +0000 | [diff] [blame] | 13 | using namespace clang; |
Ted Kremenek | 98857c9 | 2010-12-23 07:20:52 +0000 | [diff] [blame] | 14 | using namespace ento; |
Daniel Dunbar | c1b1729 | 2010-06-15 17:48:49 +0000 | [diff] [blame] | 15 | |
David Blaikie | 6beb6aa | 2014-08-10 19:56:51 +0000 | [diff] [blame] | 16 | std::unique_ptr<ASTConsumer> |
| 17 | AnalysisAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) { |
Ted Kremenek | eeccb30 | 2014-08-27 15:14:15 +0000 | [diff] [blame^] | 18 | return CreateAnalysisConsumer(CI); |
Daniel Dunbar | c1b1729 | 2010-06-15 17:48:49 +0000 | [diff] [blame] | 19 | } |
| 20 | |
Ted Kremenek | eeccb30 | 2014-08-27 15:14:15 +0000 | [diff] [blame^] | 21 | ParseModelFileAction::ParseModelFileAction(llvm::StringMap<Stmt *> &Bodies) |
| 22 | : Bodies(Bodies) {} |
| 23 | |
| 24 | std::unique_ptr<ASTConsumer> |
| 25 | ParseModelFileAction::CreateASTConsumer(CompilerInstance &CI, |
| 26 | StringRef InFile) { |
| 27 | return llvm::make_unique<ModelConsumer>(Bodies); |
| 28 | } |