1 //===-- ModelConsumer.h -----------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
11 /// This file implements clang::ento::ModelConsumer which is an
12 /// ASTConsumer for model files.
14 //===----------------------------------------------------------------------===//
16 #ifndef LLVM_CLANG_GR_MODELCONSUMER_H
17 #define LLVM_CLANG_GR_MODELCONSUMER_H
19 #include "clang/AST/ASTConsumer.h"
20 #include "llvm/ADT/StringMap.h"
28 /// ASTConsumer to consume model files' AST.
30 /// This consumer collects the bodies of function definitions into a StringMap
31 /// from a model file.
32 class ModelConsumer : public ASTConsumer {
34 ModelConsumer(llvm::StringMap<Stmt *> &Bodies);
36 bool HandleTopLevelDecl(DeclGroupRef D) override;
39 llvm::StringMap<Stmt *> &Bodies;