]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: distinguish args and return values in DWARF
authorHeschi Kreinick <heschi@google.com>
Wed, 18 Oct 2017 17:45:03 +0000 (13:45 -0400)
committerHeschi Kreinick <heschi@google.com>
Wed, 18 Oct 2017 18:46:04 +0000 (18:46 +0000)
commit3ba818c894a1aa1e616a8531a1262d4f9d54f02a
treee2255ed41d1b8bc7834c36ed3bc534c83875b2dc
parent77c041cc68bd6faca7aa86bc2f07acf7c8e48143
cmd/compile: distinguish args and return values in DWARF

Set DW_AT_variable_parameter on DW_TAG_formal_parameters that are
actually return values. variable_parameter is supposed to indicate inout
parameters, but Go doesn't really have those, and DWARF doesn't have
explicit support for multiple return values. This seems to be the best
compromise, especially since the implementation of the two is very
similar -- both are stack slots.

Fixes #21100

Change-Id: Icebabc92b7b397e0aa00a7237478cce84ad1a670
Reviewed-on: https://go-review.googlesource.com/71670
Run-TryBot: Heschi Kreinick <heschi@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
src/cmd/compile/internal/gc/pgen.go
src/cmd/internal/dwarf/dwarf.go