13 #ifndef LLVM_CLANG_ANALYSIS_ANALYSES_POSTORDERCFGVIEW_H 14 #define LLVM_CLANG_ANALYSIS_ANALYSES_POSTORDERCFGVIEW_H 19 #include "llvm/ADT/BitVector.h" 20 #include "llvm/ADT/DenseMap.h" 21 #include "llvm/ADT/None.h" 22 #include "llvm/ADT/PostOrderIterator.h" 29 virtual void anchor();
39 llvm::BitVector VisitedBlockIDs;
57 return std::make_pair(
None,
false);
59 return std::make_pair(
None,
false);
61 return std::make_pair(
None,
true);
68 return VisitedBlockIDs.test(Block->
getBlockID());
73 using po_iterator = llvm::po_iterator<const CFG *, CFGBlockSet, true>;
74 std::vector<const CFGBlock *> Blocks;
76 using BlockOrderTy = llvm::DenseMap<const CFGBlock *, unsigned>;
77 BlockOrderTy BlockOrder;
82 using iterator = std::vector<const CFGBlock *>::reverse_iterator;
83 using const_iterator = std::vector<const CFGBlock *>::const_reverse_iterator;
109 static const void *
getTag();
116 #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)