github.com/llir/llvm@v0.3.6/ir/enum/dwarfmacinfo_string.go (about)

     1  // Code generated by "stringer -linecomment -type DwarfMacinfo"; DO NOT EDIT.
     2  
     3  package enum
     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[DwarfMacinfoDefine-1]
    12  	_ = x[DwarfMacinfoUndef-2]
    13  	_ = x[DwarfMacinfoStartFile-3]
    14  	_ = x[DwarfMacinfoEndFile-4]
    15  	_ = x[DwarfMacinfoVendorExt-255]
    16  }
    17  
    18  const (
    19  	_DwarfMacinfo_name_0 = "DW_MACINFO_defineDW_MACINFO_undefDW_MACINFO_start_fileDW_MACINFO_end_file"
    20  	_DwarfMacinfo_name_1 = "DW_MACINFO_vendor_ext"
    21  )
    22  
    23  var (
    24  	_DwarfMacinfo_index_0 = [...]uint8{0, 17, 33, 54, 73}
    25  )
    26  
    27  func (i DwarfMacinfo) String() string {
    28  	switch {
    29  	case 1 <= i && i <= 4:
    30  		i -= 1
    31  		return _DwarfMacinfo_name_0[_DwarfMacinfo_index_0[i]:_DwarfMacinfo_index_0[i+1]]
    32  	case i == 255:
    33  		return _DwarfMacinfo_name_1
    34  	default:
    35  		return "DwarfMacinfo(" + strconv.FormatInt(int64(i), 10) + ")"
    36  	}
    37  }