Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:37:10

0001 //===-- ModelConsumer.h -----------------------------------------*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 ///
0009 /// \file
0010 /// This file implements clang::ento::ModelConsumer which is an
0011 /// ASTConsumer for model files.
0012 ///
0013 //===----------------------------------------------------------------------===//
0014 
0015 #ifndef LLVM_CLANG_STATICANALYZER_FRONTEND_MODELCONSUMER_H
0016 #define LLVM_CLANG_STATICANALYZER_FRONTEND_MODELCONSUMER_H
0017 
0018 #include "clang/AST/ASTConsumer.h"
0019 #include "llvm/ADT/StringMap.h"
0020 
0021 namespace clang {
0022 
0023 class Stmt;
0024 
0025 namespace ento {
0026 
0027 /// ASTConsumer to consume model files' AST.
0028 ///
0029 /// This consumer collects the bodies of function definitions into a StringMap
0030 /// from a model file.
0031 class ModelConsumer : public ASTConsumer {
0032 public:
0033   ModelConsumer(llvm::StringMap<Stmt *> &Bodies);
0034 
0035   bool HandleTopLevelDecl(DeclGroupRef D) override;
0036 
0037 private:
0038   llvm::StringMap<Stmt *> &Bodies;
0039 };
0040 }
0041 }
0042 
0043 #endif