1277325Sdim//===-- ModelConsumer.h -----------------------------------------*- C++ -*-===//
2277325Sdim//
3353358Sdim// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4353358Sdim// See https://llvm.org/LICENSE.txt for license information.
5353358Sdim// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6277325Sdim//
7277325Sdim//===----------------------------------------------------------------------===//
8277325Sdim///
9277325Sdim/// \file
10341825Sdim/// This file implements clang::ento::ModelConsumer which is an
11277325Sdim/// ASTConsumer for model files.
12277325Sdim///
13277325Sdim//===----------------------------------------------------------------------===//
14277325Sdim
15277325Sdim#ifndef LLVM_CLANG_GR_MODELCONSUMER_H
16277325Sdim#define LLVM_CLANG_GR_MODELCONSUMER_H
17277325Sdim
18277325Sdim#include "clang/AST/ASTConsumer.h"
19277325Sdim#include "llvm/ADT/StringMap.h"
20277325Sdim
21277325Sdimnamespace clang {
22277325Sdim
23277325Sdimclass Stmt;
24277325Sdim
25277325Sdimnamespace ento {
26277325Sdim
27341825Sdim/// ASTConsumer to consume model files' AST.
28277325Sdim///
29277325Sdim/// This consumer collects the bodies of function definitions into a StringMap
30277325Sdim/// from a model file.
31277325Sdimclass ModelConsumer : public ASTConsumer {
32277325Sdimpublic:
33277325Sdim  ModelConsumer(llvm::StringMap<Stmt *> &Bodies);
34277325Sdim
35277325Sdim  bool HandleTopLevelDecl(DeclGroupRef D) override;
36277325Sdim
37277325Sdimprivate:
38277325Sdim  llvm::StringMap<Stmt *> &Bodies;
39277325Sdim};
40277325Sdim}
41277325Sdim}
42277325Sdim
43277325Sdim#endif
44