cmd/compile: add and use gc.Node.funcname

Change-Id: If5631eae7e2ad2bef56e79b82f77105246e68773
Reviewed-on: https://go-review.googlesource.com/41494
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Josh Bleecher Snyder 2017-04-23 05:10:21 -07:00
parent d40bb738ff
commit eba396f596
7 changed files with 17 additions and 12 deletions

View file

@ -191,6 +191,11 @@ func (n *Node) mayBeShared() bool {
return false
}
// funcname returns the name of the function n.
func (n *Node) funcname() string {
return n.Func.Nname.Sym.Name
}
// Name holds Node fields used only by named nodes (ONAME, OTYPE, OPACK, OLABEL, some OLITERAL).
type Name struct {
Pack *Node // real package for import . names