c := n.Sym().Name[0]
// Avoid reporting "_" parameters, since if there are more than
// one, it can result in a collision later on, as in #23179.
- if unversion(n.Sym().Name) == "_" || c == '.' || n.Type().IsUntyped() {
+ if n.Sym().Name == "_" || c == '.' || n.Type().IsUntyped() {
continue
}
rdcl = append(rdcl, n)
// caller.
synthCount := len(m)
for _, v := range sl {
- canonName := unversion(v.Name)
vp := varPos{
- DeclName: canonName,
+ DeclName: v.Name,
DeclFile: v.DeclFile,
DeclLine: v.DeclLine,
DeclCol: v.DeclCol,
}
- synthesized := strings.HasPrefix(v.Name, "~r") || canonName == "_" || strings.HasPrefix(v.Name, "~b")
+ synthesized := strings.HasPrefix(v.Name, "~") || v.Name == "_"
if idx, found := m[vp]; found {
v.ChildIndex = int32(idx)
v.IsInAbstract = !synthesized
- v.Name = canonName
} else {
// Variable can't be found in the pre-inline dcl list.
// In the top-level case (ii=0) this can happen
base.Ctxt.DwarfAbstractFunc(ifn, fn)
}
-// Undo any versioning performed when a name was written
-// out as part of export data.
-func unversion(name string) string {
- if i := strings.Index(name, "ยท"); i > 0 {
- name = name[:i]
- }
- return name
-}
-
// Given a function that was inlined as part of the compilation, dig
// up the pre-inlining DCL list for the function and create a map that
// supports lookup of pre-inline dcl index, based on variable
for i, n := range dcl {
pos := base.Ctxt.InnermostPos(n.Pos())
vp := varPos{
- DeclName: unversion(n.Sym().Name),
+ DeclName: n.Sym().Name,
DeclFile: pos.RelFilename(),
DeclLine: pos.RelLine(),
DeclCol: pos.RelCol(),