mirror of
https://github.com/golang/go
synced 2024-11-19 03:04:42 -07:00
cmd/compile: use *byte for pointer to string memory
Change-Id: I14cff013ef4920d33b5ead0c75d51681bb4f635a Reviewed-on: https://go-review.googlesource.com/21337 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
8bc9c57b18
commit
38e11d05b9
@ -3469,11 +3469,7 @@ func cgen_slice(n, res *Node, wb bool) {
|
||||
} else {
|
||||
var ptr *Type
|
||||
if n.Op == OSLICESTR {
|
||||
// Yikes! Ptrto(nil)?!
|
||||
// Prior to CL 21331, that's what this code did implicitly.
|
||||
// Now it does it explicitly, to safely preserve old behavior.
|
||||
// This will all be replaced by SSA anyway.
|
||||
ptr = Ptrto(nil)
|
||||
ptr = ptrToUint8
|
||||
} else {
|
||||
ptr = Ptrto(n.Type.Elem())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user