authorgravatar for mlugg@mlugg.co.ukMatthew Lugg <mlugg@mlugg.co.uk> 2024-07-17 00:08:13+01:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2024-07-17 00:08:13+01:00
loge82f7d380013c318bfd5a918cc20d796a3882d6e
treebc3ad0006740ccb445ee06d250f1abae46e5158c
parent20563d84577203891637477b2e475a9b279152ac
parent6bd640c7a0866d7069ed68140afd894c6613e3da
signaturebadge-check Signed by PGP key B5690EEEBB952194

Merge pull request #20653 from mlugg/incremental-fix

Zcu: updateZirRefs typo

2 files changed, 5 insertions(+), 5 deletions(-)

src/Sema.zig+1-1
...@@ -30007,7 +30007,7 @@ const InMemoryCoercionResult = union(enum) {...@@ -30007,7 +30007,7 @@ const InMemoryCoercionResult = union(enum) {
30007 },30007 },
30008 .comptime_int_not_coercible => |int| {30008 .comptime_int_not_coercible => |int| {
30009 try sema.errNote(src, msg, "type '{}' cannot represent value '{}'", .{30009 try sema.errNote(src, msg, "type '{}' cannot represent value '{}'", .{
30010 int.wanted.fmt(pt), int.actual.fmtValue(pt),30010 int.wanted.fmt(pt), int.actual.fmtValueSema(pt, sema),
30011 });30011 });
30012 break;30012 break;
30013 },30013 },
src/Zcu/PerThread.zig+4-4
...@@ -444,16 +444,16 @@ pub fn updateZirRefs(pt: Zcu.PerThread) Allocator.Error!void {...@@ -444,16 +444,16 @@ pub fn updateZirRefs(pt: Zcu.PerThread) Allocator.Error!void {
444 {444 {
445 var it = new_zir.declIterator(tracked_inst.inst);445 var it = new_zir.declIterator(tracked_inst.inst);
446 while (it.next()) |decl_inst| {446 while (it.next()) |decl_inst| {
447 const decl_name = old_zir.getDeclaration(decl_inst)[0].name;447 const decl_name = new_zir.getDeclaration(decl_inst)[0].name;
448 switch (decl_name) {448 switch (decl_name) {
449 .@"comptime", .@"usingnamespace", .unnamed_test, .decltest => continue,449 .@"comptime", .@"usingnamespace", .unnamed_test, .decltest => continue,
450 _ => if (decl_name.isNamedTest(old_zir)) continue,450 _ => if (decl_name.isNamedTest(new_zir)) continue,
451 }451 }
452 const name_zir = decl_name.toString(old_zir).?;452 const name_zir = decl_name.toString(new_zir).?;
453 const name_ip = try zcu.intern_pool.getOrPutString(453 const name_ip = try zcu.intern_pool.getOrPutString(
454 zcu.gpa,454 zcu.gpa,
455 pt.tid,455 pt.tid,
456 old_zir.nullTerminatedString(name_zir),456 new_zir.nullTerminatedString(name_zir),
457 .no_embedded_nulls,457 .no_embedded_nulls,
458 );458 );
459 if (!old_names.swapRemove(name_ip)) continue;459 if (!old_names.swapRemove(name_ip)) continue;