summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Fitzgerald <fitzgen@gmail.com>2017-06-20 14:09:58 -0700
committerNick Fitzgerald <fitzgen@gmail.com>2017-06-20 15:35:27 -0700
commit33272cdc36063746645c557c5b43aeefd943e360 (patch)
tree2ef53f384210ef429c805902adec35bb78818556
parent979f5aae9a078a54aec18d4a6cfe38f34322f534 (diff)
Add dotted lines from modules to children in IR visualization
There's a lot of these edges so it helps to make them un-bold.
-rw-r--r--src/ir/dot.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/ir/dot.rs b/src/ir/dot.rs
index 40202b2c..61954c44 100644
--- a/src/ir/dot.rs
+++ b/src/ir/dot.rs
@@ -55,6 +55,15 @@ pub fn write_dot_file<P>(ctx: &BindgenContext, path: P) -> io::Result<()>
if let Some(err) = err {
return err;
}
+
+ if let Some(module) = item.as_module() {
+ for child in module.children() {
+ try!(writeln!(&mut dot_file,
+ "{} -> {} [style=dotted]",
+ item.id().as_usize(),
+ child.as_usize()));
+ }
+ }
}
try!(writeln!(&mut dot_file, "}}"));