Skip to content

Commit

Permalink
cmd/compile: remove NameSet.Sorted
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
cuonglm authored and gopherbot committed Sep 4, 2024
1 parent e7047bd commit d6d5d8c
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions src/cmd/compile/internal/ir/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ package ir
import (
"fmt"
"go/constant"
"sort"

"cmd/compile/internal/base"
"cmd/compile/internal/types"
Expand Down Expand Up @@ -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 (
Expand Down

0 comments on commit d6d5d8c

Please sign in to comment.