mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 20:01:14 +01:00
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:
co-authored by
Richard Smith
parent
cb5e9b6555
commit
4ea5ef45dd
@@ -30,19 +30,19 @@ fn Run() -> i32 {
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define i32 @main() #0 !dbg !4 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %F.call = call i32 @_CF.Main.5bd8d5767580997a(i32 0), !dbg !8
|
||||
// CHECK:STDOUT: %F.call = call i32 @_CF.Main.4d6ceefeb7f772f4(i32 0), !dbg !8
|
||||
// CHECK:STDOUT: ret i32 %F.call, !dbg !9
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define linkonce_odr i32 @_CF.Main.5bd8d5767580997a(i32 %y) #0 !dbg !10 {
|
||||
// CHECK:STDOUT: define linkonce_odr i32 @_CF.Main.4d6ceefeb7f772f4(i32 %y) #0 !dbg !10 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %G.call = call i32 @"_CG:enclosed.5bd8d5767580997a"(i32 %y), !dbg !15
|
||||
// CHECK:STDOUT: %G.call = call i32 @"_CG:enclosed.4d6ceefeb7f772f4"(i32 %y), !dbg !15
|
||||
// CHECK:STDOUT: ret i32 %G.call, !dbg !16
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define linkonce_odr i32 @"_CG:enclosed.5bd8d5767580997a"(i32 %x) #0 !dbg !17 {
|
||||
// CHECK:STDOUT: define linkonce_odr i32 @"_CG:enclosed.4d6ceefeb7f772f4"(i32 %x) #0 !dbg !17 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: ret i32 %x, !dbg !20
|
||||
// CHECK:STDOUT: }
|
||||
@@ -62,14 +62,14 @@ fn Run() -> i32 {
|
||||
// CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
|
||||
// CHECK:STDOUT: !8 = !DILocation(line: 23, column: 10, scope: !4)
|
||||
// CHECK:STDOUT: !9 = !DILocation(line: 23, column: 3, scope: !4)
|
||||
// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.5bd8d5767580997a", scope: null, file: !1, line: 17, type: !11, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !13)
|
||||
// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.4d6ceefeb7f772f4", scope: null, file: !1, line: 17, type: !11, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !13)
|
||||
// CHECK:STDOUT: !11 = !DISubroutineType(types: !12)
|
||||
// CHECK:STDOUT: !12 = !{!7, !7}
|
||||
// CHECK:STDOUT: !13 = !{!14}
|
||||
// CHECK:STDOUT: !14 = !DILocalVariable(arg: 1, scope: !10, type: !7)
|
||||
// CHECK:STDOUT: !15 = !DILocation(line: 19, column: 10, scope: !10)
|
||||
// CHECK:STDOUT: !16 = !DILocation(line: 19, column: 3, scope: !10)
|
||||
// CHECK:STDOUT: !17 = distinct !DISubprogram(name: "G", linkageName: "_CG:enclosed.5bd8d5767580997a", scope: null, file: !1, line: 18, type: !11, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !18)
|
||||
// CHECK:STDOUT: !17 = distinct !DISubprogram(name: "G", linkageName: "_CG:enclosed.4d6ceefeb7f772f4", scope: null, file: !1, line: 18, type: !11, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !18)
|
||||
// CHECK:STDOUT: !18 = !{!19}
|
||||
// CHECK:STDOUT: !19 = !DILocalVariable(arg: 1, scope: !17, type: !7)
|
||||
// CHECK:STDOUT: !20 = !DILocation(line: 18, column: 21, scope: !17)
|
||||
|
||||
Reference in New Issue
Block a user