Skip to content

CallGraphBuilder

Synopsis

Declared in <src/midend/programAnalysis/CallGraphAnalysis/CallGraph.h>

class [[visibility("default")]] CallGraphBuilder;

Member Functions

Name Description
CallGraphBuilder
CallGraphBuilder(SgProject* proj); [constructor]
Construct from SgProject
addGraphNodeMapping
void addGraphNodeMapping( SgFunctionDeclaration* fdecl, SgGraphNode* graphNode);
buildCallGraph
void buildCallGraph();
buildCallGraph overloads
getGraph
SgIncidenceDirectedGraph* getGraph();
Grab the call graph built
getGraphNodeFor
SgGraphNode* getGraphNodeFor(SgFunctionDeclaration* fdecl) const;
Retrieve the node matching a function declaration (using mangled name to resolve across translation units)
getGraphNodesMapping
std::unordered_map<SgFunctionDeclaration*, SgGraphNode*>& getGraphNodesMapping();
hasGraphNodeFor
SgGraphNode* hasGraphNodeFor(SgFunctionDeclaration* fdecl) const;
Retrieve the node matching a function declaration using firstNondefiningDeclaration (does not work across translation units)

Private Type Aliases

Name
GraphNodes
GraphNodesByMangledName
GraphNodesByMangledNameList

Private Member Functions

Name
collectNonFunctionConstructorTargets
std::vector<SgFunctionDeclaration*> collectNonFunctionConstructorTargets(ClassHierarchyWrapper* classHierarchy);
getGraphNodeForMangledName
SgGraphNode* getGraphNodeForMangledName(SgFunctionDeclaration* fdecl) const;
registerGraphNode
void registerGraphNode( SgFunctionDeclaration* fdecl, SgGraphNode* graphNode);
shouldMaterializeImplicitCallTarget
bool shouldMaterializeImplicitCallTarget(SgFunctionDeclaration* fdecl) const;
shouldMaterializeResolvedCallTarget
bool shouldMaterializeResolvedCallTarget(SgFunctionDeclaration* fdecl) const;

Private Data Members

Name
graph
graphNodes
graphNodesByMangledName
project

Created with MrDocs