github.com/llir/llvm@v0.3.6/ir/types/floatkind_string.go (about)

     1  // Code generated by "stringer -linecomment -type FloatKind"; DO NOT EDIT.
     2  
     3  package types
     4  
     5  import "strconv"
     6  
     7  func _() {
     8  	// An "invalid array index" compiler error signifies that the constant values have changed.
     9  	// Re-run the stringer command to generate them again.
    10  	var x [1]struct{}
    11  	_ = x[FloatKindHalf-0]
    12  	_ = x[FloatKindFloat-1]
    13  	_ = x[FloatKindDouble-2]
    14  	_ = x[FloatKindFP128-3]
    15  	_ = x[FloatKindX86_FP80-4]
    16  	_ = x[FloatKindPPC_FP128-5]
    17  }
    18  
    19  const _FloatKind_name = "halffloatdoublefp128x86_fp80ppc_fp128"
    20  
    21  var _FloatKind_index = [...]uint8{0, 4, 9, 15, 20, 28, 37}
    22  
    23  func (i FloatKind) String() string {
    24  	if i >= FloatKind(len(_FloatKind_index)-1) {
    25  		return "FloatKind(" + strconv.FormatInt(int64(i), 10) + ")"
    26  	}
    27  	return _FloatKind_name[_FloatKind_index[i]:_FloatKind_index[i+1]]
    28  }