]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: remove NameSet.Sorted
authorCuong Manh Le <cuong.manhle.vn@gmail.com>
Wed, 4 Sep 2024 17:38:06 +0000 (00:38 +0700)
committerGopher Robot <gobot@golang.org>
Wed, 4 Sep 2024 20:29:15 +0000 (20:29 +0000)
The only usage of it was removed in CL 517617

Change-Id: If1898b7cde4f8c7ab906a2c27a01125415b463c3
Reviewed-on: https://go-review.googlesource.com/c/go/+/610600
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

src/cmd/compile/internal/ir/node.go

index acdd47d219d7101e4d0585d43b2ced9798c43726..4f5ad53d632f5b4b5de89cdd224a60c7c6987410 100644 (file)
@@ -9,7 +9,6 @@ package ir
 import (
        "fmt"
        "go/constant"
-       "sort"
 
        "cmd/compile/internal/base"
        "cmd/compile/internal/types"
@@ -429,16 +428,6 @@ func (s *NameSet) Add(n *Name) {
        (*s)[n] = struct{}{}
 }
 
-// Sorted returns s sorted according to less.
-func (s NameSet) Sorted(less func(*Name, *Name) bool) []*Name {
-       var res []*Name
-       for n := range s {
-               res = append(res, n)
-       }
-       sort.Slice(res, func(i, j int) bool { return less(res[i], res[j]) })
-       return res
-}
-
 type PragmaFlag uint16
 
 const (