1
0
mirror of https://github.com/golang/go synced 2024-09-29 13:24:28 -06:00

cmd/link: don't generate typedef DWARF entry for noalg.struct{...}

cmd/compile uses "noalg.struct {...}" as type name when hash and eq
algorithm generation of this struct type is suppressed.
This commit is contained in:
MoZhonghua 2021-12-17 14:45:13 +08:00
parent 529939072e
commit 15de3e4a84

View File

@ -471,6 +471,11 @@ func (d *dwctxt) dotypedef(parent *dwarf.DWDie, name string, def *dwarf.DWDie) *
if strings.HasPrefix(name, "struct {") {
return nil
}
// cmd/compile uses "noalg.struct {...}" as type name when hash and eq algorithm generation of
// this struct type is suppressed.
if strings.HasPrefix(name, "noalg.struct {") {
return nil
}
if strings.HasPrefix(name, "chan ") {
return nil
}