mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/cgo, go/build: finish a cleanup TODO
Removing #cgo directive parsing from cmd/cgo was done in https://golang.org/cl/8610044. Change-Id: Id1bec58c6ec1f932df0ce0ee84ff253655bb73ff Reviewed-on: https://go-review.googlesource.com/2501 Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
583293349b
commit
ee94cd1dff
2 changed files with 0 additions and 17 deletions
|
|
@ -154,20 +154,6 @@ func splitQuoted(s string) (r []string, err error) {
|
|||
return args, err
|
||||
}
|
||||
|
||||
var safeBytes = []byte(`+-.,/0123456789:=ABCDEFGHIJKLMNOPQRSTUVWXYZ\_abcdefghijklmnopqrstuvwxyz`)
|
||||
|
||||
func safeName(s string) bool {
|
||||
if s == "" {
|
||||
return false
|
||||
}
|
||||
for i := 0; i < len(s); i++ {
|
||||
if c := s[i]; c < 0x80 && bytes.IndexByte(safeBytes, c) < 0 {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
// Translate rewrites f.AST, the original Go input, to remove
|
||||
// references to the imported package C, replacing them with
|
||||
// references to the equivalent Go types, functions, and variables.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue