mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-03-08 02:44:43 +01:00
print_air: print cond_br branch hints
This commit is contained in:
parent
a3d622bdd6
commit
43dc8db068
1 changed files with 10 additions and 2 deletions
|
|
@ -791,7 +791,11 @@ const Writer = struct {
|
|||
|
||||
try w.writeOperand(s, inst, 0, pl_op.operand);
|
||||
if (w.skip_body) return s.writeAll(", ...");
|
||||
try s.writeAll(", {\n");
|
||||
try s.writeAll(",");
|
||||
if (extra.data.branch_hints.true != .none) {
|
||||
try s.print(" {s}", .{@tagName(extra.data.branch_hints.true)});
|
||||
}
|
||||
try s.writeAll(" {\n");
|
||||
const old_indent = w.indent;
|
||||
w.indent += 2;
|
||||
|
||||
|
|
@ -806,7 +810,11 @@ const Writer = struct {
|
|||
|
||||
try w.writeBody(s, then_body);
|
||||
try s.writeByteNTimes(' ', old_indent);
|
||||
try s.writeAll("}, {\n");
|
||||
try s.writeAll("},");
|
||||
if (extra.data.branch_hints.false != .none) {
|
||||
try s.print(" {s}", .{@tagName(extra.data.branch_hints.false)});
|
||||
}
|
||||
try s.writeAll(" {\n");
|
||||
|
||||
if (liveness_condbr.else_deaths.len != 0) {
|
||||
try s.writeByteNTimes(' ', w.indent);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue