cmd/compile: emit DIEs for zero sized variables

Fixes the compiler to emit DIEs for zero sized variables.

Fixes #54615

Change-Id: I1e0c86a97f1abcc7edae516b6a7fe35bcb65ed0f
Reviewed-on: https://go-review.googlesource.com/c/go/+/433479
Reviewed-by: Damien Neil <dneil@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Alessandro Arzilli <alessandro.arzilli@gmail.com>
Reviewed-by: Than McIntosh <thanm@google.com>
This commit is contained in:
Alessandro Arzilli 2022-09-23 17:31:19 +02:00 committed by Than McIntosh
parent 77296e3645
commit e59d873ff9
4 changed files with 71 additions and 0 deletions

View file

@ -38,6 +38,8 @@ type FuncDebug struct {
// Register-resident output parameters for the function. This is filled in at
// SSA generation time.
RegOutputParams []*ir.Name
// Variable declarations that were removed during optimization
OptDcl []*ir.Name
// Filled in by the user. Translates Block and Value ID to PC.
GetPC func(ID, ID) int64