Home | History | Annotate | Download | only in Analysis

Lines Matching defs:CallGraph

1 //===- CallGraph.h - Build a Module's call graph ----------------*- C++ -*-===//
14 // callgraph node keeps track of which functions the are called by the function
39 // Because of these properties, the CallGraph captures a conservative superset
43 // The CallGraph class also attempts to figure out what the root of the
44 // CallGraph is, which it currently does by looking for a function named 'main'.
70 // CallGraph class definition
72 class CallGraph {
100 assert(I != FunctionMap.end() && "Function not in callgraph!");
105 assert(I != FunctionMap.end() && "Function not in callgraph!");
110 /// into the callgraph. Override this if you want behavioral inheritance.
152 CallGraph() {}
155 virtual ~CallGraph() { destroy(); }
158 /// re/initializes the state of the CallGraph.
173 friend class CallGraph;
178 // and the callgraph node being called.
221 /// CallGraph that reference this node in their callee list.
296 /// used by the CallGraph class.
341 template<> struct GraphTraits<CallGraph*> : public GraphTraits<CallGraphNode*> {
342 static NodeType *getEntryNode(CallGraph *CGN) {
349 typedef mapped_iterator<CallGraph::iterator, DerefFun> nodes_iterator;
350 static nodes_iterator nodes_begin(CallGraph *CG) {
353 static nodes_iterator nodes_end (CallGraph *CG) {
362 template<> struct GraphTraits<const CallGraph*> :
364 static NodeType *getEntryNode(const CallGraph *CGN) {
368 typedef CallGraph::const_iterator nodes_iterator;
369 static nodes_iterator nodes_begin(const CallGraph *CG) { return CG->begin(); }
370 static nodes_iterator nodes_end (const CallGraph *CG) { return CG->end(); }
375 // Make sure that any clients of this file link in CallGraph.cpp
376 FORCE_DEFINING_FILE_TO_BE_LINKED(CallGraph)