cmd/compile: refactor GOSSAHASH debugging to make it usable outside ssa package.

I've needed this more than once in the past, I hack it in,
then throw it away, seems sensible to make the change and
save it.

Fixes #53937.

Change-Id: I7fe886b1c93d73cbf553bed587f2c30f0f5d5a0b
Reviewed-on: https://go-review.googlesource.com/c/go/+/418015
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
This commit is contained in:
David Chase 2022-06-13 17:53:32 -04:00
parent f19f6c79e4
commit 522f0fc425
4 changed files with 158 additions and 100 deletions

View file

@ -268,13 +268,6 @@ func PkgFuncName(f *Func) string {
s := f.Sym()
pkg := s.Pkg
// TODO(mdempsky): Remove after submitting CL 393715? This matches
// how PkgFuncName has historically handled local functions, but
// drchase points out it contradicts the documentation.
if pkg == types.LocalPkg {
return s.Name
}
return pkg.Path + "." + s.Name
}