]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: fix missing source information in ssa view
authorhopehook <hopehook@qq.com>
Fri, 8 Apr 2022 09:59:05 +0000 (17:59 +0800)
committerGopher Robot <gobot@golang.org>
Mon, 18 Apr 2022 18:43:21 +0000 (18:43 +0000)
commit3df9df8d6a1a140239e4cba0d0595bdab2ba9c60
tree2b132166fea32a3300e23d2d71bb52f513bbc98e
parent91b9915d3f6f8cd2e9e9fda63f67772803adfa03
cmd/compile: fix missing source information in ssa view

Endlineno is lost when we call "genericSubst" to create the new
instantiation of the generic function. This will cause "readFuncLines"
to fail to read the target function.

To fix this issue, as @mdempsky pointed out, add the line in
cmd/compile/internal/noder/stencil.go:
    newf.Endlineno = gf.Endlineno

Fixes #51988

Change-Id: Ib408e4ed0ceb68df8dedda4fb551309e8385aada
Reviewed-on: https://go-review.googlesource.com/c/go/+/399057
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Auto-Submit: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
src/cmd/compile/internal/noder/stencil.go
src/runtime/callers_test.go