diff --git a/src/cmd/compile/internal/ir/mini.go b/src/cmd/compile/internal/ir/mini.go index 98c0ffa5b0..48f5eccf34 100644 --- a/src/cmd/compile/internal/ir/mini.go +++ b/src/cmd/compile/internal/ir/mini.go @@ -3,6 +3,7 @@ // license that can be found in the LICENSE file. //go:generate go run -mod=mod mknode.go +// Note: see comment at top of mknode.go package ir diff --git a/src/cmd/compile/internal/ir/mknode.go b/src/cmd/compile/internal/ir/mknode.go index 5a0aaadf16..af8869d122 100644 --- a/src/cmd/compile/internal/ir/mknode.go +++ b/src/cmd/compile/internal/ir/mknode.go @@ -5,6 +5,12 @@ //go:build ignore // +build ignore +// Note: this program must be run with the GOROOT +// environment variable set to the root of this tree. +// GOROOT=... +// cd $GOROOT/src/cmd/compile/internal/ir +// ../../../../../bin/go run -mod=mod mknode.go + package main import ( @@ -154,6 +160,9 @@ func forNodeFields(named *types.Named, prologue, singleTmpl, sliceTmpl, epilogue } tmpl, what := singleTmpl, types.TypeString(typ, types.RelativeTo(irPkg)) + if what == "go/constant.Value" { + return false + } if implementsNode(typ) { if slice != nil { helper := strings.TrimPrefix(what, "*") + "s"