LRDE Tiger Compiler
1.34a $Id: 7fef12e1f5fa43449d667a0eec1d837c40fc1202 $
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
fundec-graph.hxx
Go to the documentation of this file.
1
6
#ifndef CALLGRAPH_FUNDEC_GRAPH_HXX
7
# define CALLGRAPH_FUNDEC_GRAPH_HXX
8
9
# include <
callgraph/fundec-graph.hh
>
10
11
namespace
callgraph
12
{
13
14
inline
15
FundecGraph::FundecGraph
()
16
{}
17
18
inline
19
FundecGraph::~FundecGraph
()
20
{}
21
22
inline
void
23
FundecGraph::fundec_add
(
ast::FunctionDec
* f)
24
{
25
hfundecs
[f] = this->
vertex_add
(f);
26
}
27
28
inline
void
29
FundecGraph::fundec_link
(
ast::FunctionDec
* fu,
30
ast::FunctionDec
* fv)
31
{
32
vertex_descriptor
u =
hfundecs
[fu];
33
vertex_descriptor
v =
hfundecs
[fv];
34
boost::add_edge(u, v, *
this
);
35
}
36
37
inline
38
FundecGraph::vertex_descriptor
39
FundecGraph::hfundec_get
(
ast::FunctionDec
* f)
const
40
{
41
hfundecs_type::const_iterator i =
hfundecs
.find(f);
42
assertion
(i !=
hfundecs
.end());
43
return
i->second;
44
}
45
46
inline
47
std::ostream&
48
FundecGraph::vertex_print
(vertex_descriptor v, std::ostream& ostr)
const
49
{
50
return
ostr << (*this)[v]->name_get();
51
}
52
53
}
// namespace callgraph
54
55
#endif // !CALLGRAPH_FUNDEC_GRAPH_HXX
callgraph
fundec-graph.hxx
Generated on Wed Mar 5 2014 15:47:36 for LRDE Tiger Compiler by
1.8.1.2