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

     1  // Code generated by "stringer -linecomment -type DwarfCC"; 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[DwarfCCNormal-1]
    12  	_ = x[DwarfCCProgram-2]
    13  	_ = x[DwarfCCNoCall-3]
    14  	_ = x[DwarfCCPassByReference-4]
    15  	_ = x[DwarfCCPassByValue-5]
    16  	_ = x[DwarfCCGNUBorlandFastcallI386-65]
    17  	_ = x[DwarfCCBORLANDSafecall-176]
    18  	_ = x[DwarfCCBORLANDStdcall-177]
    19  	_ = x[DwarfCCBORLANDPascal-178]
    20  	_ = x[DwarfCCBORLANDMSFastcall-179]
    21  	_ = x[DwarfCCBORLANDMSReturn-180]
    22  	_ = x[DwarfCCBORLANDThiscall-181]
    23  	_ = x[DwarfCCBORLANDFastcall-182]
    24  	_ = x[DwarfCCLLVMVectorcall-192]
    25  }
    26  
    27  const (
    28  	_DwarfCC_name_0 = "DW_CC_normalDW_CC_programDW_CC_nocallDW_CC_pass_by_referenceDW_CC_pass_by_value"
    29  	_DwarfCC_name_1 = "DW_CC_GNU_borland_fastcall_i386"
    30  	_DwarfCC_name_2 = "DW_CC_BORLAND_safecallDW_CC_BORLAND_stdcallDW_CC_BORLAND_pascalDW_CC_BORLAND_msfastcallDW_CC_BORLAND_msreturnDW_CC_BORLAND_thiscallDW_CC_BORLAND_fastcall"
    31  	_DwarfCC_name_3 = "DW_CC_LLVM_vectorcall"
    32  )
    33  
    34  var (
    35  	_DwarfCC_index_0 = [...]uint8{0, 12, 25, 37, 60, 79}
    36  	_DwarfCC_index_2 = [...]uint8{0, 22, 43, 63, 87, 109, 131, 153}
    37  )
    38  
    39  func (i DwarfCC) String() string {
    40  	switch {
    41  	case 1 <= i && i <= 5:
    42  		i -= 1
    43  		return _DwarfCC_name_0[_DwarfCC_index_0[i]:_DwarfCC_index_0[i+1]]
    44  	case i == 65:
    45  		return _DwarfCC_name_1
    46  	case 176 <= i && i <= 182:
    47  		i -= 176
    48  		return _DwarfCC_name_2[_DwarfCC_index_2[i]:_DwarfCC_index_2[i+1]]
    49  	case i == 192:
    50  		return _DwarfCC_name_3
    51  	default:
    52  		return "DwarfCC(" + strconv.FormatInt(int64(i), 10) + ")"
    53  	}
    54  }