aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/types/kind_string.go
diff options
context:
space:
mode:
authorMeng Zhuo <mzh@golangcn.org>2020-12-28 15:22:47 +0800
committerMeng Zhuo <mzh@golangcn.org>2020-12-28 07:45:19 +0000
commited9772e130d81b3a5a7b9e9b58e8d48a5ec4c319 (patch)
tree76c793ed6e4d1d858cdad1c7e6988c84a38a8747 /src/cmd/compile/internal/types/kind_string.go
parenta59d26603f0dffbe6e914bc9ab29a2f9f70e5408 (diff)
downloadgo-ed9772e130d81b3a5a7b9e9b58e8d48a5ec4c319.tar.gz
go-ed9772e130d81b3a5a7b9e9b58e8d48a5ec4c319.zip
[dev.regabi] cmd/compile: add explicit file name in types generation
The stringer using `go list` for the type detection, which depends on GOROOT. Unfortunally by changing GOROOT to develop path will raise version mismatch with internal packages. Update #43369 Change-Id: Id81334ea5f1ecdbfa81eb2d162944d65664ce727 Reviewed-on: https://go-review.googlesource.com/c/go/+/280572 Trust: Meng Zhuo <mzh@golangcn.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Go Bot <gobot@golang.org>
Diffstat (limited to 'src/cmd/compile/internal/types/kind_string.go')
-rw-r--r--src/cmd/compile/internal/types/kind_string.go60
1 files changed, 60 insertions, 0 deletions
diff --git a/src/cmd/compile/internal/types/kind_string.go b/src/cmd/compile/internal/types/kind_string.go
new file mode 100644
index 0000000000..1e1e846240
--- /dev/null
+++ b/src/cmd/compile/internal/types/kind_string.go
@@ -0,0 +1,60 @@
+// Code generated by "stringer -type Kind -trimprefix T type.go"; DO NOT EDIT.
+
+package types
+
+import "strconv"
+
+func _() {
+ // An "invalid array index" compiler error signifies that the constant values have changed.
+ // Re-run the stringer command to generate them again.
+ var x [1]struct{}
+ _ = x[Txxx-0]
+ _ = x[TINT8-1]
+ _ = x[TUINT8-2]
+ _ = x[TINT16-3]
+ _ = x[TUINT16-4]
+ _ = x[TINT32-5]
+ _ = x[TUINT32-6]
+ _ = x[TINT64-7]
+ _ = x[TUINT64-8]
+ _ = x[TINT-9]
+ _ = x[TUINT-10]
+ _ = x[TUINTPTR-11]
+ _ = x[TCOMPLEX64-12]
+ _ = x[TCOMPLEX128-13]
+ _ = x[TFLOAT32-14]
+ _ = x[TFLOAT64-15]
+ _ = x[TBOOL-16]
+ _ = x[TPTR-17]
+ _ = x[TFUNC-18]
+ _ = x[TSLICE-19]
+ _ = x[TARRAY-20]
+ _ = x[TSTRUCT-21]
+ _ = x[TCHAN-22]
+ _ = x[TMAP-23]
+ _ = x[TINTER-24]
+ _ = x[TFORW-25]
+ _ = x[TANY-26]
+ _ = x[TSTRING-27]
+ _ = x[TUNSAFEPTR-28]
+ _ = x[TIDEAL-29]
+ _ = x[TNIL-30]
+ _ = x[TBLANK-31]
+ _ = x[TFUNCARGS-32]
+ _ = x[TCHANARGS-33]
+ _ = x[TSSA-34]
+ _ = x[TTUPLE-35]
+ _ = x[TRESULTS-36]
+ _ = x[NTYPE-37]
+}
+
+const _Kind_name = "xxxINT8UINT8INT16UINT16INT32UINT32INT64UINT64INTUINTUINTPTRCOMPLEX64COMPLEX128FLOAT32FLOAT64BOOLPTRFUNCSLICEARRAYSTRUCTCHANMAPINTERFORWANYSTRINGUNSAFEPTRIDEALNILBLANKFUNCARGSCHANARGSSSATUPLERESULTSNTYPE"
+
+var _Kind_index = [...]uint8{0, 3, 7, 12, 17, 23, 28, 34, 39, 45, 48, 52, 59, 68, 78, 85, 92, 96, 99, 103, 108, 113, 119, 123, 126, 131, 135, 138, 144, 153, 158, 161, 166, 174, 182, 185, 190, 197, 202}
+
+func (i Kind) String() string {
+ if i >= Kind(len(_Kind_index)-1) {
+ return "Kind(" + strconv.FormatInt(int64(i), 10) + ")"
+ }
+ return _Kind_name[_Kind_index[i]:_Kind_index[i+1]]
+}