36using namespace SVFUtil;
42 for (CHEdge::CHEdgeSetTy::const_iterator
it = src->
getOutEdges().begin(),
45 CHNode *node = (*it)->getDstNode();
47 if (node == dst && edgeType ==
et)
60 for (
unsigned i = 1;
i < arg_size;
i++)
133 if (
child ==
nullptr)
137 for (CHNode::FuncVector::const_iterator
fit =
vfns.begin(),
161 const std::string
suffix(
"[abi:cxx11]");
213 if ((*it).size() >
idx)
225 for (CHEdge::CHEdgeSetTy::const_iterator
it = node->
OutEdgeBegin();
229 outs() << (*it)->getDstNode()->getName() <<
" --inheritance--> "
230 << (*it)->getSrcNode()->getName() <<
"\n";
232 outs() << (*it)->getSrcNode()->getName() <<
" --instance--> "
233 << (*it)->getDstNode()->getName() <<
"\n";
272 return "Class Hierarchy Graph";
290 template<
class EdgeIter>
298 return "style=solid";
302 return "style=dashed";
static bool hasEdge(const CHNode *src, const CHNode *dst, CHEdge::CHEDGETYPE et)
static bool checkArgTypes(const CallICFGNode *cs, const SVFFunction *fn)
CallNodeToVFunSetMap callNodeToCHAVFnsMap
void dump(const std::string &filename)
bool csHasVtblsBasedonCHA(const CallICFGNode *cs) override
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 getVFnsFromVtbls(const CallICFGNode *cs, const VTableSet &vtbls, VFunSet &virtualFunctions) override
CHNode * getNode(const std::string name) const
Map< std::string, CHNode * > classNameToNodeMap
CallNodeToVTableSetMap callNodeToCHAVtblsMap
void getVirtualFunctions(u32_t idx, FuncVector &virtualFunctions) const
bool isPureAbstract() const
std::vector< FuncVector > virtualFunctionVectors
std::vector< const SVFFunction * > FuncVector
std::string getName() const
const ValVar * getArgument(u32_t ArgNo) const
Parameter operations.
s32_t getFunIdxInVtable() const
const std::string & getFunNameOfVirtualCall() const
iterator begin()
Iterators.
IDToNodeMapTy::const_iterator const_iterator
const GEdgeSetTy & getOutEdges() const
iterator OutEdgeBegin()
iterators
static void WriteGraphToFile(SVF::OutStream &O, const std::string &GraphName, const GraphType >, bool simple=false)
const std::string & getName() const
std::ostream & outs()
Overwrite llvm::outs()
Set< const SVFGlobalValue * > VTableSet
void ViewGraph(const GraphType &G, const std::string &name, bool ShortNames=false, GraphProgram::Name Program=GraphProgram::DOT)
llvm::IRBuilder IRBuilder
Set< const SVFFunction * > VFunSet
DOTGraphTraits(bool isSimple=false)
static std::string getNodeLabel(CHNode *node, CHGraph *)
Return function name;.
static std::string getGraphName(CHGraph *)
Return name of the graph.
static std::string getNodeAttributes(CHNode *node, CHGraph *)
static std::string getEdgeAttributes(CHNode *, EdgeIter EI, CHGraph *)