| ... | @@ -443,16 +443,16 @@ pub fn updateZirRefs(pt: Zcu.PerThread) Allocator.Error!void { | ... | @@ -443,16 +443,16 @@ pub fn updateZirRefs(pt: Zcu.PerThread) Allocator.Error!void { |
| 443 | { | 443 | { |
| 444 | var it = new_zir.declIterator(tracked_inst.inst); | 444 | var it = new_zir.declIterator(tracked_inst.inst); |
| 445 | while (it.next()) |decl_inst| { | 445 | while (it.next()) |decl_inst| { |
| 446 | const decl_name = old_zir.getDeclaration(decl_inst)[0].name; | 446 | const decl_name = new_zir.getDeclaration(decl_inst)[0].name; |
| 447 | switch (decl_name) { | 447 | switch (decl_name) { |
| 448 | .@"comptime", .@"usingnamespace", .unnamed_test, .decltest => continue, | 448 | .@"comptime", .@"usingnamespace", .unnamed_test, .decltest => continue, |
| 449 | _ => if (decl_name.isNamedTest(old_zir)) continue, | 449 | _ => if (decl_name.isNamedTest(new_zir)) continue, |
| 450 | } | 450 | } |
| 451 | const name_zir = decl_name.toString(old_zir).?; | 451 | const name_zir = decl_name.toString(new_zir).?; |
| 452 | const name_ip = try zcu.intern_pool.getOrPutString( | 452 | const name_ip = try zcu.intern_pool.getOrPutString( |
| 453 | zcu.gpa, | 453 | zcu.gpa, |
| 454 | pt.tid, | 454 | pt.tid, |
| 455 | old_zir.nullTerminatedString(name_zir), | 455 | new_zir.nullTerminatedString(name_zir), |
| 456 | .no_embedded_nulls, | 456 | .no_embedded_nulls, |
| 457 | ); | 457 | ); |
| 458 | if (!old_names.swapRemove(name_ip)) continue; | 458 | if (!old_names.swapRemove(name_ip)) continue; |