cmd/compile: thread Curfn through to debuginfo

Updates #15756

Change-Id: I860dd45cae9d851c7844654621bbc99efe7c7f03
Reviewed-on: https://go-review.googlesource.com/38591
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
Josh Bleecher Snyder 2017-03-23 16:39:04 -07:00
parent 3a1ce1085a
commit 6652572b75
5 changed files with 16 additions and 12 deletions

View file

@ -12,6 +12,7 @@ import (
type Plist struct {
Firstpc *Prog
Curfn interface{} // holds a *gc.Node, if non-nil
}
func Flushplist(ctxt *Link, plist *Plist) {
@ -127,7 +128,7 @@ func flushplist(ctxt *Link, plist *Plist, freeProgs bool) {
ctxt.Arch.Preprocess(ctxt, s)
ctxt.Arch.Assemble(ctxt, s)
linkpcln(ctxt, s)
makeFuncDebugEntry(ctxt, s)
makeFuncDebugEntry(ctxt, plist.Curfn, s)
if freeProgs {
s.Text = nil
}