14 #ifndef LLVM_CLANG_ANALYSIS_ANALYSES_POSTORDERCFGVIEW_H 15 #define LLVM_CLANG_ANALYSIS_ANALYSES_POSTORDERCFGVIEW_H 20 #include "llvm/ADT/BitVector.h" 21 #include "llvm/ADT/DenseMap.h" 22 #include "llvm/ADT/None.h" 23 #include "llvm/ADT/PostOrderIterator.h" 30 virtual void anchor();
40 llvm::BitVector VisitedBlockIDs;
58 return std::make_pair(
None,
false);
60 return std::make_pair(
None,
false);
62 return std::make_pair(
None,
true);
69 return VisitedBlockIDs.test(Block->
getBlockID());
74 using po_iterator = llvm::po_iterator<const CFG *, CFGBlockSet, true>;
75 std::vector<const CFGBlock *> Blocks;
77 using BlockOrderTy = llvm::DenseMap<const CFGBlock *, unsigned>;
78 BlockOrderTy BlockOrder;
83 using iterator = std::vector<const CFGBlock *>::reverse_iterator;
84 using const_iterator = std::vector<const CFGBlock *>::const_reverse_iterator;
110 static const void *
getTag();
117 #endif // LLVM_CLANG_ANALYSIS_ANALYSES_POSTORDERCFGVIEW_H The base class of a hierarchy of objects representing analyses tied to AnalysisDeclContext.
friend struct BlockOrderCompare
unsigned getBlockID() const
std::vector< const CFGBlock * >::const_reverse_iterator const_iterator
AnalysisDeclContext contains the context data for the function or method under analysis.
static PostOrderCFGView * create(AnalysisDeclContext &analysisContext)
bool alreadySet(const CFGBlock *Block)
Check if the bit for a CFGBlock has been already set.
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified...
Implements a set of CFGBlocks using a BitVector.
const_iterator end() const
Represents a single basic block in a source-level CFG.
Represents a source-level, intra-procedural CFG that represents the control-flow of a Stmt...
const_iterator begin() const
std::pair< llvm::NoneType, bool > insert(const CFGBlock *Block)
Set the bit associated with a particular CFGBlock.
const PostOrderCFGView & POV
BlockOrderCompare getComparator() const
std::vector< const CFGBlock * >::reverse_iterator iterator
Dataflow Directional Tag Classes.
CFGBlockSet(const CFG *G)
BlockOrderCompare(const PostOrderCFGView &pov)
static const void * getTag()
PostOrderCFGView(const CFG *cfg)