Instead of skipping them based on string matching much later in the
compilation process, skip them up front using the proper API.
Passes toolstash-check.
Change-Id: Ibd4c0448a0701ba0de3235d4689ef300235fa1d9
Reviewed-on: https://go-review.googlesource.com/37930
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Gotype: gotype,
})
+ if n.IsAutoTmp() {
+ continue
+ }
+
typename := dwarf.InfoPrefix + gotype.Name[len("type."):]
vars = append(vars, &dwarf.Var{
Name: n.Sym.Name,
// this package contains the shared code.
package dwarf
-import (
- "fmt"
- "strings"
-)
+import "fmt"
// InfoPrefix is the prefix for all the symbols containing DWARF info entries.
const InfoPrefix = "go.info."
putattr(ctxt, s, DW_ABRV_FUNCTION, DW_FORM_flag, DW_CLS_FLAG, ev, 0)
names := make(map[string]bool)
for _, v := range vars {
- if strings.Contains(v.Name, ".autotmp_") {
- continue
- }
var n string
if names[v.Name] {
n = fmt.Sprintf("%s#%d", v.Name, len(names))