Skip to content

Commit

Permalink
Fixed formatter for branch opcodes
Browse files Browse the repository at this point in the history
  • Loading branch information
jjcnn committed Sep 20, 2023
1 parent 62598b1 commit 8bf5c3b
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions hir/src/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,21 +178,13 @@ fn write_operands(w: &mut dyn Write, dfg: &DataFlowGraph, inst: Inst) -> fmt::Re
write_block_args(w, else_dest.1.as_slice(pool))
}
Instruction::Br(Br {
op,
destination,
args,
..
}) if *op == Opcode::Br => {
}) => {
write!(w, " {}", destination)?;
write_block_args(w, args.as_slice(pool))
}
Instruction::Br(Br {
destination, args, ..
}) => {
let args = args.as_slice(pool);
write!(w, " {}, {}", args[0], destination)?;
write_block_args(w, &args[1..])
}
Instruction::Switch(Switch {
arg, arms, default, ..
}) => {
Expand Down

0 comments on commit 8bf5c3b

Please sign in to comment.