Skip ImplWitnessTable::elements_id when generating fingerprints (#7629)

Implementing interface modifiers causes an infinite loop when generating
fingerprints because the witness value generates a fingerprint that's
dependent on something dependent on the witness value. We've debugged
this to the witness table's `elements_id` field.

This hack is a workaround for creating a new block type whose value is
not codependent with its identity.

Co-authored-by: Richard Smith <richard@metafoo.co.uk>

Co-authored-by: Richard Smith <richard@metafoo.co.uk>
This commit is contained in:
Christopher Di Bella
2026-08-11 22:39:30 +00:00
committed by GitHub
co-authored by Richard Smith
parent cb5e9b6555
commit 4ea5ef45dd
368 changed files with 11718 additions and 11723 deletions
@@ -38,7 +38,7 @@ fn CallF() -> i32 {
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %n.var), !dbg !9
// CHECK:STDOUT: store i32 0, ptr %n.var, align 4, !dbg !9
// CHECK:STDOUT: %.loc22_14 = load i32, ptr %n.var, align 4, !dbg !10
// CHECK:STDOUT: %C.F.call = call i32 @_CF.C.Main.5bd8d5767580997a(ptr %c.var, i32 %.loc22_14), !dbg !11
// CHECK:STDOUT: %C.F.call = call i32 @_CF.C.Main.4d6ceefeb7f772f4(ptr %c.var, i32 %.loc22_14), !dbg !11
// CHECK:STDOUT: call void @"_COp.5e27612b9dd31a14:core.Destroy.Core"(ptr %n.var), !dbg !9
// CHECK:STDOUT: call void @"_COp.807eb4f2d3ed7e54:core.Destroy.Core"(ptr %c.var), !dbg !8
// CHECK:STDOUT: ret i32 %C.F.call, !dbg !12
@@ -63,7 +63,7 @@ fn CallF() -> i32 {
// CHECK:STDOUT: declare void @llvm.memcpy.p0.p0.i64(ptr noalias writeonly captures(none), ptr noalias readonly captures(none), i64, i1 immarg) #1
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define linkonce_odr i32 @_CF.C.Main.5bd8d5767580997a(ptr %self, i32 %x) #0 !dbg !26 {
// CHECK:STDOUT: define linkonce_odr i32 @_CF.C.Main.4d6ceefeb7f772f4(ptr %self, i32 %x) #0 !dbg !26 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: ret i32 %x, !dbg !32
// CHECK:STDOUT: }
@@ -103,7 +103,7 @@ fn CallF() -> i32 {
// CHECK:STDOUT: !23 = !{!24}
// CHECK:STDOUT: !24 = !DILocalVariable(arg: 1, scope: !19, type: !22)
// CHECK:STDOUT: !25 = !DILocation(line: 20, column: 3, scope: !19)
// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "F", linkageName: "_CF.C.Main.5bd8d5767580997a", scope: null, file: !1, line: 14, type: !27, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !29)
// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "F", linkageName: "_CF.C.Main.4d6ceefeb7f772f4", scope: null, file: !1, line: 14, type: !27, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !29)
// CHECK:STDOUT: !27 = !DISubroutineType(types: !28)
// CHECK:STDOUT: !28 = !{!7, !22, !7}
// CHECK:STDOUT: !29 = !{!30, !31}