1
0
mirror of https://github.com/golang/go synced 2024-11-20 10:24:40 -07:00

cmd/compile: mark go.itab.* symbols local earlier

This feels a bit like a layering violation, but as the bug report shows
it is sometimes necessary.

Fixes #17642

Change-Id: I4ba060bb1ce73a527ce276e5a769c44692b50016
Reviewed-on: https://go-review.googlesource.com/32236
Run-TryBot: Michael Hudson-Doyle <michael.hudson@canonical.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Crawshaw <crawshaw@golang.org>
This commit is contained in:
Michael Hudson-Doyle 2016-10-28 15:08:28 +13:00
parent d0e408334b
commit 4e584c5203

View File

@ -979,6 +979,7 @@ func itabname(t, itype *Type) *Node {
Fatalf("itabname(%v, %v)", t, itype)
}
s := Pkglookup(t.tconv(FmtLeft)+","+itype.tconv(FmtLeft), itabpkg)
Linksym(s).Set(obj.AttrLocal, true)
if s.Def == nil {
n := newname(s)
n.Type = Types[TUINT8]