1
0
mirror of https://github.com/golang/go synced 2024-11-26 09:18:07 -07:00

[dev.typeparams] cmd/internal/dwarf: remove putInlinedFunc's callersym param

This parameter is only used for debugging, and all of putInlinedFunc's
callers were actually passing the callee symbol instead.

Change-Id: I964825a514cc42a1b0bcbce4ef11a1a47084d882
Reviewed-on: https://go-review.googlesource.com/c/go/+/332370
Trust: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
This commit is contained in:
Matthew Dempsky 2021-07-01 11:44:43 -07:00
parent 9ba294e15b
commit 838079beef

View File

@ -1266,7 +1266,7 @@ func PutAbstractFunc(ctxt Context, s *FnState) error {
// its corresponding 'abstract' DIE (containing location-independent // its corresponding 'abstract' DIE (containing location-independent
// attributes such as name, type, etc). Inlined subroutine DIEs can // attributes such as name, type, etc). Inlined subroutine DIEs can
// have other inlined subroutine DIEs as children. // have other inlined subroutine DIEs as children.
func putInlinedFunc(ctxt Context, s *FnState, callersym Sym, callIdx int) error { func putInlinedFunc(ctxt Context, s *FnState, callIdx int) error {
ic := s.InlCalls.Calls[callIdx] ic := s.InlCalls.Calls[callIdx]
callee := ic.AbsFunSym callee := ic.AbsFunSym
@ -1277,7 +1277,7 @@ func putInlinedFunc(ctxt Context, s *FnState, callersym Sym, callIdx int) error
Uleb128put(ctxt, s.Info, int64(abbrev)) Uleb128put(ctxt, s.Info, int64(abbrev))
if logDwarf { if logDwarf {
ctxt.Logf("putInlinedFunc(caller=%v,callee=%v,abbrev=%d)\n", callersym, callee, abbrev) ctxt.Logf("putInlinedFunc(callee=%v,abbrev=%d)\n", callee, abbrev)
} }
// Abstract origin. // Abstract origin.
@ -1312,8 +1312,7 @@ func putInlinedFunc(ctxt Context, s *FnState, callersym Sym, callIdx int) error
// Children of this inline. // Children of this inline.
for _, sib := range inlChildren(callIdx, &s.InlCalls) { for _, sib := range inlChildren(callIdx, &s.InlCalls) {
absfn := s.InlCalls.Calls[sib].AbsFunSym err := putInlinedFunc(ctxt, s, sib)
err := putInlinedFunc(ctxt, s, absfn, sib)
if err != nil { if err != nil {
return err return err
} }
@ -1354,8 +1353,7 @@ func PutConcreteFunc(ctxt Context, s *FnState) error {
// Inlined subroutines. // Inlined subroutines.
for _, sib := range inlChildren(-1, &s.InlCalls) { for _, sib := range inlChildren(-1, &s.InlCalls) {
absfn := s.InlCalls.Calls[sib].AbsFunSym err := putInlinedFunc(ctxt, s, sib)
err := putInlinedFunc(ctxt, s, absfn, sib)
if err != nil { if err != nil {
return err return err
} }
@ -1402,8 +1400,7 @@ func PutDefaultFunc(ctxt Context, s *FnState) error {
// Inlined subroutines. // Inlined subroutines.
for _, sib := range inlChildren(-1, &s.InlCalls) { for _, sib := range inlChildren(-1, &s.InlCalls) {
absfn := s.InlCalls.Calls[sib].AbsFunSym err := putInlinedFunc(ctxt, s, sib)
err := putInlinedFunc(ctxt, s, absfn, sib)
if err != nil { if err != nil {
return err return err
} }