From: Cuong Manh Le Date: Wed, 23 Jun 2021 07:39:44 +0000 (+0700) Subject: [dev.typeparams] cmd/compile: explain why expandInline needed X-Git-Tag: go1.18beta1~1818^2^2~294 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=107b1fce6401b7f5fa12f6e51746a2d0c86b65ca;p=gostls13.git [dev.typeparams] cmd/compile: explain why expandInline needed Change-Id: Ica9817675b4eb929a000640f9ae873b75fc5a2e3 Reviewed-on: https://go-review.googlesource.com/c/go/+/330290 Trust: Cuong Manh Le Run-TryBot: Cuong Manh Le TryBot-Result: Go Bot Reviewed-by: Matthew Dempsky --- diff --git a/src/cmd/compile/internal/noder/reader.go b/src/cmd/compile/internal/noder/reader.go index b106e89892..df9dccc156 100644 --- a/src/cmd/compile/internal/noder/reader.go +++ b/src/cmd/compile/internal/noder/reader.go @@ -1956,8 +1956,9 @@ func (r *reader) inlReturn(ret *ir.ReturnStmt) *ir.BlockStmt { // expandInline reads in an extra copy of IR to populate // fn.Inl.{Dcl,Body}. func expandInline(fn *ir.Func, pri pkgReaderIndex) { - // TODO(mdempsky): Remove this function. It's currently needed for - // dwarfgen for some reason, but we should be able to provide it + // TODO(mdempsky): Remove this function. It's currently needed by + // dwarfgen/dwarf.go:preInliningDcls, which requires fn.Inl.Dcl to + // create abstract function DIEs. But we should be able to provide it // with the same information some other way. fndcls := len(fn.Dcl)