clang API Documentation

ModelConsumer.h
Go to the documentation of this file.
00001 //===-- ModelConsumer.h -----------------------------------------*- C++ -*-===//
00002 //
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file is distributed under the University of Illinois Open Source
00006 // License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 ///
00010 /// \file
00011 /// \brief This file implements clang::ento::ModelConsumer which is an
00012 /// ASTConsumer for model files.
00013 ///
00014 //===----------------------------------------------------------------------===//
00015 
00016 #ifndef LLVM_CLANG_GR_MODELCONSUMER_H
00017 #define LLVM_CLANG_GR_MODELCONSUMER_H
00018 
00019 #include "clang/AST/ASTConsumer.h"
00020 #include "llvm/ADT/StringMap.h"
00021 
00022 namespace clang {
00023 
00024 class Stmt;
00025 
00026 namespace ento {
00027 
00028 /// \brief ASTConsumer to consume model files' AST.
00029 ///
00030 /// This consumer collects the bodies of function definitions into a StringMap
00031 /// from a model file.
00032 class ModelConsumer : public ASTConsumer {
00033 public:
00034   ModelConsumer(llvm::StringMap<Stmt *> &Bodies);
00035 
00036   bool HandleTopLevelDecl(DeclGroupRef D) override;
00037 
00038 private:
00039   llvm::StringMap<Stmt *> &Bodies;
00040 };
00041 }
00042 }
00043 
00044 #endif