mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: issue VarDef only for pointer-ful types
Use OpVarDef only when the variable being defined has pointers in it. VarDef markers are only used for liveness analysis, and that only runs on pointer-ful variables. Fixes #53810 Change-Id: I09b0ef7ed31e72528916fe79325f80bbe69ff9b4 Reviewed-on: https://go-review.googlesource.com/c/go/+/419320 Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Joedian Reid <joedian@golang.org> Run-TryBot: Keith Randall <khr@golang.org>
This commit is contained in:
parent
a726c9f662
commit
a74e5f584e
4 changed files with 28 additions and 10 deletions
|
|
@ -72,6 +72,7 @@ func (TestFrontend) StringData(s string) *obj.LSym {
|
|||
}
|
||||
func (TestFrontend) Auto(pos src.XPos, t *types.Type) *ir.Name {
|
||||
n := ir.NewNameAt(pos, &types.Sym{Name: "aFakeAuto"})
|
||||
n.SetType(t)
|
||||
n.Class = ir.PAUTO
|
||||
return n
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue