Commit 0d26cdf1 by Ian Lance Taylor

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 the one in 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.
    
    Reviewed-on: https://go-review.googlesource.com/c/147917

From-SVN: r265981
parent 79a2c428
da8c968474690d1e77442ac3361b2302ea8e1f36 559fae430b81595efe151222385192a07a9fc3c3
The first line of this file holds the git revision number of the last The first line of this file holds the git revision number of the last
merge done from the gofrontend repository. merge done from the gofrontend repository.
...@@ -1261,7 +1261,7 @@ func gccgoPkgpathToSymbolNew(ppath string) string { ...@@ -1261,7 +1261,7 @@ func gccgoPkgpathToSymbolNew(ppath string) string {
for _, c := range []byte(ppath) { for _, c := range []byte(ppath) {
switch { switch {
case 'A' <= c && c <= 'Z', 'a' <= c && c <= 'z', case 'A' <= c && c <= 'Z', 'a' <= c && c <= 'z',
'0' <= c && c <= '9', '_' == c: '0' <= c && c <= '9', c == '_', c == '.':
bsl = append(bsl, c) bsl = append(bsl, c)
default: default:
changed = true 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