Don't include the library name in most fingerprints. (#7292)

When we import from another library in the same package, its entities
end up with our library as their parent scope, resulting in cross-file
fingerprint mismatches. Instead, only include the library ID when
fingerprinting either a package-private entity or an `ImportIRId` that
refers to a particular `SemIR::File`.
This commit is contained in:
Richard Smith
2026-06-02 19:31:30 +00:00
committed by GitHub
parent e7ed217d4e
commit f5e9c61f11
640 changed files with 50114 additions and 49559 deletions
+3 -3
View File
@@ -36,12 +36,12 @@ fn F() -> i32 {
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %n.var), !dbg !16
// CHECK:STDOUT: store i32 0, ptr %n.var, align 4, !dbg !16
// CHECK:STDOUT: %G.call = call i32 @_CG.Main(ptr %n.var), !dbg !17
// CHECK:STDOUT: call void @"_COp.94e3ca86614aba5d:core.Destroy.Core"(ptr %n.var), !dbg !16
// CHECK:STDOUT: call void @"_COp.1fa36cd3e044ac37:core.Destroy.Core"(ptr %n.var), !dbg !16
// CHECK:STDOUT: ret i32 %G.call, !dbg !18
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define weak_odr void @"_COp.94e3ca86614aba5d:core.Destroy.Core"(ptr %self) #0 !dbg !19 {
// CHECK:STDOUT: define weak_odr void @"_COp.1fa36cd3e044ac37:core.Destroy.Core"(ptr %self) #0 !dbg !19 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: ret void, !dbg !24
// CHECK:STDOUT: }
@@ -74,7 +74,7 @@ fn F() -> i32 {
// CHECK:STDOUT: !16 = !DILocation(line: 18, column: 3, scope: !13)
// CHECK:STDOUT: !17 = !DILocation(line: 19, column: 10, scope: !13)
// CHECK:STDOUT: !18 = !DILocation(line: 19, column: 3, scope: !13)
// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "Op", linkageName: "_COp.94e3ca86614aba5d:core.Destroy.Core", scope: null, file: !3, line: 18, type: !20, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !22)
// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "Op", linkageName: "_COp.1fa36cd3e044ac37:core.Destroy.Core", scope: null, file: !3, line: 18, type: !20, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !22)
// CHECK:STDOUT: !20 = !DISubroutineType(types: !21)
// CHECK:STDOUT: !21 = !{null, !7}
// CHECK:STDOUT: !22 = !{!23}