github.com/llir/llvm@v0.3.6/asm/enum/dwarfattencoding_string2enum.go (about) 1 // Code generated by "string2enum -linecomment -type DwarfAttEncoding ../../ir/enum"; DO NOT EDIT. 2 3 package enum 4 5 import ( 6 "fmt" 7 8 "github.com/llir/llvm/ir/enum" 9 ) 10 11 func _() { 12 // An "invalid array index" compiler error signifies that the constant values have changed. 13 // Re-run the string2enum command to generate them again. 14 var x [1]struct{} 15 _ = x[enum.DwarfAttEncodingAddress-1] 16 _ = x[enum.DwarfAttEncodingBoolean-2] 17 _ = x[enum.DwarfAttEncodingComplexFloat-3] 18 _ = x[enum.DwarfAttEncodingFloat-4] 19 _ = x[enum.DwarfAttEncodingSigned-5] 20 _ = x[enum.DwarfAttEncodingSignedChar-6] 21 _ = x[enum.DwarfAttEncodingUnsigned-7] 22 _ = x[enum.DwarfAttEncodingUnsignedChar-8] 23 _ = x[enum.DwarfAttEncodingImaginaryFloat-9] 24 _ = x[enum.DwarfAttEncodingPackedDecimal-10] 25 _ = x[enum.DwarfAttEncodingNumericString-11] 26 _ = x[enum.DwarfAttEncodingEdited-12] 27 _ = x[enum.DwarfAttEncodingSignedFixed-13] 28 _ = x[enum.DwarfAttEncodingUnsignedFixed-14] 29 _ = x[enum.DwarfAttEncodingDecimalFloat-15] 30 _ = x[enum.DwarfAttEncodingUTF-16] 31 _ = x[enum.DwarfAttEncodingUCS-17] 32 _ = x[enum.DwarfAttEncodingASCII-18] 33 } 34 35 const _DwarfAttEncoding_name = "DW_ATE_addressDW_ATE_booleanDW_ATE_complex_floatDW_ATE_floatDW_ATE_signedDW_ATE_signed_charDW_ATE_unsignedDW_ATE_unsigned_charDW_ATE_imaginary_floatDW_ATE_packed_decimalDW_ATE_numeric_stringDW_ATE_editedDW_ATE_signed_fixedDW_ATE_unsigned_fixedDW_ATE_decimal_floatDW_ATE_UTFDW_ATE_UCSDW_ATE_ASCII" 36 37 var _DwarfAttEncoding_index = [...]uint16{0, 14, 28, 48, 60, 73, 91, 106, 126, 148, 169, 190, 203, 222, 243, 263, 273, 283, 295} 38 39 // DwarfAttEncodingFromString returns the DwarfAttEncoding enum corresponding to s. 40 func DwarfAttEncodingFromString(s string) enum.DwarfAttEncoding { 41 if len(s) == 0 { 42 return 0 43 } 44 for i := range _DwarfAttEncoding_index[:len(_DwarfAttEncoding_index)-1] { 45 if s == _DwarfAttEncoding_name[_DwarfAttEncoding_index[i]:_DwarfAttEncoding_index[i+1]] { 46 return enum.DwarfAttEncoding(i + 1) 47 } 48 } 49 panic(fmt.Errorf("unable to locate DwarfAttEncoding enum corresponding to %q", s)) 50 } 51 52 func _(s string) { 53 // Check for duplicate string values in type "DwarfAttEncoding". 54 switch s { 55 // 1 56 case "DW_ATE_address": 57 // 2 58 case "DW_ATE_boolean": 59 // 3 60 case "DW_ATE_complex_float": 61 // 4 62 case "DW_ATE_float": 63 // 5 64 case "DW_ATE_signed": 65 // 6 66 case "DW_ATE_signed_char": 67 // 7 68 case "DW_ATE_unsigned": 69 // 8 70 case "DW_ATE_unsigned_char": 71 // 9 72 case "DW_ATE_imaginary_float": 73 // 10 74 case "DW_ATE_packed_decimal": 75 // 11 76 case "DW_ATE_numeric_string": 77 // 12 78 case "DW_ATE_edited": 79 // 13 80 case "DW_ATE_signed_fixed": 81 // 14 82 case "DW_ATE_unsigned_fixed": 83 // 15 84 case "DW_ATE_decimal_float": 85 // 16 86 case "DW_ATE_UTF": 87 // 17 88 case "DW_ATE_UCS": 89 // 18 90 case "DW_ATE_ASCII": 91 } 92 }