mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.inline] cmd/internal/obj: use src.Pos in obj.Prog
This will let us use the src.Pos struct to thread inlining information through to obj. Change-Id: I96a16d3531167396988df66ae70f0b729049cc82 Reviewed-on: https://go-review.googlesource.com/34195 Run-TryBot: David Lazar <lazard@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org> Reviewed-by: Austin Clements <austin@google.com>
This commit is contained in:
parent
4b8895e2dd
commit
ad4efedc6c
6 changed files with 14 additions and 13 deletions
|
|
@ -138,10 +138,10 @@ func funcpctab(ctxt *Link, dst *Pcdata, func_ *LSym, desc string, valfunc func(*
|
|||
// Because p->lineno applies to p, phase == 0 (before p)
|
||||
// takes care of the update.
|
||||
func pctofileline(ctxt *Link, sym *LSym, oldval int32, p *Prog, phase int32, arg interface{}) int32 {
|
||||
if p.As == ATEXT || p.As == ANOP || p.As == AUSEFIELD || p.Lineno == 0 || phase == 1 {
|
||||
if p.As == ATEXT || p.As == ANOP || p.As == AUSEFIELD || p.Lineno.Line() == 0 || phase == 1 {
|
||||
return oldval
|
||||
}
|
||||
f, l := linkgetline(ctxt, p.Lineno)
|
||||
f, l := linkgetline(ctxt, p.Lineno.Line())
|
||||
if f == nil {
|
||||
// print("getline failed for %s %v\n", ctxt->cursym->name, p);
|
||||
return oldval
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue