Don't print Storage{Live,Dead} as comment in debug clif

This commit is contained in:
bjorn3 2018-09-05 20:04:21 +02:00
parent eb6f10fd11
commit 4c0a2ff59b

View File

@ -254,8 +254,13 @@ fn trans_stmt<'a, 'tcx: 'a>(
) {
let _print_guard = PrintOnPanic(|| format!("stmt {:?}", stmt));
let inst = fx.bcx.func.layout.last_inst(cur_ebb).unwrap();
fx.add_comment(inst, format!("{:?}", stmt));
match &stmt.kind {
StatementKind::StorageLive(..) | StatementKind::StorageDead(..) => {} // Those are not very useful
_ => {
let inst = fx.bcx.func.layout.last_inst(cur_ebb).unwrap();
fx.add_comment(inst, format!("{:?}", stmt));
}
}
match &stmt.kind {
StatementKind::SetDiscriminant {