github.com/llir/llvm@v0.3.6/ir/enum/dispflag_string.go (about) 1 // Code generated by "stringer -type DISPFlag"; 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[DISPFlagZero-0] 12 _ = x[DISPFlagVirtual-1] 13 _ = x[DISPFlagPureVirtual-2] 14 _ = x[DISPFlagLocalToUnit-4] 15 _ = x[DISPFlagDefinition-8] 16 _ = x[DISPFlagOptimized-16] 17 _ = x[DISPFlagPure-32] 18 _ = x[DISPFlagElemental-64] 19 _ = x[DISPFlagRecursive-128] 20 _ = x[DISPFlagMainSubprogram-256] 21 _ = x[DISPFlagDeleted-512] 22 _ = x[DISPFlagObjCDirect-2048] 23 _ = x[DISPFlagNonvirtual-0] 24 _ = x[DISPFlagVirtuality-3] 25 } 26 27 const ( 28 _DISPFlag_name_0 = "DISPFlagZeroDISPFlagVirtualDISPFlagPureVirtualDISPFlagVirtualityDISPFlagLocalToUnit" 29 _DISPFlag_name_1 = "DISPFlagDefinition" 30 _DISPFlag_name_2 = "DISPFlagOptimized" 31 _DISPFlag_name_3 = "DISPFlagPure" 32 _DISPFlag_name_4 = "DISPFlagElemental" 33 _DISPFlag_name_5 = "DISPFlagRecursive" 34 _DISPFlag_name_6 = "DISPFlagMainSubprogram" 35 _DISPFlag_name_7 = "DISPFlagDeleted" 36 _DISPFlag_name_8 = "DISPFlagObjCDirect" 37 ) 38 39 var ( 40 _DISPFlag_index_0 = [...]uint8{0, 12, 27, 46, 64, 83} 41 ) 42 43 func (i DISPFlag) String() string { 44 switch { 45 case i <= 4: 46 return _DISPFlag_name_0[_DISPFlag_index_0[i]:_DISPFlag_index_0[i+1]] 47 case i == 8: 48 return _DISPFlag_name_1 49 case i == 16: 50 return _DISPFlag_name_2 51 case i == 32: 52 return _DISPFlag_name_3 53 case i == 64: 54 return _DISPFlag_name_4 55 case i == 128: 56 return _DISPFlag_name_5 57 case i == 256: 58 return _DISPFlag_name_6 59 case i == 512: 60 return _DISPFlag_name_7 61 case i == 2048: 62 return _DISPFlag_name_8 63 default: 64 return "DISPFlag(" + strconv.FormatInt(int64(i), 10) + ")" 65 } 66 }