Daniel Dunbar | c1b1729 | 2010-06-15 17:48:49 +0000 | [diff] [blame] | 1 | //===--- FrontendActions.cpp ----------------------------------------------===// |
| 2 | // |
Chandler Carruth | 2946cd7 | 2019-01-19 08:50:56 +0000 | [diff] [blame] | 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 | // See https://llvm.org/LICENSE.txt for license information. |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
Daniel Dunbar | c1b1729 | 2010-06-15 17:48:49 +0000 | [diff] [blame] | 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
Argyrios Kyrtzidis | 556c45e | 2011-02-14 18:13:31 +0000 | [diff] [blame] | 9 | #include "clang/StaticAnalyzer/Frontend/FrontendActions.h" |
Alexander Kornienko | 6de3949 | 2014-01-03 17:23:10 +0000 | [diff] [blame] | 10 | #include "clang/StaticAnalyzer/Frontend/AnalysisConsumer.h" |
Ted Kremenek | eeccb30 | 2014-08-27 15:14:15 +0000 | [diff] [blame] | 11 | #include "clang/StaticAnalyzer/Frontend/ModelConsumer.h" |
Daniel Dunbar | c1b1729 | 2010-06-15 17:48:49 +0000 | [diff] [blame] | 12 | using namespace clang; |
Ted Kremenek | 98857c9 | 2010-12-23 07:20:52 +0000 | [diff] [blame] | 13 | using namespace ento; |
Daniel Dunbar | c1b1729 | 2010-06-15 17:48:49 +0000 | [diff] [blame] | 14 | |
David Blaikie | 6beb6aa | 2014-08-10 19:56:51 +0000 | [diff] [blame] | 15 | std::unique_ptr<ASTConsumer> |
| 16 | AnalysisAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) { |
Ted Kremenek | eeccb30 | 2014-08-27 15:14:15 +0000 | [diff] [blame] | 17 | return CreateAnalysisConsumer(CI); |
Daniel Dunbar | c1b1729 | 2010-06-15 17:48:49 +0000 | [diff] [blame] | 18 | } |
| 19 | |
Ted Kremenek | eeccb30 | 2014-08-27 15:14:15 +0000 | [diff] [blame] | 20 | ParseModelFileAction::ParseModelFileAction(llvm::StringMap<Stmt *> &Bodies) |
| 21 | : Bodies(Bodies) {} |
| 22 | |
| 23 | std::unique_ptr<ASTConsumer> |
| 24 | ParseModelFileAction::CreateASTConsumer(CompilerInstance &CI, |
| 25 | StringRef InFile) { |
Jonas Devlieghere | 2b3d49b | 2019-08-14 23:04:18 +0000 | [diff] [blame] | 26 | return std::make_unique<ModelConsumer>(Bodies); |
Ted Kremenek | eeccb30 | 2014-08-27 15:14:15 +0000 | [diff] [blame] | 27 | } |