compiler: canonicalize generic instance identities

x/tools SSA names and go/types strings can preserve the source spelling of
type arguments, so aliases can make distinct instances collide. Use the
canonical type encoding for function names, synthetic local type owners,
instantiated named types, and method sets.
This commit is contained in:
Jake Bailey
2026-07-12 14:12:54 -07:00
committed by Ron Evans
parent 73db9776b1
commit c7923d1c64
5 changed files with 51 additions and 46 deletions
+2 -2
View File
@@ -50,12 +50,12 @@ entry:
; Function Attrs: nounwind
define hidden void @main.useGeneric(ptr %context) unnamed_addr #1 {
entry:
call void @"main.noinlineGenericFunc[int8]"(ptr undef)
call void @"main.noinlineGenericFunc[basic:int8]"(ptr undef)
ret void
}
; Function Attrs: noinline nounwind
define linkonce_odr hidden void @"main.noinlineGenericFunc[int8]"(ptr %context) unnamed_addr #4 {
define linkonce_odr hidden void @"main.noinlineGenericFunc[basic:int8]"(ptr %context) unnamed_addr #4 {
entry:
ret void
}