blob: be23b16eb27166eb42af095bc79aac2745e16c5c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
/**
** \file callgraph/libcallgraph.cc
** \brief Define exported callgraph functions.
*/
#include <callgraph/call-graph-visitor.hh>
#include <callgraph/libcallgraph.hh>
#include <callgraph/parent-graph-visitor.hh>
#include <misc/contract.hh>
#include <misc/set.hh>
namespace callgraph
{
// Build the callgraph.
const CallGraph* callgraph_compute(const ast::Ast& tree)
{
CallGraphVisitor callgraph_visitor;
return callgraph_visitor.create(tree);
}
CallGraph* callgraph_compute(ast::Ast& tree)
{
CallGraphVisitor callgraph_visitor;
return callgraph_visitor.create(tree);
}
// Build the parentgraph.
ParentGraph* parentgraph_compute(ast::Ast& tree)
{
ParentGraphVisitor parentgraph_visitor;
return parentgraph_visitor.create(tree);
}
} // namespace callgraph
|