Id CFG graphs by function name
This commit is contained in:
@@ -35,7 +35,7 @@ impl<T: Write> CFGPrinter<T> {
|
|||||||
|
|
||||||
pub fn print(&mut self, func: &Function) -> Result<(), String> {
|
pub fn print(&mut self, func: &Function) -> Result<(), String> {
|
||||||
self.level = 0;
|
self.level = 0;
|
||||||
self.header();
|
self.header(func);
|
||||||
self.push_indent();
|
self.push_indent();
|
||||||
self.ebb_subgraphs(func);
|
self.ebb_subgraphs(func);
|
||||||
let cfg = ControlFlowGraph::new(&func);
|
let cfg = ControlFlowGraph::new(&func);
|
||||||
@@ -87,8 +87,8 @@ impl<T: Write> CFGPrinter<T> {
|
|||||||
self.append("\n");
|
self.append("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
fn header(&mut self) {
|
fn header(&mut self, func: &Function) {
|
||||||
self.append("digraph ");
|
self.append(&format!("digraph {} ", func.name));
|
||||||
self.open_paren();
|
self.open_paren();
|
||||||
self.newline();
|
self.newline();
|
||||||
self.push_indent();
|
self.push_indent();
|
||||||
|
|||||||
Reference in New Issue
Block a user