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/PostOrderIterator.h"
28 virtual void anchor();
38 llvm::BitVector VisitedBlockIDs;
56 return std::make_pair(std::nullopt,
58 if (VisitedBlockIDs.test(
Block->getBlockID()))
59 return std::make_pair(std::nullopt,
false);
60 VisitedBlockIDs.set(
Block->getBlockID());
61 return std::make_pair(std::nullopt,
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();
111 static std::unique_ptr<PostOrderCFGView>
This file defines AnalysisDeclContext, a class that manages the analysis context data for context sen...
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified.
AnalysisDeclContext contains the context data for the function, method or block under analysis.
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.
The base class of a hierarchy of objects representing analyses tied to AnalysisDeclContext.
Implements a set of CFGBlocks using a BitVector.
CFGBlockSet(const CFG *G)
std::pair< std::nullopt_t, bool > insert(const CFGBlock *Block)
Set the bit associated with a particular CFGBlock.
bool alreadySet(const CFGBlock *Block)
Check if the bit for a CFGBlock has been already set.
BlockOrderCompare getComparator() const
const_iterator begin() const
std::vector< const CFGBlock * >::reverse_iterator iterator
static std::unique_ptr< PostOrderCFGView > create(AnalysisDeclContext &analysisContext)
std::vector< const CFGBlock * >::const_reverse_iterator const_iterator
const_iterator end() const
static const void * getTag()
BlockOrderCompare(const PostOrderCFGView &pov)
bool operator()(const CFGBlock *b1, const CFGBlock *b2) const
const PostOrderCFGView & POV