diff options
Diffstat (limited to 'gcc/cgraph.c')
-rw-r--r-- | gcc/cgraph.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/cgraph.c b/gcc/cgraph.c index a7e3bcf..477db38 100644 --- a/gcc/cgraph.c +++ b/gcc/cgraph.c @@ -2204,6 +2204,22 @@ cgraph_node::dump (FILE *f) } } +/* Dump call graph node to file F in graphviz format. */ + +void +cgraph_node::dump_graphviz (FILE *f) +{ + cgraph_edge *edge; + + for (edge = callees; edge; edge = edge->next_callee) + { + cgraph_node *callee = edge->callee; + + fprintf (f, "\t\"%s\" -> \"%s\"\n", name (), callee->name ()); + } +} + + /* Dump call graph node NODE to stderr. */ DEBUG_FUNCTION void |