diff options
| author | bors <bors@rust-lang.org> | 2020-10-05 00:35:58 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-10-05 00:35:58 +0000 |
| commit | ced813fec0fb9e883906f18b76d618baf9f5bc08 (patch) | |
| tree | ef72e01fffb47c9763d863ab85b5777504516fef /compiler/rustc_mir/src/util/graphviz.rs | |
| parent | beb5ae474d2835962ebdf7416bd1c9ad864fe101 (diff) | |
| parent | ce8d75714b78864505f815a79cb5c300a1cf0b48 (diff) | |
| download | rust-ced813fec0fb9e883906f18b76d618baf9f5bc08.tar.gz rust-ced813fec0fb9e883906f18b76d618baf9f5bc08.zip | |
Auto merge of #77466 - Aaron1011:reland-drop-tree, r=matthewjasper
Re-land PR #71840 (Rework MIR drop tree lowering) PR https://github.com/rust-lang/rust/pull/71840 was reverted in https://github.com/rust-lang/rust/pull/72989 to fix an LLVM error (https://github.com/rust-lang/rust/issues/72470). That LLVM error no longer occurs with the recent upgrade to LLVM 11 (https://github.com/rust-lang/rust/pull/73526), so let's try re-landing this PR. I've cherry-picked the commits from the original PR (with the exception of the commit blessing test output), making as few modifications as possible. I addressed the rebase fallout in separate commits on top of those. r? `@matthewjasper`
Diffstat (limited to 'compiler/rustc_mir/src/util/graphviz.rs')
| -rw-r--r-- | compiler/rustc_mir/src/util/graphviz.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/compiler/rustc_mir/src/util/graphviz.rs b/compiler/rustc_mir/src/util/graphviz.rs index c10724ad404..857617e546e 100644 --- a/compiler/rustc_mir/src/util/graphviz.rs +++ b/compiler/rustc_mir/src/util/graphviz.rs @@ -111,13 +111,19 @@ 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()), color) + }; 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, + bgcolor = bgcolor )?; init(w)?; |
