]> Cypherpunks repositories - gostls13.git/commitdiff
[dev.ssa] cmd/compile: treat unsafe.Pointer as a pointer
authorBrad Fitzpatrick <bradfitz@golang.org>
Mon, 13 Jul 2015 21:46:53 +0000 (15:46 -0600)
committerBrad Fitzpatrick <bradfitz@golang.org>
Mon, 13 Jul 2015 22:36:24 +0000 (22:36 +0000)
Change-Id: I3f3ac3055c93858894b8852603d79592bbc1696b
Reviewed-on: https://go-review.googlesource.com/12140
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/gc/type.go

index 7f7b6635e00ec98080742b4b1e2260a1492c42cb..f60d01b3bb497ec3b501526910962bfad63a6e31 100644 (file)
@@ -56,7 +56,7 @@ func (t *Type) IsFloat() bool {
 }
 
 func (t *Type) IsPtr() bool {
-       return t.Etype == TPTR32 || t.Etype == TPTR64 ||
+       return t.Etype == TPTR32 || t.Etype == TPTR64 || t.Etype == TUNSAFEPTR ||
                t.Etype == TMAP || t.Etype == TCHAN || t.Etype == TFUNC
 }