authorgravatar for mlugg@mlugg.co.ukMatthew Lugg <mlugg@mlugg.co.uk> 2024-07-16 19:35:57+01:00
committergravatar for mlugg@mlugg.co.ukMatthew Lugg <mlugg@mlugg.co.uk> 2024-07-16 19:46:10+01:00
log21cde7ad90a033b775fdf0a5c3477fa289c51ef5
treef232ac7a0f4043575053cb966463602828812f19
parentd8f81372f148ad2ee5aab12cc7ea55562764b3e7
signaturelock-open Commit is signed but in an unrecognized format.

Zcu: updateZirRefs typo


1 files changed, 4 insertions(+), 4 deletions(-)

src/Zcu/PerThread.zig+4-4
...@@ -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;