260 void addEdge(
const std::string className,
284 if (
it->second ==
id)
295 it->second.insert(node);
356 Inverse<SVF::GenericNode<SVF::CHNode, SVF::CHEdge>*>>
CHEDGETYPE getEdgeType() const
GenericNode< CHNode, CHEdge >::GEdgeSetTy CHEdgeSetTy
CHEdge(CHNode *s, CHNode *d, CHEDGETYPE et, GEdgeFlag k=0)
NameToCHNodesMap classNameToAncestorsMap
CallNodeToCHNodesMap callNodeToClassesMap
CallNodeToVFunSetMap callNodeToCHAVFnsMap
void dump(const std::string &filename)
bool csHasVtblsBasedonCHA(const CallICFGNode *cs) override
const CHNodeSetTy & getInstances(const std::string className)
void addEdge(const std::string className, const std::string baseClassName, CHEdge::CHEDGETYPE edgeType)
bool csHasVFnsBasedonCHA(const CallICFGNode *cs) override
const VFunSet & getCSVFsBasedonCHA(const CallICFGNode *cs) override
const VTableSet & getCSVtblsBasedonCHA(const CallICFGNode *cs) override
void addInstances(const std::string templateName, CHNode *node)
~CHGraph() override=default
Map< const SVFFunction *, u32_t > virtualFunctionToIDMap
u32_t getVirtualFunctionID(const SVFFunction *vfn) const
void getVFnsFromVtbls(const CallICFGNode *cs, const VTableSet &vtbls, VFunSet &virtualFunctions) override
CHNode * getNode(const std::string name) const
Map< const ICFGNode *, VFunSet > CallNodeToVFunSetMap
NameToCHNodesMap classNameToInstAndDescsMap
NameToCHNodesMap classNameToDescendantsMap
NameToCHNodesMap templateNameToInstancesMap
Set< const CHNode * > CHNodeSetTy
Map< const ICFGNode *, VTableSet > CallNodeToVTableSetMap
Map< const ICFGNode *, CHNodeSetTy > CallNodeToCHNodesMap
Map< std::string, CHNode * > classNameToNodeMap
static bool classof(const CommonCHGraph *chg)
const SVFFunction * getVirtualFunctionBasedonID(u32_t id) const
Map< std::string, CHNodeSetTy > NameToCHNodesMap
CallNodeToVTableSetMap callNodeToCHAVtblsMap
FIFOWorkList< const CHNode * > WorkList
const CHNodeSetTy & getDescendants(const std::string className)
CHGraph(SVFModule *svfModule)
const SVFGlobalValue * vtable
void getVirtualFunctions(u32_t idx, FuncVector &virtualFunctions) const
bool isMultiInheritance() const
bool isPureAbstract() const
void setMultiInheritance()
static bool classof(const CHNode *)
Methods for support type inquiry through isa, cast, and dyn_cast:
CHNode(const std::string &name, NodeID i=0, GNodeK k=CHNodeKd)
void addVirtualFunctionVector(FuncVector vfuncvec)
const SVFGlobalValue * getVTable() const
std::vector< FuncVector > virtualFunctionVectors
std::vector< const SVFFunction * > FuncVector
const std::vector< FuncVector > & getVirtualFunctionVectors() const
static bool classof(const GenericCHNodeTy *node)
void setVTable(const SVFGlobalValue *vtbl)
void setFlag(CLASSATTR mask)
Flags.
void setPureAbstract()
Attribute.
static bool classof(const SVFBaseNode *node)
bool hasFlag(CLASSATTR mask) const
std::string getName() const
Common base for class hierarchy graph. Only implements what PointerAnalysis needs.
virtual const VFunSet & getCSVFsBasedonCHA(const CallICFGNode *cs)=0
virtual bool csHasVFnsBasedonCHA(const CallICFGNode *cs)=0
virtual const VTableSet & getCSVtblsBasedonCHA(const CallICFGNode *cs)=0
virtual void getVFnsFromVtbls(const CallICFGNode *cs, const VTableSet &vtbls, VFunSet &virtualFunctions)=0
virtual bool csHasVtblsBasedonCHA(const CallICFGNode *cs)=0
CHGKind getKind(void) const
OrderedSet< EdgeType *, typename EdgeType::equalGEdge > GEdgeSetTy
Edge kind.
GNodeK getNodeKind() const
Get node kind.
Set< const SVFGlobalValue * > VTableSet
GenericGraph< CHNode, CHEdge > GenericCHGraphTy
class hierarchy graph
GenericEdge< CHNode > GenericCHEdgeTy
std::unordered_map< Key, Value, Hash, KeyEqual, Allocator > Map
llvm::IRBuilder IRBuilder
GenericNode< CHNode, CHEdge > GenericCHNodeTy
Set< const SVFFunction * > VFunSet