mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/internal/obj, cmd/compile: rip off some toolstash bandaids
Change-Id: I402383e893223facae451adbd640113126d5edd9 Reviewed-on: https://go-review.googlesource.com/37873 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
9cb2ee0ff2
commit
1874d4a883
2 changed files with 1 additions and 13 deletions
|
|
@ -595,13 +595,7 @@ func gendwarf(ctxt *Link, text []*LSym) []*LSym {
|
|||
})
|
||||
}
|
||||
|
||||
// We want to sort variables by offset, breaking ties
|
||||
// with declaration order. Autom holds variables in
|
||||
// reverse declaration order, so we reverse the
|
||||
// assembled slice and then apply a stable sort.
|
||||
for i, j := 0, len(vars)-1; i < j; i, j = i+1, j-1 {
|
||||
vars[i], vars[j] = vars[j], vars[i]
|
||||
}
|
||||
// Stable sort so that ties are broken with declaration order.
|
||||
sort.Stable(dwarf.VarsByOffset(vars))
|
||||
|
||||
dwarf.PutFunc(dctxt, dsym, s.Name, s.Version == 0, s, s.Size, vars)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue