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) {
3000730007 },
3000830008 .comptime_int_not_coercible => |int| {
3000930009 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),
3001130011 });
3001230012 break;
3001330013 },
src/Zcu/PerThread.zig+4-4
......@@ -444,16 +444,16 @@ pub fn updateZirRefs(pt: Zcu.PerThread) Allocator.Error!void {
444444 {
445445 var it = new_zir.declIterator(tracked_inst.inst);
446446 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;
448448 switch (decl_name) {
449449 .@"comptime", .@"usingnamespace", .unnamed_test, .decltest => continue,
450 _ => if (decl_name.isNamedTest(old_zir)) continue,
450 _ => if (decl_name.isNamedTest(new_zir)) continue,
451451 }
452 const name_zir = decl_name.toString(old_zir).?;
452 const name_zir = decl_name.toString(new_zir).?;
453453 const name_ip = try zcu.intern_pool.getOrPutString(
454454 zcu.gpa,
455455 pt.tid,
456 old_zir.nullTerminatedString(name_zir),
456 new_zir.nullTerminatedString(name_zir),
457457 .no_embedded_nulls,
458458 );
459459 if (!old_names.swapRemove(name_ip)) continue;