Commit 43edf21e authored by Than McIntosh's avatar Than McIntosh

cmd/cgo: fix typo in gccgo name mangling recipe

The code to implement new-style gccgo name mangling had a recipe that
didn't quite match that of the compiler (incorrect handling for '.').
This showed up as a failure in the gotools cgo test if the directory
containing the test run included a "." character.

[This is a copy of https://golang.org/cl/147917].

Change-Id: Ia94728ecead879c8d223eb6cee6c102a8af1c86e
Reviewed-on: https://go-review.googlesource.com/c/147937Reviewed-by: 's avatarCherry Zhang <cherryyz@google.com>
parent 8f7173dc
......@@ -1271,7 +1271,7 @@ func gccgoPkgpathToSymbolNew(ppath string) string {
for _, c := range []byte(ppath) {
switch {
case 'A' <= c && c <= 'Z', 'a' <= c && c <= 'z',
'0' <= c && c <= '9', '_' == c:
'0' <= c && c <= '9', c == '_', c == '.':
bsl = append(bsl, c)
default:
changed = true
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment