]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: change unsafeUintptrTag from var to const
authorMatthew Dempsky <mdempsky@google.com>
Thu, 22 Mar 2018 18:18:24 +0000 (11:18 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Thu, 22 Mar 2018 19:38:06 +0000 (19:38 +0000)
Change-Id: Ie30878199e24cce5b75428e6b602c017ebd16642
Reviewed-on: https://go-review.googlesource.com/102175
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
src/cmd/compile/internal/gc/esc.go

index c5021f4a48eb6c17621685fe8007a3f9f8f9ad62..6ce2299ba23e260acc216afafe0ab3d0abee5b81 100644 (file)
@@ -2168,9 +2168,7 @@ func moveToHeap(n *Node) {
 // This special tag is applied to uintptr variables
 // that we believe may hold unsafe.Pointers for
 // calls into assembly functions.
-// It is logically a constant, but using a var
-// lets us take the address below to get a *string.
-var unsafeUintptrTag = "unsafe-uintptr"
+const unsafeUintptrTag = "unsafe-uintptr"
 
 // This special tag is applied to uintptr parameters of functions
 // marked go:uintptrescapes.