copyExpr just calls copyExpr1 with "clear" is false, so make it return
*ir.Name directly instead of ir.Node
Passes toolstash -cmp.
Change-Id: I31ca1d88d9eaf8ac37517022f1c74285ffce07d3
Reviewed-on: https://go-review.googlesource.com/c/go/+/280714
Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
// copyExpr behaves like newTemp but also emits
// code to initialize the temporary to the value n.
-func (o *orderState) copyExpr(n ir.Node) ir.Node {
+func (o *orderState) copyExpr(n ir.Node) *ir.Name {
return o.copyExpr1(n, false)
}
x := o.copyExpr(arg.X)
arg.X = x
x.Name().SetAddrtaken(true) // ensure SSA keeps the x variable
- n.KeepAlive = append(n.KeepAlive, x.(*ir.Name))
+ n.KeepAlive = append(n.KeepAlive, x)
}
}
}