We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3389890 commit 0648177Copy full SHA for 0648177
src/AstGen.zig
@@ -3071,6 +3071,19 @@ fn emitDbgNode(gz: *GenZir, node: Ast.Node.Index) !void {
3071
const line = astgen.source_line - gz.decl_line;
3072
const column = astgen.source_column;
3073
3074
+ if (gz.instructions.items.len > 0) {
3075
+ const last = gz.instructions.items[gz.instructions.items.len - 1];
3076
+ const zir_tags = astgen.instructions.items(.tag);
3077
+ if (zir_tags[last] == .dbg_stmt) {
3078
+ const zir_datas = astgen.instructions.items(.data);
3079
+ zir_datas[last].dbg_stmt = .{
3080
+ .line = line,
3081
+ .column = column,
3082
+ };
3083
+ return;
3084
+ }
3085
3086
+
3087
_ = try gz.add(.{ .tag = .dbg_stmt, .data = .{
3088
.dbg_stmt = .{
3089
.line = line,
0 commit comments