clang  9.0.0svn
FrontendActions.cpp
Go to the documentation of this file.
1 //===--- FrontendActions.cpp ----------------------------------------------===//
2 //
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
6 //
7 //===----------------------------------------------------------------------===//
8 
12 using namespace clang;
13 using namespace ento;
14 
15 std::unique_ptr<ASTConsumer>
17  return CreateAnalysisConsumer(CI);
18 }
19 
20 ParseModelFileAction::ParseModelFileAction(llvm::StringMap<Stmt *> &Bodies)
21  : Bodies(Bodies) {}
22 
23 std::unique_ptr<ASTConsumer>
25  StringRef InFile) {
26  return llvm::make_unique<ModelConsumer>(Bodies);
27 }
std::unique_ptr< ASTConsumer > CreateASTConsumer(CompilerInstance &CI, StringRef InFile) override
Create the AST consumer object for this action, if supported.
CompilerInstance - Helper class for managing a single instance of the Clang compiler.
Dataflow Directional Tag Classes.
This file implements clang::ento::ModelConsumer which is an ASTConsumer for model files...
std::unique_ptr< AnalysisASTConsumer > CreateAnalysisConsumer(CompilerInstance &CI)
CreateAnalysisConsumer - Creates an ASTConsumer to run various code analysis passes.
std::unique_ptr< ASTConsumer > CreateASTConsumer(CompilerInstance &CI, StringRef InFile) override
Create the AST consumer object for this action, if supported.
ParseModelFileAction(llvm::StringMap< Stmt *> &Bodies)