cmd/compile: make Class a Stringer

Change-Id: I7fd137d01ab5a0690773ca6e47d2bd796f0e393e
Reviewed-on: https://go-review.googlesource.com/42177
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Josh Bleecher Snyder 2017-04-30 09:14:52 -07:00
parent a8e3852a05
commit 5e157db37a
2 changed files with 17 additions and 0 deletions

View file

@ -0,0 +1,16 @@
// Code generated by "stringer -type=Class"; DO NOT EDIT.
package gc
import "fmt"
const _Class_name = "PxxxPEXTERNPAUTOPAUTOHEAPPPARAMPPARAMOUTPFUNCPDISCARD"
var _Class_index = [...]uint8{0, 4, 11, 16, 25, 31, 40, 45, 53}
func (i Class) String() string {
if i >= Class(len(_Class_index)-1) {
return fmt.Sprintf("Class(%d)", i)
}
return _Class_name[_Class_index[i]:_Class_index[i+1]]
}