mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: drop internal range-over-func vars from DWARF output
Drops internal range-over-func variables from the DWARF output (excluding #yield which is used by Delve). Fixes #68238 Change-Id: Ic035e37ca3560347276cdc3b469fd564da33f4f5 Reviewed-on: https://go-review.googlesource.com/c/go/+/594257 Reviewed-by: Than McIntosh <thanm@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com> Auto-Submit: Hyang-Ah Hana Kim <hyangah@gmail.com>
This commit is contained in:
parent
773767def0
commit
82c371a307
3 changed files with 33 additions and 5 deletions
|
|
@ -91,6 +91,9 @@ func Info(fnsym *obj.LSym, infosym *obj.LSym, curfn obj.Func) (scopes []dwarf.Sc
|
|||
default:
|
||||
continue
|
||||
}
|
||||
if !ssa.IsVarWantedForDebug(n) {
|
||||
continue
|
||||
}
|
||||
apdecls = append(apdecls, n)
|
||||
if n.Type().Kind() == types.TSSA {
|
||||
// Can happen for TypeInt128 types. This only happens for
|
||||
|
|
@ -194,6 +197,9 @@ func createDwarfVars(fnsym *obj.LSym, complexOK bool, fn *ir.Func, apDecls []*ir
|
|||
// DWARF-gen. See issue 48573 for more details.
|
||||
debugInfo := fn.DebugInfo.(*ssa.FuncDebug)
|
||||
for _, n := range debugInfo.RegOutputParams {
|
||||
if !ssa.IsVarWantedForDebug(n) {
|
||||
continue
|
||||
}
|
||||
if n.Class != ir.PPARAMOUT || !n.IsOutputParamInRegisters() {
|
||||
panic("invalid ir.Name on debugInfo.RegOutputParams list")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue