diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 13:16:40 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 13:16:40 +0000 |
commit | 47ab3d4a42e9ab51c465c4322d2ec233f6324e6b (patch) | |
tree | a61a0ffd83f4a3def4b36e5c8e99630c559aa723 /src/cmd/compile/internal/ir/class_string.go | |
parent | Initial commit. (diff) | |
download | golang-1.18-upstream.tar.xz golang-1.18-upstream.zip |
Adding upstream version 1.18.10.upstream/1.18.10upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/cmd/compile/internal/ir/class_string.go')
-rw-r--r-- | src/cmd/compile/internal/ir/class_string.go | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/cmd/compile/internal/ir/class_string.go b/src/cmd/compile/internal/ir/class_string.go new file mode 100644 index 0000000..11a94c0 --- /dev/null +++ b/src/cmd/compile/internal/ir/class_string.go @@ -0,0 +1,30 @@ +// Code generated by "stringer -type=Class name.go"; DO NOT EDIT. + +package ir + +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[Pxxx-0] + _ = x[PEXTERN-1] + _ = x[PAUTO-2] + _ = x[PAUTOHEAP-3] + _ = x[PPARAM-4] + _ = x[PPARAMOUT-5] + _ = x[PTYPEPARAM-6] + _ = x[PFUNC-7] +} + +const _Class_name = "PxxxPEXTERNPAUTOPAUTOHEAPPPARAMPPARAMOUTPTYPEPARAMPFUNC" + +var _Class_index = [...]uint8{0, 4, 11, 16, 25, 31, 40, 50, 55} + +func (i Class) String() string { + if i >= Class(len(_Class_index)-1) { + return "Class(" + strconv.FormatInt(int64(i), 10) + ")" + } + return _Class_name[_Class_index[i]:_Class_index[i+1]] +} |