17#ifndef LLVM_CLANG_ANALYSIS_ANALYSISDECLCONTEXT_H
18#define LLVM_CLANG_ANALYSIS_ANALYSISDECLCONTEXT_H
25#include "llvm/ADT/DenseMap.h"
26#include "llvm/ADT/FoldingSet.h"
27#include "llvm/ADT/StringRef.h"
28#include "llvm/ADT/iterator_range.h"
29#include "llvm/Support/Allocator.h"
35class AnalysisDeclContextManager;
38class BlockInvocationContext;
39class CFGReverseBlockReachabilityAnalysis;
41class ImplicitParamDecl;
43class LocationContextManager;
45class StackFrameContext;
79 std::unique_ptr<CFG> cfg, completeCFG;
80 std::unique_ptr<CFGStmtMap> cfgStmtMap;
85 bool builtCFG =
false;
86 bool builtCompleteCFG =
false;
87 std::unique_ptr<ParentMap> PM;
88 std::unique_ptr<CFGReverseBlockReachabilityAnalysis> CFA;
90 llvm::BumpPtrAllocator A;
92 llvm::DenseMap<const BlockDecl *, void *> *ReferencedBlockVars =
nullptr;
94 void *ManagedAnalyses =
nullptr;
113 return cfgBuildOptions;
173 llvm::iterator_range<referenced_decls_iterator>
183 unsigned BlockCount,
unsigned Index);
193 const void *tag = T::getTag();
194 std::unique_ptr<ManagedAnalysis> &data = getAnalysisImpl(tag);
196 data = T::create(*
this);
197 return static_cast<T *
>(data.get());
206 std::unique_ptr<ManagedAnalysis> &getAnalysisImpl(
const void *tag);
232 : Kind(k), Ctx(ctx),
Parent(parent), ID(ID) {
241 int64_t
getID()
const {
return ID; }
243 LLVM_ATTRIBUTE_RETURNS_NONNULL
267 virtual void Profile(llvm::FoldingSetNodeID &ID) = 0;
272 LLVM_DUMP_METHOD
void dumpStack(raw_ostream &Out)
const;
286 raw_ostream &Out,
const char *NL =
"\n",
unsigned int Space = 0,
291 LLVM_DUMP_METHOD
void dump()
const;