diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2017-02-15 13:39:39 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-15 13:39:39 -0800 |
commit | ac4971778b5823f94cbaf0188464790006e407c8 (patch) | |
tree | 3a16170f2a5400d6e0fbbdb7ee9b70f03e054dc6 /src/codegen/mod.rs | |
parent | a10457f4553092e8aa65e1f223185acd21c21ead (diff) | |
parent | da544124a2dcf5183ca0598bb7cce7af8b71b518 (diff) |
Auto merge of #508 - impowski:graphviz_dot, r=fitzgen
Graphviz implementation
This will solve #484 . Right now it's really basic and I will change some of things in future commits like docs and other things.
r? @fitzgen
Diffstat (limited to 'src/codegen/mod.rs')
-rw-r--r-- | src/codegen/mod.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/codegen/mod.rs b/src/codegen/mod.rs index 92e34874..ad6736b0 100644 --- a/src/codegen/mod.rs +++ b/src/codegen/mod.rs @@ -2499,6 +2499,13 @@ pub fn codegen(context: &mut BindgenContext) -> Vec<P<ast::Item>> { } } + if let Some(path) = context.options().emit_ir_graphviz.as_ref() { + match context.emit_ir_graphviz(path.clone()) { + Ok(()) => info!("Your dot file was generated successfully into: {}", path), + Err(e) => error!("{}", e), + } + } + context.resolve_item(context.root_module()) .codegen(context, &mut result, &whitelisted_items, &()); |