mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile/internal/gc: remove stringsCompare
Inlined the last occurrence of stringsCompare into exprcmp. Passes go build -a -toolexec 'toolstash -cmp' std cmd. Change-Id: I8fd99e3fbffc84283cc269368595cba950533066 Reviewed-on: https://go-review.googlesource.com/14872 Reviewed-by: Dave Cheney <dave@cheney.net> Run-TryBot: Dave Cheney <dave@cheney.net> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
0722a5e718
commit
c73df92be6
3 changed files with 151 additions and 12 deletions
|
|
@ -17,17 +17,6 @@ func atoi(s string) int {
|
|||
return int(n)
|
||||
}
|
||||
|
||||
// strings.Compare, introduced in Go 1.5.
|
||||
func stringsCompare(a, b string) int {
|
||||
if a == b {
|
||||
return 0
|
||||
}
|
||||
if a < b {
|
||||
return -1
|
||||
}
|
||||
return +1
|
||||
}
|
||||
|
||||
var atExitFuncs []func()
|
||||
|
||||
func AtExit(f func()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue