github.com/llir/llvm@v0.3.6/asm/enum/diflag_string2enum.go (about) 1 // Code generated by "string2enum -linecomment -type DIFlag ../../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.DIFlagZero-0] 16 _ = x[enum.DIFlagPrivate-1] 17 _ = x[enum.DIFlagProtected-2] 18 _ = x[enum.DIFlagPublic-3] 19 _ = x[enum.DIFlagFwdDecl-4] 20 _ = x[enum.DIFlagAppleBlock-8] 21 _ = x[enum.DIFlagReservedBit4-16] 22 _ = x[enum.DIFlagVirtual-32] 23 _ = x[enum.DIFlagArtificial-64] 24 _ = x[enum.DIFlagExplicit-128] 25 _ = x[enum.DIFlagPrototyped-256] 26 _ = x[enum.DIFlagObjcClassComplete-512] 27 _ = x[enum.DIFlagObjectPointer-1024] 28 _ = x[enum.DIFlagVector-2048] 29 _ = x[enum.DIFlagStaticMember-4096] 30 _ = x[enum.DIFlagLValueReference-8192] 31 _ = x[enum.DIFlagRValueReference-16384] 32 _ = x[enum.DIFlagExportSymbols-32768] 33 _ = x[enum.DIFlagSingleInheritance-65536] 34 _ = x[enum.DIFlagMultipleInheritance-131072] 35 _ = x[enum.DIFlagVirtualInheritance-196608] 36 _ = x[enum.DIFlagIntroducedVirtual-262144] 37 _ = x[enum.DIFlagBitField-524288] 38 _ = x[enum.DIFlagNoReturn-1048576] 39 _ = x[enum.DIFlagTypePassByValue-4194304] 40 _ = x[enum.DIFlagTypePassByReference-8388608] 41 _ = x[enum.DIFlagEnumClass-16777216] 42 _ = x[enum.DIFlagThunk-33554432] 43 _ = x[enum.DIFlagNonTrivial-67108864] 44 _ = x[enum.DIFlagBigEndian-134217728] 45 _ = x[enum.DIFlagLittleEndian-268435456] 46 _ = x[enum.DIFlagAllCallsDescribed-536870912] 47 _ = x[enum.DIFlagIndirectVirtualBase-36] 48 _ = x[enum.DIFlagAccessibility-3] 49 _ = x[enum.DIFlagPtrToMemberRep-196608] 50 } 51 52 const _DIFlag_name = "DIFlagZeroDIFlagPrivateDIFlagProtectedDIFlagPublicDIFlagFwdDeclDIFlagAppleBlockDIFlagReservedBit4DIFlagVirtualDIFlagIndirectVirtualBaseDIFlagArtificialDIFlagExplicitDIFlagPrototypedDIFlagObjcClassCompleteDIFlagObjectPointerDIFlagVectorDIFlagStaticMemberDIFlagLValueReferenceDIFlagRValueReferenceDIFlagExportSymbolsDIFlagSingleInheritanceDIFlagMultipleInheritanceDIFlagVirtualInheritanceDIFlagIntroducedVirtualDIFlagBitFieldDIFlagNoReturnDIFlagTypePassByValueDIFlagTypePassByReferenceDIFlagEnumClassDIFlagThunkDIFlagNonTrivialDIFlagBigEndianDIFlagLittleEndianDIFlagAllCallsDescribed" 53 54 var _DIFlag_map = map[enum.DIFlag]string{ 55 0: _DIFlag_name[0:10], 56 1: _DIFlag_name[10:23], 57 2: _DIFlag_name[23:38], 58 3: _DIFlag_name[38:50], 59 4: _DIFlag_name[50:63], 60 8: _DIFlag_name[63:79], 61 16: _DIFlag_name[79:97], 62 32: _DIFlag_name[97:110], 63 36: _DIFlag_name[110:135], 64 64: _DIFlag_name[135:151], 65 128: _DIFlag_name[151:165], 66 256: _DIFlag_name[165:181], 67 512: _DIFlag_name[181:204], 68 1024: _DIFlag_name[204:223], 69 2048: _DIFlag_name[223:235], 70 4096: _DIFlag_name[235:253], 71 8192: _DIFlag_name[253:274], 72 16384: _DIFlag_name[274:295], 73 32768: _DIFlag_name[295:314], 74 65536: _DIFlag_name[314:337], 75 131072: _DIFlag_name[337:362], 76 196608: _DIFlag_name[362:386], 77 262144: _DIFlag_name[386:409], 78 524288: _DIFlag_name[409:423], 79 1048576: _DIFlag_name[423:437], 80 4194304: _DIFlag_name[437:458], 81 8388608: _DIFlag_name[458:483], 82 16777216: _DIFlag_name[483:498], 83 33554432: _DIFlag_name[498:509], 84 67108864: _DIFlag_name[509:525], 85 134217728: _DIFlag_name[525:540], 86 268435456: _DIFlag_name[540:558], 87 536870912: _DIFlag_name[558:581], 88 } 89 90 // DIFlagFromString returns the DIFlag enum corresponding to s. 91 func DIFlagFromString(s string) enum.DIFlag { 92 for key, val := range _DIFlag_map { 93 if s == val { 94 return key 95 } 96 } 97 panic(fmt.Errorf("unable to locate DIFlag enum corresponding to %q", s)) 98 } 99 100 func _(s string) { 101 // Check for duplicate string values in type "DIFlag". 102 switch s { 103 // 0 104 case "DIFlagZero": 105 // 1 106 case "DIFlagPrivate": 107 // 2 108 case "DIFlagProtected": 109 // 3 110 case "DIFlagPublic": 111 // 4 112 case "DIFlagFwdDecl": 113 // 8 114 case "DIFlagAppleBlock": 115 // 16 116 case "DIFlagReservedBit4": 117 // 32 118 case "DIFlagVirtual": 119 // 36 120 case "DIFlagIndirectVirtualBase": 121 // 64 122 case "DIFlagArtificial": 123 // 128 124 case "DIFlagExplicit": 125 // 256 126 case "DIFlagPrototyped": 127 // 512 128 case "DIFlagObjcClassComplete": 129 // 1024 130 case "DIFlagObjectPointer": 131 // 2048 132 case "DIFlagVector": 133 // 4096 134 case "DIFlagStaticMember": 135 // 8192 136 case "DIFlagLValueReference": 137 // 16384 138 case "DIFlagRValueReference": 139 // 32768 140 case "DIFlagExportSymbols": 141 // 65536 142 case "DIFlagSingleInheritance": 143 // 131072 144 case "DIFlagMultipleInheritance": 145 // 196608 146 case "DIFlagVirtualInheritance": 147 // 262144 148 case "DIFlagIntroducedVirtual": 149 // 524288 150 case "DIFlagBitField": 151 // 1048576 152 case "DIFlagNoReturn": 153 // 4194304 154 case "DIFlagTypePassByValue": 155 // 8388608 156 case "DIFlagTypePassByReference": 157 // 16777216 158 case "DIFlagEnumClass": 159 // 33554432 160 case "DIFlagThunk": 161 // 67108864 162 case "DIFlagNonTrivial": 163 // 134217728 164 case "DIFlagBigEndian": 165 // 268435456 166 case "DIFlagLittleEndian": 167 // 536870912 168 case "DIFlagAllCallsDescribed": 169 } 170 }