[dev.regabi] cmd/compile: use *ir.Name for Decl.X

Passes toolstash -cmp.

Change-Id: I505577d067eda3512f6d78618fc0eff061a71e3c
Reviewed-on: https://go-review.googlesource.com/c/go/+/280732
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>
This commit is contained in:
Cuong Manh Le 2020-12-30 02:46:25 +07:00
parent 9958b7ed3e
commit 82ab3d1448
10 changed files with 21 additions and 17 deletions

View file

@ -176,7 +176,7 @@ func walkStmtList(s []ir.Node) {
// walkDecl walks an ODCL node.
func walkDecl(n *ir.Decl) ir.Node {
v := n.X.(*ir.Name)
v := n.X
if v.Class_ == ir.PAUTOHEAP {
if base.Flag.CompilingRuntime {
base.Errorf("%v escapes to heap, not allowed in runtime", v)