Skip to content

Commit 7a98e15

Browse files
committed
Rename call graph constructors
1 parent 6228ed3 commit 7a98e15

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

src/analyses/call_graph.h

+23-1
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,28 @@ class call_grapht
2525
explicit call_grapht(const goto_modelt &, bool collect_callsites=false);
2626
explicit call_grapht(const goto_functionst &, bool collect_callsites=false);
2727

28-
// These two constructors build a call graph restricted to functions
28+
// These two functions build a call graph restricted to functions
2929
// reachable from the given root.
30+
31+
static call_grapht create_from_root_function(
32+
const goto_modelt &model,
33+
const irep_idt &root,
34+
bool collect_callsites)
35+
{
36+
return call_grapht(model, root, collect_callsites);
37+
}
38+
39+
static call_grapht create_from_root_function(
40+
const goto_functionst &functions,
41+
const irep_idt &root,
42+
bool collect_callsites)
43+
{
44+
return call_grapht(functions, root, collect_callsites);
45+
}
46+
47+
// Constructors used to implement the above:
48+
49+
private:
3050
call_grapht(
3151
const goto_modelt &model,
3252
const irep_idt &root,
@@ -36,6 +56,8 @@ class call_grapht
3656
const irep_idt &root,
3757
bool collect_callsites);
3858

59+
public:
60+
3961
void output_dot(std::ostream &out) const;
4062
void output(std::ostream &out) const;
4163
void output_xml(std::ostream &out) const;

0 commit comments

Comments
 (0)