Skip to content

Commit

Permalink
small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hwg committed Nov 5, 2024
1 parent 4deec17 commit 1bcb6b6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
3 changes: 3 additions & 0 deletions svf/include/Util/CallGraphBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ class CallGraphBuilder
/// Buidl SVFIR callgraoh
CallGraph* buildSVFIRCallGraph(SVFModule* svfModule);

/// Buidl PTA callgraoh
PTACallGraph* buildPTACallGraph();

/// Build thread-aware callgraph
ThreadCallGraph* buildThreadCallGraph();
};
Expand Down
4 changes: 2 additions & 2 deletions svf/lib/MemoryModel/PointerAnalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ void PointerAnalysis::initialize()
}
else
{
CallGraph* cg = pag->getCallGraph();
callgraph = new PTACallGraph(*cg);
CallGraphBuilder bd;
callgraph = bd.buildPTACallGraph();

Check warning on line 120 in svf/lib/MemoryModel/PointerAnalysis.cpp

View check run for this annotation

Codecov / codecov/patch

svf/lib/MemoryModel/PointerAnalysis.cpp#L120

Added line #L120 was not covered by tests
}
callGraphSCCDetection();

Expand Down
6 changes: 6 additions & 0 deletions svf/lib/Util/CallGraphBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ CallGraph* CallGraphBuilder::buildSVFIRCallGraph(SVFModule* svfModule)
return callgraph;
}

PTACallGraph* CallGraphBuilder::buildPTACallGraph()

Check warning on line 69 in svf/lib/Util/CallGraphBuilder.cpp

View check run for this annotation

Codecov / codecov/patch

svf/lib/Util/CallGraphBuilder.cpp#L69

Added line #L69 was not covered by tests
{
CallGraph* svfirCallGraph = PAG::getPAG()->getCallGraph();
return new PTACallGraph(*svfirCallGraph);

Check warning on line 72 in svf/lib/Util/CallGraphBuilder.cpp

View check run for this annotation

Codecov / codecov/patch

svf/lib/Util/CallGraphBuilder.cpp#L71-L72

Added lines #L71 - L72 were not covered by tests
}

ThreadCallGraph* CallGraphBuilder::buildThreadCallGraph()
{
CallGraph* svfirCallGraph = PAG::getPAG()->getCallGraph();
Expand Down

0 comments on commit 1bcb6b6

Please sign in to comment.