1 #ifndef CALL_GRAPH_TRAVERSE_H
2 #define CALL_GRAPH_TRAVERSE_H
73 std::string
str(std::string indent=
"")
const;
125 std::set<SgGraphNode*>::iterator
itn;
126 std::set<SgDirectedGraphEdge*>
edges;
127 std::set<SgDirectedGraphEdge*>::iterator
ite;
172 for(std::set<CGFunction>::const_iterator it = functions.begin(); it!=functions.end(); it++)
176 if((&(*it))->cgNodes.find(target) != (&(*it))->
cgNodes.end())
183 ROSE_ASSERT(!
"Error finding the target function of a call graph edge when the target is not compiler generated!");
257 return (
dir == that.
dir) &&
265 {
return !((*this) == that); }
345 template <
class InheritedAttribute>
360 virtual InheritedAttribute
visit(
const CGFunction* func, std::list<InheritedAttribute>& fromCallers)=0;
362 virtual InheritedAttribute
defaultAttrVal() { InheritedAttribute val;
return val; }
366 std::map<const CGFunction*, funcRecord> &visitRecords,
367 std::set<std::pair<const CGFunction*, const CGFunction*> > &touchedEdges,
368 InheritedAttribute &fromCaller);
375 template <
class SynthesizedAttribute>
383 virtual SynthesizedAttribute
visit(
const CGFunction* func, std::list<SynthesizedAttribute> fromCallees)=0;
385 virtual SynthesizedAttribute
defaultAttrVal() { SynthesizedAttribute val;
return val; }
389 std::map<const CGFunction*, SynthesizedAttribute> &visitRecords,
390 std::set<std::pair<const CGFunction*, const CGFunction*> > &touchedEdges);