ssa: fix llgo:type c for typeparam named

This commit is contained in:
visualfc
2024-09-04 21:50:29 +08:00
parent 3ce9567f62
commit b0ebb479f6
5 changed files with 120 additions and 6 deletions

View File

@@ -125,7 +125,7 @@ func (p *goProgram) extraSize(typ types.Type, ptrSize int64) (ret int64) {
retry:
switch t := typ.(type) {
case *types.Named:
if p.gocvt.typbg[t.String()] == InC {
if v, ok := p.gocvt.typbg.Load(namedLinkname(t)); ok && v.(Background) == InC {
return 0
}
typ = t.Underlying()