From d56e3c988f0707e996be8eeb7a55f8a90c497a26 Mon Sep 17 00:00:00 2001 From: Veikka Tuominen Date: Sat, 19 Mar 2022 11:40:45 +0200 Subject: [PATCH] stage2: fix inline fn parameter debug info being added to wrong block --- src/Sema.zig | 4 ++-- src/print_air.zig | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Sema.zig b/src/Sema.zig index cab8f91905e1..22243a2833f6 100644 --- a/src/Sema.zig +++ b/src/Sema.zig @@ -4853,14 +4853,14 @@ fn analyzeCall( const param_name = sema.code.nullTerminatedString(extra.data.name); const inst = sema.inst_map.get(param).?; - try sema.addDbgVar(block, inst, .dbg_var_val, param_name); + try sema.addDbgVar(&child_block, inst, .dbg_var_val, param_name); }, .param_anytype, .param_anytype_comptime => { const inst_data = sema.code.instructions.items(.data)[param].str_tok; const param_name = inst_data.get(sema.code); const inst = sema.inst_map.get(param).?; - try sema.addDbgVar(block, inst, .dbg_var_val, param_name); + try sema.addDbgVar(&child_block, inst, .dbg_var_val, param_name); }, else => continue, }; diff --git a/src/print_air.zig b/src/print_air.zig index 294aed9e0797..a9605d5dcf2b 100644 --- a/src/print_air.zig +++ b/src/print_air.zig @@ -386,8 +386,8 @@ const Writer = struct { } fn writeShuffle(w: *Writer, s: anytype, inst: Air.Inst.Index) @TypeOf(s).Error!void { - const pl_op = w.air.instructions.items(.data)[inst].pl_op; - const extra = w.air.extraData(Air.Shuffle, pl_op.payload).data; + const ty_pl = w.air.instructions.items(.data)[inst].ty_pl; + const extra = w.air.extraData(Air.Shuffle, ty_pl.payload).data; try w.writeOperand(s, inst, 0, extra.a); try s.writeAll(", ");