]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/cgo: delete unused code
authorcuiweixie <cuiweixie@gmail.com>
Wed, 28 Sep 2022 13:34:01 +0000 (21:34 +0800)
committerGopher Robot <gobot@golang.org>
Thu, 29 Sep 2022 09:05:04 +0000 (09:05 +0000)
Change-Id: I6007cc6363e22ffa5f9a8f0441a642fd85127397
Reviewed-on: https://go-review.googlesource.com/c/go/+/435945
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>

src/cmd/cgo/util.go

index f2a5cd2b9d8952403e96f84c36d31457729fdcb5..054cd6c5c729e9e9af7593b8dd4e0e42015cc2cc 100644 (file)
@@ -105,19 +105,6 @@ func error_(pos token.Pos, msg string, args ...interface{}) {
        fmt.Fprintf(os.Stderr, "\n")
 }
 
-// isName reports whether s is a valid C identifier
-func isName(s string) bool {
-       for i, v := range s {
-               if v != '_' && (v < 'A' || v > 'Z') && (v < 'a' || v > 'z') && (v < '0' || v > '9') {
-                       return false
-               }
-               if i == 0 && '0' <= v && v <= '9' {
-                       return false
-               }
-       }
-       return s != ""
-}
-
 func creat(name string) *os.File {
        f, err := os.Create(name)
        if err != nil {
@@ -125,10 +112,3 @@ func creat(name string) *os.File {
        }
        return f
 }
-
-func slashToUnderscore(c rune) rune {
-       if c == '/' || c == '\\' || c == ':' {
-               c = '_'
-       }
-       return c
-}