260 void addEdge(
const std::string className,
284 if (
it->second ==
id)
295 it->second.insert(node);
355 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 FunObjVar * getVirtualFunctionBasedonID(u32_t id) const
const CHNodeSetTy & getInstances(const std::string className)
void addEdge(const std::string className, const std::string baseClassName, CHEdge::CHEDGETYPE edgeType)
Map< const FunObjVar *, u32_t > virtualFunctionToIDMap
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
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)
Map< std::string, CHNodeSetTy > NameToCHNodesMap
CallNodeToVTableSetMap callNodeToCHAVtblsMap
FIFOWorkList< const CHNode * > WorkList
const CHNodeSetTy & getDescendants(const std::string className)
u32_t getVirtualFunctionID(const FunObjVar *vfn) const
virtual const std::string & getName() const
void setVTable(const GlobalObjVar *vtbl)
void getVirtualFunctions(u32_t idx, FuncVector &virtualFunctions) const
bool isMultiInheritance() const
bool isPureAbstract() const
static bool classof(const SVFValue *node)
void setMultiInheritance()
static bool classof(const CHNode *)
Methods for support type inquiry through isa, cast, and dyn_cast:
const GlobalObjVar * vtable
CHNode(const std::string &name, NodeID i=0, GNodeK k=CHNodeKd)
void addVirtualFunctionVector(FuncVector vfuncvec)
std::vector< FuncVector > virtualFunctionVectors
const std::vector< FuncVector > & getVirtualFunctionVectors() const
static bool classof(const GenericCHNodeTy *node)
const GlobalObjVar * getVTable() const
void setFlag(CLASSATTR mask)
Flags.
void setPureAbstract()
Attribute.
bool hasFlag(CLASSATTR mask) const
std::vector< const FunObjVar * > FuncVector
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 GlobalObjVar * > 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 FunObjVar * > VFunSet