diff options
| author | Matthew Jasper <mjjasper1@gmail.com> | 2019-11-16 13:23:31 +0000 |
|---|---|---|
| committer | Aaron Hill <aa1ronham@gmail.com> | 2020-10-04 07:54:01 -0400 |
| commit | fa3e2fcbe4bb6c878d137eb427fc34daf49b8c69 (patch) | |
| tree | bc88bfa53c74fb287b3b5d513cfbcf1a6b278434 /compiler/rustc_mir/src | |
| parent | 0d37dca25a51fb900a402c94c8818ad1c2789e30 (diff) | |
| download | rust-fa3e2fcbe4bb6c878d137eb427fc34daf49b8c69.tar.gz rust-fa3e2fcbe4bb6c878d137eb427fc34daf49b8c69.zip | |
Defer creating drop trees in MIR lowering until leaving that scope
Diffstat (limited to 'compiler/rustc_mir/src')
| -rw-r--r-- | compiler/rustc_mir/src/util/graphviz.rs | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/compiler/rustc_mir/src/util/graphviz.rs b/compiler/rustc_mir/src/util/graphviz.rs index 4511962d68f..cdabc70d72e 100644 --- a/compiler/rustc_mir/src/util/graphviz.rs +++ b/compiler/rustc_mir/src/util/graphviz.rs @@ -111,13 +111,24 @@ where write!(w, r#"<table border="0" cellborder="1" cellspacing="0">"#)?; // Basic block number at the top. + let (blk, bgcolor) = if data.is_cleanup { + (format!("{} (cleanup)", block.index()), "lightblue") + } else { + let color = if dark_mode { + "dimgray" + } else { + "gray" + }; + (format!("{}", block.index()), "gray") + }; write!( w, r#"<tr><td bgcolor="{bgcolor}" {attrs} colspan="{colspan}">{blk}</td></tr>"#, bgcolor = if dark_mode { "dimgray" } else { "gray" }, attrs = r#"align="center""#, colspan = num_cols, - blk = block.index() + blk = blk, + color = color )?; init(w)?; |
