cmd/compile: use SetInit instead of *PtrInit

Change-Id: Ie802ff27b611ed248d7b14f6e972e6300c181f43
Reviewed-on: https://go-review.googlesource.com/c/go/+/358316
Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Trust: Dan Scales <danscales@google.com>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dan Scales <danscales@google.com>
This commit is contained in:
wdvxdr 2021-10-25 18:15:43 +08:00 committed by Dan Scales
parent bc0eb5789e
commit 95372efc4d
4 changed files with 6 additions and 6 deletions

View file

@ -1259,7 +1259,7 @@ func (subst *inlsubst) node(n ir.Node) ir.Node {
n := n.(*ir.BranchStmt)
m := ir.Copy(n).(*ir.BranchStmt)
m.SetPos(subst.updatedPos(m.Pos()))
*m.PtrInit() = nil
m.SetInit(nil)
m.Label = translateLabel(n.Label)
return m
@ -1271,7 +1271,7 @@ func (subst *inlsubst) node(n ir.Node) ir.Node {
n := n.(*ir.LabelStmt)
m := ir.Copy(n).(*ir.LabelStmt)
m.SetPos(subst.updatedPos(m.Pos()))
*m.PtrInit() = nil
m.SetInit(nil)
m.Label = translateLabel(n.Label)
return m