mirror of
https://github.com/golang/go
synced 2024-11-23 15:10:12 -07:00
cmd/compile: unify a Linksym call in dcommontype
Passes toolstash-check. Change-Id: I9940909949da58e780696e6de0c21f95be7a8816 Reviewed-on: https://go-review.googlesource.com/41407 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
parent
ad4b5f28ce
commit
0d1e903c8a
@ -793,13 +793,13 @@ func dcommontype(lsym *obj.LSym, ot int, t *types.Type) int {
|
||||
}
|
||||
|
||||
sptrWeak := true
|
||||
var sptr *types.Sym
|
||||
var sptr *obj.LSym
|
||||
if !t.IsPtr() || t.PtrBase != nil {
|
||||
tptr := types.NewPtr(t)
|
||||
if t.Sym != nil || methods(tptr) != nil {
|
||||
sptrWeak = false
|
||||
}
|
||||
sptr = dtypesym(tptr)
|
||||
sptr = dtypesym(tptr).Linksym()
|
||||
}
|
||||
|
||||
gcsym, useGCProg, ptrdata := dgcsym(t)
|
||||
@ -888,9 +888,9 @@ func dcommontype(lsym *obj.LSym, ot int, t *types.Type) int {
|
||||
if sptr == nil {
|
||||
ot = duint32(lsym, ot, 0)
|
||||
} else if sptrWeak {
|
||||
ot = dsymptrWeakOff(lsym, ot, sptr.Linksym())
|
||||
ot = dsymptrWeakOff(lsym, ot, sptr)
|
||||
} else {
|
||||
ot = dsymptrOff(lsym, ot, sptr.Linksym(), 0)
|
||||
ot = dsymptrOff(lsym, ot, sptr, 0)
|
||||
}
|
||||
|
||||
return ot
|
||||
|
Loading…
Reference in New Issue
Block a user