Skip to content

Commit be2fd61

Browse files
committed
Fix InlineAsmOperand expresions being visited twice during liveness checking
1 parent 215f2d3 commit be2fd61

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/librustc_passes/liveness.rs

+2-8
Original file line numberDiff line numberDiff line change
@@ -1460,26 +1460,20 @@ fn check_expr<'tcx>(this: &mut Liveness<'_, 'tcx>, expr: &'tcx Expr<'tcx>) {
14601460
hir::ExprKind::InlineAsm(ref asm) => {
14611461
for op in asm.operands {
14621462
match op {
1463-
hir::InlineAsmOperand::In { expr, .. }
1464-
| hir::InlineAsmOperand::Const { expr, .. }
1465-
| hir::InlineAsmOperand::Sym { expr, .. } => this.visit_expr(expr),
14661463
hir::InlineAsmOperand::Out { expr, .. } => {
14671464
if let Some(expr) = expr {
14681465
this.check_place(expr);
1469-
this.visit_expr(expr);
14701466
}
14711467
}
14721468
hir::InlineAsmOperand::InOut { expr, .. } => {
14731469
this.check_place(expr);
1474-
this.visit_expr(expr);
14751470
}
1476-
hir::InlineAsmOperand::SplitInOut { in_expr, out_expr, .. } => {
1477-
this.visit_expr(in_expr);
1471+
hir::InlineAsmOperand::SplitInOut { out_expr, .. } => {
14781472
if let Some(out_expr) = out_expr {
14791473
this.check_place(out_expr);
1480-
this.visit_expr(out_expr);
14811474
}
14821475
}
1476+
_ => {}
14831477
}
14841478
}
14851479
}

0 commit comments

Comments
 (0)