Skip to content

Commit e41a7c5

Browse files
committed
Temp: Cleanup 5 (colors)
1 parent a6bec9d commit e41a7c5

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/librustc_mir/util/graphviz.rs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,17 @@ where
9797
write!(w, r#"<table border="0" cellborder="1" cellspacing="0">"#)?;
9898

9999
// Basic block number at the top.
100+
let (blk, color) = if data.is_cleanup {
101+
(format!("{} (cleanup)", block.index()), "lightblue")
102+
} else {
103+
(format!("{}", block.index()), "gray")
104+
};
100105
write!(
101106
w,
102-
r#"<tr><td {attrs} colspan="{colspan}">{blk}</td></tr>"#,
103-
attrs = r#"bgcolor="gray" align="center""#,
107+
r#"<tr><td bgcolor="{color}" align="center" colspan="{colspan}">{blk}</td></tr>"#,
104108
colspan = num_cols,
105-
blk = block.index()
109+
blk = blk,
110+
color = color
106111
)?;
107112

108113
init(w)?;

0 commit comments

Comments
 (0)