ssa: abiNamed use NameOf

This commit is contained in:
visualfc
2024-11-26 11:09:39 +08:00
parent c2138037d2
commit 8fb0dfad94
2 changed files with 4 additions and 4 deletions

View File

@@ -210,7 +210,7 @@ func (b Builder) abiNamed(t *types.Named) Expr {
size := b.sizeof(tunder)
numMethods, numPtrMethods := b.abiMethods(t)
newNamed := pkg.rtFunc("NewNamed")
expr := b.Call(newNamed, b.Str(t.String()), b.Prog.Val(kind), b.Prog.IntVal(uint64(size), b.Prog.Uintptr()), b.Prog.Val(numMethods), b.Prog.Val(numPtrMethods))
expr := b.Call(newNamed, b.Str(NameOf(t)), b.Prog.Val(kind), b.Prog.IntVal(uint64(size), b.Prog.Uintptr()), b.Prog.Val(numMethods), b.Prog.Val(numPtrMethods))
return expr
}