mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
ir_print_visitor: Print empty else blocks more compactly
This commit is contained in:
parent
67a9a90794
commit
9710d272f7
1 changed files with 13 additions and 9 deletions
|
|
@ -405,19 +405,23 @@ ir_print_visitor::visit(ir_if *ir)
|
|||
printf(")\n");
|
||||
|
||||
indent();
|
||||
printf("(\n");
|
||||
indentation++;
|
||||
if (!ir->else_instructions.is_empty()) {
|
||||
printf("(\n");
|
||||
indentation++;
|
||||
|
||||
foreach_iter(exec_list_iterator, iter, ir->else_instructions) {
|
||||
ir_instruction *const inst = (ir_instruction *) iter.get();
|
||||
foreach_iter(exec_list_iterator, iter, ir->else_instructions) {
|
||||
ir_instruction *const inst = (ir_instruction *) iter.get();
|
||||
|
||||
indent();
|
||||
inst->accept(this);
|
||||
printf("\n");
|
||||
}
|
||||
indentation--;
|
||||
indent();
|
||||
inst->accept(this);
|
||||
printf("\n");
|
||||
printf("))\n");
|
||||
} else {
|
||||
printf("())\n");
|
||||
}
|
||||
indentation--;
|
||||
indent();
|
||||
printf("))\n");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue