| ... | ... | @@ -15,7 +15,6 @@ pub const Bool = enum(c_int) { |
| 15 | 15 | return b != .False; |
| 16 | 16 | } |
| 17 | 17 | }; |
| 18 | | pub const AttributeIndex = c_uint; |
| 19 | 18 | |
| 20 | 19 | pub const MemoryBuffer = opaque { |
| 21 | 20 | pub const createMemoryBufferWithMemoryRange = LLVMCreateMemoryBufferWithMemoryRange; |
| ... | ... | @@ -36,382 +35,14 @@ pub const Context = opaque { |
| 36 | 35 | pub const parseBitcodeInContext2 = LLVMParseBitcodeInContext2; |
| 37 | 36 | extern fn LLVMParseBitcodeInContext2(C: *Context, MemBuf: *MemoryBuffer, OutModule: **Module) Bool; |
| 38 | 37 | |
| 39 | | pub const createEnumAttribute = LLVMCreateEnumAttribute; |
| 40 | | extern fn LLVMCreateEnumAttribute(C: *Context, KindID: c_uint, Val: u64) *Attribute; |
| 41 | | |
| 42 | | pub const createTypeAttribute = LLVMCreateTypeAttribute; |
| 43 | | extern fn LLVMCreateTypeAttribute(C: *Context, KindID: c_uint, Type: *Type) *Attribute; |
| 44 | | |
| 45 | | pub const createStringAttribute = LLVMCreateStringAttribute; |
| 46 | | extern fn LLVMCreateStringAttribute(C: *Context, Key: [*]const u8, Key_Len: c_uint, Value: [*]const u8, Value_Len: c_uint) *Attribute; |
| 47 | | |
| 48 | | pub const pointerType = LLVMPointerTypeInContext; |
| 49 | | extern fn LLVMPointerTypeInContext(C: *Context, AddressSpace: c_uint) *Type; |
| 50 | | |
| 51 | | pub const intType = LLVMIntTypeInContext; |
| 52 | | extern fn LLVMIntTypeInContext(C: *Context, NumBits: c_uint) *Type; |
| 53 | | |
| 54 | | pub const halfType = LLVMHalfTypeInContext; |
| 55 | | extern fn LLVMHalfTypeInContext(C: *Context) *Type; |
| 56 | | |
| 57 | | pub const bfloatType = LLVMBFloatTypeInContext; |
| 58 | | extern fn LLVMBFloatTypeInContext(C: *Context) *Type; |
| 59 | | |
| 60 | | pub const floatType = LLVMFloatTypeInContext; |
| 61 | | extern fn LLVMFloatTypeInContext(C: *Context) *Type; |
| 62 | | |
| 63 | | pub const doubleType = LLVMDoubleTypeInContext; |
| 64 | | extern fn LLVMDoubleTypeInContext(C: *Context) *Type; |
| 65 | | |
| 66 | | pub const fp128Type = LLVMFP128TypeInContext; |
| 67 | | extern fn LLVMFP128TypeInContext(C: *Context) *Type; |
| 68 | | |
| 69 | | pub const x86_fp80Type = LLVMX86FP80TypeInContext; |
| 70 | | extern fn LLVMX86FP80TypeInContext(C: *Context) *Type; |
| 71 | | |
| 72 | | pub const ppc_fp128Type = LLVMPPCFP128TypeInContext; |
| 73 | | extern fn LLVMPPCFP128TypeInContext(C: *Context) *Type; |
| 74 | | |
| 75 | | pub const x86_amxType = LLVMX86AMXTypeInContext; |
| 76 | | extern fn LLVMX86AMXTypeInContext(C: *Context) *Type; |
| 77 | | |
| 78 | | pub const x86_mmxType = LLVMX86MMXTypeInContext; |
| 79 | | extern fn LLVMX86MMXTypeInContext(C: *Context) *Type; |
| 80 | | |
| 81 | | pub const voidType = LLVMVoidTypeInContext; |
| 82 | | extern fn LLVMVoidTypeInContext(C: *Context) *Type; |
| 83 | | |
| 84 | | pub const labelType = LLVMLabelTypeInContext; |
| 85 | | extern fn LLVMLabelTypeInContext(C: *Context) *Type; |
| 86 | | |
| 87 | | pub const tokenType = LLVMTokenTypeInContext; |
| 88 | | extern fn LLVMTokenTypeInContext(C: *Context) *Type; |
| 89 | | |
| 90 | | pub const metadataType = LLVMMetadataTypeInContext; |
| 91 | | extern fn LLVMMetadataTypeInContext(C: *Context) *Type; |
| 92 | | |
| 93 | | pub const structType = LLVMStructTypeInContext; |
| 94 | | extern fn LLVMStructTypeInContext( |
| 95 | | C: *Context, |
| 96 | | ElementTypes: [*]const *Type, |
| 97 | | ElementCount: c_uint, |
| 98 | | Packed: Bool, |
| 99 | | ) *Type; |
| 100 | | |
| 101 | | pub const structCreateNamed = LLVMStructCreateNamed; |
| 102 | | extern fn LLVMStructCreateNamed(C: *Context, Name: [*:0]const u8) *Type; |
| 103 | | |
| 104 | | pub const constString = LLVMConstStringInContext; |
| 105 | | extern fn LLVMConstStringInContext(C: *Context, Str: [*]const u8, Length: c_uint, DontNullTerminate: Bool) *Value; |
| 106 | | |
| 107 | | pub const appendBasicBlock = LLVMAppendBasicBlockInContext; |
| 108 | | extern fn LLVMAppendBasicBlockInContext(C: *Context, Fn: *Value, Name: [*:0]const u8) *BasicBlock; |
| 109 | | |
| 110 | | pub const createBuilder = LLVMCreateBuilderInContext; |
| 111 | | extern fn LLVMCreateBuilderInContext(C: *Context) *Builder; |
| 112 | | |
| 113 | 38 | pub const setOptBisectLimit = ZigLLVMSetOptBisectLimit; |
| 114 | 39 | extern fn ZigLLVMSetOptBisectLimit(C: *Context, limit: c_int) void; |
| 115 | 40 | }; |
| 116 | 41 | |
| 117 | | pub const Value = opaque { |
| 118 | | pub const addAttributeAtIndex = LLVMAddAttributeAtIndex; |
| 119 | | extern fn LLVMAddAttributeAtIndex(F: *Value, Idx: AttributeIndex, A: *Attribute) void; |
| 120 | | |
| 121 | | pub const removeEnumAttributeAtIndex = LLVMRemoveEnumAttributeAtIndex; |
| 122 | | extern fn LLVMRemoveEnumAttributeAtIndex(F: *Value, Idx: AttributeIndex, KindID: c_uint) void; |
| 123 | | |
| 124 | | pub const removeStringAttributeAtIndex = LLVMRemoveStringAttributeAtIndex; |
| 125 | | extern fn LLVMRemoveStringAttributeAtIndex(F: *Value, Idx: AttributeIndex, K: [*]const u8, KLen: c_uint) void; |
| 126 | | |
| 127 | | pub const getFirstBasicBlock = LLVMGetFirstBasicBlock; |
| 128 | | extern fn LLVMGetFirstBasicBlock(Fn: *Value) ?*BasicBlock; |
| 129 | | |
| 130 | | pub const addIncoming = LLVMAddIncoming; |
| 131 | | extern fn LLVMAddIncoming( |
| 132 | | PhiNode: *Value, |
| 133 | | IncomingValues: [*]const *Value, |
| 134 | | IncomingBlocks: [*]const *BasicBlock, |
| 135 | | Count: c_uint, |
| 136 | | ) void; |
| 137 | | |
| 138 | | pub const setGlobalConstant = LLVMSetGlobalConstant; |
| 139 | | extern fn LLVMSetGlobalConstant(GlobalVar: *Value, IsConstant: Bool) void; |
| 140 | | |
| 141 | | pub const setLinkage = LLVMSetLinkage; |
| 142 | | extern fn LLVMSetLinkage(Global: *Value, Linkage: Linkage) void; |
| 143 | | |
| 144 | | pub const setVisibility = LLVMSetVisibility; |
| 145 | | extern fn LLVMSetVisibility(Global: *Value, Linkage: Visibility) void; |
| 146 | | |
| 147 | | pub const setUnnamedAddr = LLVMSetUnnamedAddr; |
| 148 | | extern fn LLVMSetUnnamedAddr(Global: *Value, HasUnnamedAddr: Bool) void; |
| 149 | | |
| 150 | | pub const setThreadLocalMode = LLVMSetThreadLocalMode; |
| 151 | | extern fn LLVMSetThreadLocalMode(Global: *Value, Mode: ThreadLocalMode) void; |
| 152 | | |
| 153 | | pub const setSection = LLVMSetSection; |
| 154 | | extern fn LLVMSetSection(Global: *Value, Section: [*:0]const u8) void; |
| 155 | | |
| 156 | | pub const removeGlobalValue = ZigLLVMRemoveGlobalValue; |
| 157 | | extern fn ZigLLVMRemoveGlobalValue(GlobalVal: *Value) void; |
| 158 | | |
| 159 | | pub const eraseGlobalValue = ZigLLVMEraseGlobalValue; |
| 160 | | extern fn ZigLLVMEraseGlobalValue(GlobalVal: *Value) void; |
| 161 | | |
| 162 | | pub const deleteGlobalValue = ZigLLVMDeleteGlobalValue; |
| 163 | | extern fn ZigLLVMDeleteGlobalValue(GlobalVal: *Value) void; |
| 164 | | |
| 165 | | pub const setAliasee = LLVMAliasSetAliasee; |
| 166 | | extern fn LLVMAliasSetAliasee(Alias: *Value, Aliasee: *Value) void; |
| 167 | | |
| 168 | | pub const constAdd = LLVMConstAdd; |
| 169 | | extern fn LLVMConstAdd(LHSConstant: *Value, RHSConstant: *Value) *Value; |
| 170 | | |
| 171 | | pub const constNSWAdd = LLVMConstNSWAdd; |
| 172 | | extern fn LLVMConstNSWAdd(LHSConstant: *Value, RHSConstant: *Value) *Value; |
| 173 | | |
| 174 | | pub const constNUWAdd = LLVMConstNUWAdd; |
| 175 | | extern fn LLVMConstNUWAdd(LHSConstant: *Value, RHSConstant: *Value) *Value; |
| 176 | | |
| 177 | | pub const constSub = LLVMConstSub; |
| 178 | | extern fn LLVMConstSub(LHSConstant: *Value, RHSConstant: *Value) *Value; |
| 179 | | |
| 180 | | pub const constNSWSub = LLVMConstNSWSub; |
| 181 | | extern fn LLVMConstNSWSub(LHSConstant: *Value, RHSConstant: *Value) *Value; |
| 182 | | |
| 183 | | pub const constNUWSub = LLVMConstNUWSub; |
| 184 | | extern fn LLVMConstNUWSub(LHSConstant: *Value, RHSConstant: *Value) *Value; |
| 185 | | |
| 186 | | pub const constMul = LLVMConstMul; |
| 187 | | extern fn LLVMConstMul(LHSConstant: *Value, RHSConstant: *Value) *Value; |
| 188 | | |
| 189 | | pub const constNSWMul = LLVMConstNSWMul; |
| 190 | | extern fn LLVMConstNSWMul(LHSConstant: *Value, RHSConstant: *Value) *Value; |
| 191 | | |
| 192 | | pub const constNUWMul = LLVMConstNUWMul; |
| 193 | | extern fn LLVMConstNUWMul(LHSConstant: *Value, RHSConstant: *Value) *Value; |
| 194 | | |
| 195 | | pub const constAnd = LLVMConstAnd; |
| 196 | | extern fn LLVMConstAnd(LHSConstant: *Value, RHSConstant: *Value) *Value; |
| 197 | | |
| 198 | | pub const constOr = LLVMConstOr; |
| 199 | | extern fn LLVMConstOr(LHSConstant: *Value, RHSConstant: *Value) *Value; |
| 200 | | |
| 201 | | pub const constXor = LLVMConstXor; |
| 202 | | extern fn LLVMConstXor(LHSConstant: *Value, RHSConstant: *Value) *Value; |
| 203 | | |
| 204 | | pub const constShl = LLVMConstShl; |
| 205 | | extern fn LLVMConstShl(LHSConstant: *Value, RHSConstant: *Value) *Value; |
| 206 | | |
| 207 | | pub const constLShr = LLVMConstLShr; |
| 208 | | extern fn LLVMConstLShr(LHSConstant: *Value, RHSConstant: *Value) *Value; |
| 209 | | |
| 210 | | pub const constAShr = LLVMConstAShr; |
| 211 | | extern fn LLVMConstAShr(LHSConstant: *Value, RHSConstant: *Value) *Value; |
| 212 | | |
| 213 | | pub const constTrunc = LLVMConstTrunc; |
| 214 | | extern fn LLVMConstTrunc(ConstantVal: *Value, ToType: *Type) *Value; |
| 215 | | |
| 216 | | pub const constSExt = LLVMConstSExt; |
| 217 | | extern fn LLVMConstSExt(ConstantVal: *Value, ToType: *Type) *Value; |
| 218 | | |
| 219 | | pub const constZExt = LLVMConstZExt; |
| 220 | | extern fn LLVMConstZExt(ConstantVal: *Value, ToType: *Type) *Value; |
| 221 | | |
| 222 | | pub const constFPTrunc = LLVMConstFPTrunc; |
| 223 | | extern fn LLVMConstFPTrunc(ConstantVal: *Value, ToType: *Type) *Value; |
| 224 | | |
| 225 | | pub const constFPExt = LLVMConstFPExt; |
| 226 | | extern fn LLVMConstFPExt(ConstantVal: *Value, ToType: *Type) *Value; |
| 227 | | |
| 228 | | pub const constUIToFP = LLVMConstUIToFP; |
| 229 | | extern fn LLVMConstUIToFP(ConstantVal: *Value, ToType: *Type) *Value; |
| 230 | | |
| 231 | | pub const constSIToFP = LLVMConstSIToFP; |
| 232 | | extern fn LLVMConstSIToFP(ConstantVal: *Value, ToType: *Type) *Value; |
| 233 | | |
| 234 | | pub const constFPToUI = LLVMConstFPToUI; |
| 235 | | extern fn LLVMConstFPToUI(ConstantVal: *Value, ToType: *Type) *Value; |
| 236 | | |
| 237 | | pub const constFPToSI = LLVMConstFPToSI; |
| 238 | | extern fn LLVMConstFPToSI(ConstantVal: *Value, ToType: *Type) *Value; |
| 239 | | |
| 240 | | pub const constPtrToInt = LLVMConstPtrToInt; |
| 241 | | extern fn LLVMConstPtrToInt(ConstantVal: *Value, ToType: *Type) *Value; |
| 242 | | |
| 243 | | pub const constIntToPtr = LLVMConstIntToPtr; |
| 244 | | extern fn LLVMConstIntToPtr(ConstantVal: *Value, ToType: *Type) *Value; |
| 245 | | |
| 246 | | pub const constBitCast = LLVMConstBitCast; |
| 247 | | extern fn LLVMConstBitCast(ConstantVal: *Value, ToType: *Type) *Value; |
| 248 | | |
| 249 | | pub const constAddrSpaceCast = LLVMConstAddrSpaceCast; |
| 250 | | extern fn LLVMConstAddrSpaceCast(ConstantVal: *Value, ToType: *Type) *Value; |
| 251 | | |
| 252 | | pub const constExtractElement = LLVMConstExtractElement; |
| 253 | | extern fn LLVMConstExtractElement(VectorConstant: *Value, IndexConstant: *Value) *Value; |
| 254 | | |
| 255 | | pub const constInsertElement = LLVMConstInsertElement; |
| 256 | | extern fn LLVMConstInsertElement( |
| 257 | | VectorConstant: *Value, |
| 258 | | ElementValueConstant: *Value, |
| 259 | | IndexConstant: *Value, |
| 260 | | ) *Value; |
| 261 | | |
| 262 | | pub const constShuffleVector = LLVMConstShuffleVector; |
| 263 | | extern fn LLVMConstShuffleVector( |
| 264 | | VectorAConstant: *Value, |
| 265 | | VectorBConstant: *Value, |
| 266 | | MaskConstant: *Value, |
| 267 | | ) *Value; |
| 268 | | |
| 269 | | pub const isConstant = LLVMIsConstant; |
| 270 | | extern fn LLVMIsConstant(Val: *Value) Bool; |
| 271 | | |
| 272 | | pub const blockAddress = LLVMBlockAddress; |
| 273 | | extern fn LLVMBlockAddress(F: *Value, BB: *BasicBlock) *Value; |
| 274 | | |
| 275 | | pub const setWeak = LLVMSetWeak; |
| 276 | | extern fn LLVMSetWeak(CmpXchgInst: *Value, IsWeak: Bool) void; |
| 277 | | |
| 278 | | pub const setOrdering = LLVMSetOrdering; |
| 279 | | extern fn LLVMSetOrdering(MemoryAccessInst: *Value, Ordering: AtomicOrdering) void; |
| 280 | | |
| 281 | | pub const setVolatile = LLVMSetVolatile; |
| 282 | | extern fn LLVMSetVolatile(MemoryAccessInst: *Value, IsVolatile: Bool) void; |
| 283 | | |
| 284 | | pub const setAlignment = LLVMSetAlignment; |
| 285 | | extern fn LLVMSetAlignment(V: *Value, Bytes: c_uint) void; |
| 286 | | |
| 287 | | pub const getAlignment = LLVMGetAlignment; |
| 288 | | extern fn LLVMGetAlignment(V: *Value) c_uint; |
| 289 | | |
| 290 | | pub const setFunctionCallConv = LLVMSetFunctionCallConv; |
| 291 | | extern fn LLVMSetFunctionCallConv(Fn: *Value, CC: CallConv) void; |
| 292 | | |
| 293 | | pub const setInstructionCallConv = LLVMSetInstructionCallConv; |
| 294 | | extern fn LLVMSetInstructionCallConv(Instr: *Value, CC: CallConv) void; |
| 295 | | |
| 296 | | pub const setTailCallKind = ZigLLVMSetTailCallKind; |
| 297 | | extern fn ZigLLVMSetTailCallKind(CallInst: *Value, TailCallKind: TailCallKind) void; |
| 298 | | |
| 299 | | pub const addCallSiteAttribute = LLVMAddCallSiteAttribute; |
| 300 | | extern fn LLVMAddCallSiteAttribute(C: *Value, Idx: AttributeIndex, A: *Attribute) void; |
| 301 | | |
| 302 | | pub const fnSetSubprogram = ZigLLVMFnSetSubprogram; |
| 303 | | extern fn ZigLLVMFnSetSubprogram(f: *Value, subprogram: *DISubprogram) void; |
| 304 | | |
| 305 | | pub const setValueName = LLVMSetValueName2; |
| 306 | | extern fn LLVMSetValueName2(Val: *Value, Name: [*]const u8, NameLen: usize) void; |
| 307 | | |
| 308 | | pub const takeName = ZigLLVMTakeName; |
| 309 | | extern fn ZigLLVMTakeName(new_owner: *Value, victim: *Value) void; |
| 310 | | |
| 311 | | pub const getParam = LLVMGetParam; |
| 312 | | extern fn LLVMGetParam(Fn: *Value, Index: c_uint) *Value; |
| 313 | | |
| 314 | | pub const setInitializer = ZigLLVMSetInitializer; |
| 315 | | extern fn ZigLLVMSetInitializer(GlobalVar: *Value, ConstantVal: ?*Value) void; |
| 316 | | |
| 317 | | pub const setDLLStorageClass = LLVMSetDLLStorageClass; |
| 318 | | extern fn LLVMSetDLLStorageClass(Global: *Value, Class: DLLStorageClass) void; |
| 319 | | |
| 320 | | pub const addCase = LLVMAddCase; |
| 321 | | extern fn LLVMAddCase(Switch: *Value, OnVal: *Value, Dest: *BasicBlock) void; |
| 322 | | |
| 323 | | pub const replaceAllUsesWith = LLVMReplaceAllUsesWith; |
| 324 | | extern fn LLVMReplaceAllUsesWith(OldVal: *Value, NewVal: *Value) void; |
| 325 | | |
| 326 | | pub const attachMetaData = ZigLLVMAttachMetaData; |
| 327 | | extern fn ZigLLVMAttachMetaData(GlobalVar: *Value, DIG: *DIGlobalVariableExpression) void; |
| 328 | | |
| 329 | | pub const dump = LLVMDumpValue; |
| 330 | | extern fn LLVMDumpValue(Val: *Value) void; |
| 331 | | }; |
| 332 | | |
| 333 | | pub const Type = opaque { |
| 334 | | pub const constNull = LLVMConstNull; |
| 335 | | extern fn LLVMConstNull(Ty: *Type) *Value; |
| 336 | | |
| 337 | | pub const constInt = LLVMConstInt; |
| 338 | | extern fn LLVMConstInt(IntTy: *Type, N: c_ulonglong, SignExtend: Bool) *Value; |
| 339 | | |
| 340 | | pub const constIntOfArbitraryPrecision = LLVMConstIntOfArbitraryPrecision; |
| 341 | | extern fn LLVMConstIntOfArbitraryPrecision(IntTy: *Type, NumWords: c_uint, Words: [*]const u64) *Value; |
| 342 | | |
| 343 | | pub const constReal = LLVMConstReal; |
| 344 | | extern fn LLVMConstReal(RealTy: *Type, N: f64) *Value; |
| 345 | | |
| 346 | | pub const constArray2 = LLVMConstArray2; |
| 347 | | extern fn LLVMConstArray2(ElementTy: *Type, ConstantVals: [*]const *Value, Length: u64) *Value; |
| 348 | | |
| 349 | | pub const constNamedStruct = LLVMConstNamedStruct; |
| 350 | | extern fn LLVMConstNamedStruct( |
| 351 | | StructTy: *Type, |
| 352 | | ConstantVals: [*]const *Value, |
| 353 | | Count: c_uint, |
| 354 | | ) *Value; |
| 355 | | |
| 356 | | pub const getUndef = LLVMGetUndef; |
| 357 | | extern fn LLVMGetUndef(Ty: *Type) *Value; |
| 358 | | |
| 359 | | pub const getPoison = LLVMGetPoison; |
| 360 | | extern fn LLVMGetPoison(Ty: *Type) *Value; |
| 361 | | |
| 362 | | pub const arrayType2 = LLVMArrayType2; |
| 363 | | extern fn LLVMArrayType2(ElementType: *Type, ElementCount: u64) *Type; |
| 364 | | |
| 365 | | pub const vectorType = LLVMVectorType; |
| 366 | | extern fn LLVMVectorType(ElementType: *Type, ElementCount: c_uint) *Type; |
| 367 | | |
| 368 | | pub const scalableVectorType = LLVMScalableVectorType; |
| 369 | | extern fn LLVMScalableVectorType(ElementType: *Type, ElementCount: c_uint) *Type; |
| 370 | | |
| 371 | | pub const structSetBody = LLVMStructSetBody; |
| 372 | | extern fn LLVMStructSetBody( |
| 373 | | StructTy: *Type, |
| 374 | | ElementTypes: [*]*Type, |
| 375 | | ElementCount: c_uint, |
| 376 | | Packed: Bool, |
| 377 | | ) void; |
| 378 | | |
| 379 | | pub const isSized = LLVMTypeIsSized; |
| 380 | | extern fn LLVMTypeIsSized(Ty: *Type) Bool; |
| 381 | | |
| 382 | | pub const constGEP = LLVMConstGEP2; |
| 383 | | extern fn LLVMConstGEP2( |
| 384 | | Ty: *Type, |
| 385 | | ConstantVal: *Value, |
| 386 | | ConstantIndices: [*]const *Value, |
| 387 | | NumIndices: c_uint, |
| 388 | | ) *Value; |
| 389 | | |
| 390 | | pub const constInBoundsGEP = LLVMConstInBoundsGEP2; |
| 391 | | extern fn LLVMConstInBoundsGEP2( |
| 392 | | Ty: *Type, |
| 393 | | ConstantVal: *Value, |
| 394 | | ConstantIndices: [*]const *Value, |
| 395 | | NumIndices: c_uint, |
| 396 | | ) *Value; |
| 397 | | |
| 398 | | pub const dump = LLVMDumpType; |
| 399 | | extern fn LLVMDumpType(Ty: *Type) void; |
| 400 | | }; |
| 401 | | |
| 402 | 42 | pub const Module = opaque { |
| 403 | | pub const createWithName = LLVMModuleCreateWithNameInContext; |
| 404 | | extern fn LLVMModuleCreateWithNameInContext(ModuleID: [*:0]const u8, C: *Context) *Module; |
| 405 | | |
| 406 | 43 | pub const dispose = LLVMDisposeModule; |
| 407 | 44 | extern fn LLVMDisposeModule(*Module) void; |
| 408 | 45 | |
| 409 | | pub const verify = LLVMVerifyModule; |
| 410 | | extern fn LLVMVerifyModule(*Module, Action: VerifierFailureAction, OutMessage: *[*:0]const u8) Bool; |
| 411 | | |
| 412 | | pub const setModuleDataLayout = LLVMSetModuleDataLayout; |
| 413 | | extern fn LLVMSetModuleDataLayout(*Module, *TargetData) void; |
| 414 | | |
| 415 | 46 | pub const setModulePICLevel = ZigLLVMSetModulePICLevel; |
| 416 | 47 | extern fn ZigLLVMSetModulePICLevel(module: *Module) void; |
| 417 | 48 | |
| ... | ... | @@ -420,508 +51,11 @@ pub const Module = opaque { |
| 420 | 51 | |
| 421 | 52 | pub const setModuleCodeModel = ZigLLVMSetModuleCodeModel; |
| 422 | 53 | extern fn ZigLLVMSetModuleCodeModel(module: *Module, code_model: CodeModel) void; |
| 423 | | |
| 424 | | pub const addFunctionInAddressSpace = ZigLLVMAddFunctionInAddressSpace; |
| 425 | | extern fn ZigLLVMAddFunctionInAddressSpace(*Module, Name: [*:0]const u8, FunctionTy: *Type, AddressSpace: c_uint) *Value; |
| 426 | | |
| 427 | | pub const printToString = LLVMPrintModuleToString; |
| 428 | | extern fn LLVMPrintModuleToString(*Module) [*:0]const u8; |
| 429 | | |
| 430 | | pub const addGlobalInAddressSpace = LLVMAddGlobalInAddressSpace; |
| 431 | | extern fn LLVMAddGlobalInAddressSpace(M: *Module, Ty: *Type, Name: [*:0]const u8, AddressSpace: c_uint) *Value; |
| 432 | | |
| 433 | | pub const dump = LLVMDumpModule; |
| 434 | | extern fn LLVMDumpModule(M: *Module) void; |
| 435 | | |
| 436 | | pub const addAlias = LLVMAddAlias2; |
| 437 | | extern fn LLVMAddAlias2( |
| 438 | | M: *Module, |
| 439 | | Ty: *Type, |
| 440 | | AddrSpace: c_uint, |
| 441 | | Aliasee: *Value, |
| 442 | | Name: [*:0]const u8, |
| 443 | | ) *Value; |
| 444 | | |
| 445 | | pub const setTarget = LLVMSetTarget; |
| 446 | | extern fn LLVMSetTarget(M: *Module, Triple: [*:0]const u8) void; |
| 447 | | |
| 448 | | pub const addModuleDebugInfoFlag = ZigLLVMAddModuleDebugInfoFlag; |
| 449 | | extern fn ZigLLVMAddModuleDebugInfoFlag(module: *Module, dwarf64: bool) void; |
| 450 | | |
| 451 | | pub const addModuleCodeViewFlag = ZigLLVMAddModuleCodeViewFlag; |
| 452 | | extern fn ZigLLVMAddModuleCodeViewFlag(module: *Module) void; |
| 453 | | |
| 454 | | pub const createDIBuilder = ZigLLVMCreateDIBuilder; |
| 455 | | extern fn ZigLLVMCreateDIBuilder(module: *Module, allow_unresolved: bool) *DIBuilder; |
| 456 | | |
| 457 | | pub const setModuleInlineAsm = LLVMSetModuleInlineAsm2; |
| 458 | | extern fn LLVMSetModuleInlineAsm2(M: *Module, Asm: [*]const u8, Len: usize) void; |
| 459 | | |
| 460 | | pub const printModuleToFile = LLVMPrintModuleToFile; |
| 461 | | extern fn LLVMPrintModuleToFile(M: *Module, Filename: [*:0]const u8, ErrorMessage: *[*:0]const u8) Bool; |
| 462 | | |
| 463 | | pub const writeBitcodeToFile = LLVMWriteBitcodeToFile; |
| 464 | | extern fn LLVMWriteBitcodeToFile(M: *Module, Path: [*:0]const u8) c_int; |
| 465 | 54 | }; |
| 466 | 55 | |
| 467 | 56 | pub const disposeMessage = LLVMDisposeMessage; |
| 468 | 57 | extern fn LLVMDisposeMessage(Message: [*:0]const u8) void; |
| 469 | 58 | |
| 470 | | pub const VerifierFailureAction = enum(c_int) { |
| 471 | | AbortProcess, |
| 472 | | PrintMessage, |
| 473 | | ReturnStatus, |
| 474 | | }; |
| 475 | | |
| 476 | | pub const constVector = LLVMConstVector; |
| 477 | | extern fn LLVMConstVector( |
| 478 | | ScalarConstantVals: [*]*Value, |
| 479 | | Size: c_uint, |
| 480 | | ) *Value; |
| 481 | | |
| 482 | | pub const constICmp = LLVMConstICmp; |
| 483 | | extern fn LLVMConstICmp(Predicate: IntPredicate, LHSConstant: *Value, RHSConstant: *Value) *Value; |
| 484 | | |
| 485 | | pub const constFCmp = LLVMConstFCmp; |
| 486 | | extern fn LLVMConstFCmp(Predicate: RealPredicate, LHSConstant: *Value, RHSConstant: *Value) *Value; |
| 487 | | |
| 488 | | pub const getEnumAttributeKindForName = LLVMGetEnumAttributeKindForName; |
| 489 | | extern fn LLVMGetEnumAttributeKindForName(Name: [*]const u8, SLen: usize) c_uint; |
| 490 | | |
| 491 | | pub const getInlineAsm = LLVMGetInlineAsm; |
| 492 | | extern fn LLVMGetInlineAsm( |
| 493 | | Ty: *Type, |
| 494 | | AsmString: [*]const u8, |
| 495 | | AsmStringSize: usize, |
| 496 | | Constraints: [*]const u8, |
| 497 | | ConstraintsSize: usize, |
| 498 | | HasSideEffects: Bool, |
| 499 | | IsAlignStack: Bool, |
| 500 | | Dialect: InlineAsmDialect, |
| 501 | | CanThrow: Bool, |
| 502 | | ) *Value; |
| 503 | | |
| 504 | | pub const functionType = LLVMFunctionType; |
| 505 | | extern fn LLVMFunctionType( |
| 506 | | ReturnType: *Type, |
| 507 | | ParamTypes: [*]const *Type, |
| 508 | | ParamCount: c_uint, |
| 509 | | IsVarArg: Bool, |
| 510 | | ) *Type; |
| 511 | | |
| 512 | | pub const InlineAsmDialect = enum(c_uint) { ATT, Intel }; |
| 513 | | |
| 514 | | pub const Attribute = opaque {}; |
| 515 | | |
| 516 | | pub const Builder = opaque { |
| 517 | | pub const dispose = LLVMDisposeBuilder; |
| 518 | | extern fn LLVMDisposeBuilder(Builder: *Builder) void; |
| 519 | | |
| 520 | | pub const positionBuilder = LLVMPositionBuilder; |
| 521 | | extern fn LLVMPositionBuilder( |
| 522 | | Builder: *Builder, |
| 523 | | Block: *BasicBlock, |
| 524 | | Instr: ?*Value, |
| 525 | | ) void; |
| 526 | | |
| 527 | | pub const buildZExt = LLVMBuildZExt; |
| 528 | | extern fn LLVMBuildZExt( |
| 529 | | *Builder, |
| 530 | | Value: *Value, |
| 531 | | DestTy: *Type, |
| 532 | | Name: [*:0]const u8, |
| 533 | | ) *Value; |
| 534 | | |
| 535 | | pub const buildSExt = LLVMBuildSExt; |
| 536 | | extern fn LLVMBuildSExt( |
| 537 | | *Builder, |
| 538 | | Val: *Value, |
| 539 | | DestTy: *Type, |
| 540 | | Name: [*:0]const u8, |
| 541 | | ) *Value; |
| 542 | | |
| 543 | | pub const buildCall = LLVMBuildCall2; |
| 544 | | extern fn LLVMBuildCall2( |
| 545 | | *Builder, |
| 546 | | *Type, |
| 547 | | Fn: *Value, |
| 548 | | Args: [*]const *Value, |
| 549 | | NumArgs: c_uint, |
| 550 | | Name: [*:0]const u8, |
| 551 | | ) *Value; |
| 552 | | |
| 553 | | pub const buildRetVoid = LLVMBuildRetVoid; |
| 554 | | extern fn LLVMBuildRetVoid(*Builder) *Value; |
| 555 | | |
| 556 | | pub const buildRet = LLVMBuildRet; |
| 557 | | extern fn LLVMBuildRet(*Builder, V: *Value) *Value; |
| 558 | | |
| 559 | | pub const buildUnreachable = LLVMBuildUnreachable; |
| 560 | | extern fn LLVMBuildUnreachable(*Builder) *Value; |
| 561 | | |
| 562 | | pub const buildAlloca = LLVMBuildAlloca; |
| 563 | | extern fn LLVMBuildAlloca(*Builder, Ty: *Type, Name: [*:0]const u8) *Value; |
| 564 | | |
| 565 | | pub const buildStore = LLVMBuildStore; |
| 566 | | extern fn LLVMBuildStore(*Builder, Val: *Value, Ptr: *Value) *Value; |
| 567 | | |
| 568 | | pub const buildLoad = LLVMBuildLoad2; |
| 569 | | extern fn LLVMBuildLoad2(*Builder, Ty: *Type, PointerVal: *Value, Name: [*:0]const u8) *Value; |
| 570 | | |
| 571 | | pub const buildFAdd = LLVMBuildFAdd; |
| 572 | | extern fn LLVMBuildFAdd(*Builder, LHS: *Value, RHS: *Value, Name: [*:0]const u8) *Value; |
| 573 | | |
| 574 | | pub const buildAdd = LLVMBuildAdd; |
| 575 | | extern fn LLVMBuildAdd(*Builder, LHS: *Value, RHS: *Value, Name: [*:0]const u8) *Value; |
| 576 | | |
| 577 | | pub const buildNSWAdd = LLVMBuildNSWAdd; |
| 578 | | extern fn LLVMBuildNSWAdd(*Builder, LHS: *Value, RHS: *Value, Name: [*:0]const u8) *Value; |
| 579 | | |
| 580 | | pub const buildNUWAdd = LLVMBuildNUWAdd; |
| 581 | | extern fn LLVMBuildNUWAdd(*Builder, LHS: *Value, RHS: *Value, Name: [*:0]const u8) *Value; |
| 582 | | |
| 583 | | pub const buildFSub = LLVMBuildFSub; |
| 584 | | extern fn LLVMBuildFSub(*Builder, LHS: *Value, RHS: *Value, Name: [*:0]const u8) *Value; |
| 585 | | |
| 586 | | pub const buildFNeg = LLVMBuildFNeg; |
| 587 | | extern fn LLVMBuildFNeg(*Builder, V: *Value, Name: [*:0]const u8) *Value; |
| 588 | | |
| 589 | | pub const buildSub = LLVMBuildSub; |
| 590 | | extern fn LLVMBuildSub(*Builder, LHS: *Value, RHS: *Value, Name: [*:0]const u8) *Value; |
| 591 | | |
| 592 | | pub const buildNSWSub = LLVMBuildNSWSub; |
| 593 | | extern fn LLVMBuildNSWSub(*Builder, LHS: *Value, RHS: *Value, Name: [*:0]const u8) *Value; |
| 594 | | |
| 595 | | pub const buildNUWSub = LLVMBuildNUWSub; |
| 596 | | extern fn LLVMBuildNUWSub(*Builder, LHS: *Value, RHS: *Value, Name: [*:0]const u8) *Value; |
| 597 | | |
| 598 | | pub const buildFMul = LLVMBuildFMul; |
| 599 | | extern fn LLVMBuildFMul(*Builder, LHS: *Value, RHS: *Value, Name: [*:0]const u8) *Value; |
| 600 | | |
| 601 | | pub const buildMul = LLVMBuildMul; |
| 602 | | extern fn LLVMBuildMul(*Builder, LHS: *Value, RHS: *Value, Name: [*:0]const u8) *Value; |
| 603 | | |
| 604 | | pub const buildNSWMul = LLVMBuildNSWMul; |
| 605 | | extern fn LLVMBuildNSWMul(*Builder, LHS: *Value, RHS: *Value, Name: [*:0]const u8) *Value; |
| 606 | | |
| 607 | | pub const buildNUWMul = LLVMBuildNUWMul; |
| 608 | | extern fn LLVMBuildNUWMul(*Builder, LHS: *Value, RHS: *Value, Name: [*:0]const u8) *Value; |
| 609 | | |
| 610 | | pub const buildUDiv = LLVMBuildUDiv; |
| 611 | | extern fn LLVMBuildUDiv(*Builder, LHS: *Value, RHS: *Value, Name: [*:0]const u8) *Value; |
| 612 | | |
| 613 | | pub const buildSDiv = LLVMBuildSDiv; |
| 614 | | extern fn LLVMBuildSDiv(*Builder, LHS: *Value, RHS: *Value, Name: [*:0]const u8) *Value; |
| 615 | | |
| 616 | | pub const buildFDiv = LLVMBuildFDiv; |
| 617 | | extern fn LLVMBuildFDiv(*Builder, LHS: *Value, RHS: *Value, Name: [*:0]const u8) *Value; |
| 618 | | |
| 619 | | pub const buildURem = LLVMBuildURem; |
| 620 | | extern fn LLVMBuildURem(*Builder, LHS: *Value, RHS: *Value, Name: [*:0]const u8) *Value; |
| 621 | | |
| 622 | | pub const buildSRem = LLVMBuildSRem; |
| 623 | | extern fn LLVMBuildSRem(*Builder, LHS: *Value, RHS: *Value, Name: [*:0]const u8) *Value; |
| 624 | | |
| 625 | | pub const buildFRem = LLVMBuildFRem; |
| 626 | | extern fn LLVMBuildFRem(*Builder, LHS: *Value, RHS: *Value, Name: [*:0]const u8) *Value; |
| 627 | | |
| 628 | | pub const buildAnd = LLVMBuildAnd; |
| 629 | | extern fn LLVMBuildAnd(*Builder, LHS: *Value, RHS: *Value, Name: [*:0]const u8) *Value; |
| 630 | | |
| 631 | | pub const buildLShr = LLVMBuildLShr; |
| 632 | | extern fn LLVMBuildLShr(*Builder, LHS: *Value, RHS: *Value, Name: [*:0]const u8) *Value; |
| 633 | | |
| 634 | | pub const buildAShr = LLVMBuildAShr; |
| 635 | | extern fn LLVMBuildAShr(*Builder, LHS: *Value, RHS: *Value, Name: [*:0]const u8) *Value; |
| 636 | | |
| 637 | | pub const buildLShrExact = ZigLLVMBuildLShrExact; |
| 638 | | extern fn ZigLLVMBuildLShrExact(*Builder, LHS: *Value, RHS: *Value, Name: [*:0]const u8) *Value; |
| 639 | | |
| 640 | | pub const buildAShrExact = ZigLLVMBuildAShrExact; |
| 641 | | extern fn ZigLLVMBuildAShrExact(*Builder, LHS: *Value, RHS: *Value, Name: [*:0]const u8) *Value; |
| 642 | | |
| 643 | | pub const buildShl = LLVMBuildShl; |
| 644 | | extern fn LLVMBuildShl(*Builder, LHS: *Value, RHS: *Value, Name: [*:0]const u8) *Value; |
| 645 | | |
| 646 | | pub const buildNUWShl = ZigLLVMBuildNUWShl; |
| 647 | | extern fn ZigLLVMBuildNUWShl(*Builder, LHS: *Value, RHS: *Value, Name: [*:0]const u8) *Value; |
| 648 | | |
| 649 | | pub const buildNSWShl = ZigLLVMBuildNSWShl; |
| 650 | | extern fn ZigLLVMBuildNSWShl(*Builder, LHS: *Value, RHS: *Value, Name: [*:0]const u8) *Value; |
| 651 | | |
| 652 | | pub const buildOr = LLVMBuildOr; |
| 653 | | extern fn LLVMBuildOr(*Builder, LHS: *Value, RHS: *Value, Name: [*:0]const u8) *Value; |
| 654 | | |
| 655 | | pub const buildXor = LLVMBuildXor; |
| 656 | | extern fn LLVMBuildXor(*Builder, LHS: *Value, RHS: *Value, Name: [*:0]const u8) *Value; |
| 657 | | |
| 658 | | pub const buildBitCast = LLVMBuildBitCast; |
| 659 | | extern fn LLVMBuildBitCast(*Builder, Val: *Value, DestTy: *Type, Name: [*:0]const u8) *Value; |
| 660 | | |
| 661 | | pub const buildGEP = LLVMBuildGEP2; |
| 662 | | extern fn LLVMBuildGEP2( |
| 663 | | B: *Builder, |
| 664 | | Ty: *Type, |
| 665 | | Pointer: *Value, |
| 666 | | Indices: [*]const *Value, |
| 667 | | NumIndices: c_uint, |
| 668 | | Name: [*:0]const u8, |
| 669 | | ) *Value; |
| 670 | | |
| 671 | | pub const buildInBoundsGEP = LLVMBuildInBoundsGEP2; |
| 672 | | extern fn LLVMBuildInBoundsGEP2( |
| 673 | | B: *Builder, |
| 674 | | Ty: *Type, |
| 675 | | Pointer: *Value, |
| 676 | | Indices: [*]const *Value, |
| 677 | | NumIndices: c_uint, |
| 678 | | Name: [*:0]const u8, |
| 679 | | ) *Value; |
| 680 | | |
| 681 | | pub const buildICmp = LLVMBuildICmp; |
| 682 | | extern fn LLVMBuildICmp(*Builder, Op: IntPredicate, LHS: *Value, RHS: *Value, Name: [*:0]const u8) *Value; |
| 683 | | |
| 684 | | pub const buildFCmp = LLVMBuildFCmp; |
| 685 | | extern fn LLVMBuildFCmp(*Builder, Op: RealPredicate, LHS: *Value, RHS: *Value, Name: [*:0]const u8) *Value; |
| 686 | | |
| 687 | | pub const buildBr = LLVMBuildBr; |
| 688 | | extern fn LLVMBuildBr(*Builder, Dest: *BasicBlock) *Value; |
| 689 | | |
| 690 | | pub const buildCondBr = LLVMBuildCondBr; |
| 691 | | extern fn LLVMBuildCondBr(*Builder, If: *Value, Then: *BasicBlock, Else: *BasicBlock) *Value; |
| 692 | | |
| 693 | | pub const buildSwitch = LLVMBuildSwitch; |
| 694 | | extern fn LLVMBuildSwitch(*Builder, V: *Value, Else: *BasicBlock, NumCases: c_uint) *Value; |
| 695 | | |
| 696 | | pub const buildPhi = LLVMBuildPhi; |
| 697 | | extern fn LLVMBuildPhi(*Builder, Ty: *Type, Name: [*:0]const u8) *Value; |
| 698 | | |
| 699 | | pub const buildExtractValue = LLVMBuildExtractValue; |
| 700 | | extern fn LLVMBuildExtractValue( |
| 701 | | *Builder, |
| 702 | | AggVal: *Value, |
| 703 | | Index: c_uint, |
| 704 | | Name: [*:0]const u8, |
| 705 | | ) *Value; |
| 706 | | |
| 707 | | pub const buildExtractElement = LLVMBuildExtractElement; |
| 708 | | extern fn LLVMBuildExtractElement( |
| 709 | | *Builder, |
| 710 | | VecVal: *Value, |
| 711 | | Index: *Value, |
| 712 | | Name: [*:0]const u8, |
| 713 | | ) *Value; |
| 714 | | |
| 715 | | pub const buildInsertElement = LLVMBuildInsertElement; |
| 716 | | extern fn LLVMBuildInsertElement( |
| 717 | | *Builder, |
| 718 | | VecVal: *Value, |
| 719 | | EltVal: *Value, |
| 720 | | Index: *Value, |
| 721 | | Name: [*:0]const u8, |
| 722 | | ) *Value; |
| 723 | | |
| 724 | | pub const buildPtrToInt = LLVMBuildPtrToInt; |
| 725 | | extern fn LLVMBuildPtrToInt( |
| 726 | | *Builder, |
| 727 | | Val: *Value, |
| 728 | | DestTy: *Type, |
| 729 | | Name: [*:0]const u8, |
| 730 | | ) *Value; |
| 731 | | |
| 732 | | pub const buildIntToPtr = LLVMBuildIntToPtr; |
| 733 | | extern fn LLVMBuildIntToPtr( |
| 734 | | *Builder, |
| 735 | | Val: *Value, |
| 736 | | DestTy: *Type, |
| 737 | | Name: [*:0]const u8, |
| 738 | | ) *Value; |
| 739 | | |
| 740 | | pub const buildTrunc = LLVMBuildTrunc; |
| 741 | | extern fn LLVMBuildTrunc( |
| 742 | | *Builder, |
| 743 | | Val: *Value, |
| 744 | | DestTy: *Type, |
| 745 | | Name: [*:0]const u8, |
| 746 | | ) *Value; |
| 747 | | |
| 748 | | pub const buildInsertValue = LLVMBuildInsertValue; |
| 749 | | extern fn LLVMBuildInsertValue( |
| 750 | | *Builder, |
| 751 | | AggVal: *Value, |
| 752 | | EltVal: *Value, |
| 753 | | Index: c_uint, |
| 754 | | Name: [*:0]const u8, |
| 755 | | ) *Value; |
| 756 | | |
| 757 | | pub const buildAtomicCmpXchg = LLVMBuildAtomicCmpXchg; |
| 758 | | extern fn LLVMBuildAtomicCmpXchg( |
| 759 | | builder: *Builder, |
| 760 | | ptr: *Value, |
| 761 | | cmp: *Value, |
| 762 | | new_val: *Value, |
| 763 | | success_ordering: AtomicOrdering, |
| 764 | | failure_ordering: AtomicOrdering, |
| 765 | | is_single_threaded: Bool, |
| 766 | | ) *Value; |
| 767 | | |
| 768 | | pub const buildSelect = LLVMBuildSelect; |
| 769 | | extern fn LLVMBuildSelect( |
| 770 | | *Builder, |
| 771 | | If: *Value, |
| 772 | | Then: *Value, |
| 773 | | Else: *Value, |
| 774 | | Name: [*:0]const u8, |
| 775 | | ) *Value; |
| 776 | | |
| 777 | | pub const buildFence = LLVMBuildFence; |
| 778 | | extern fn LLVMBuildFence( |
| 779 | | B: *Builder, |
| 780 | | ordering: AtomicOrdering, |
| 781 | | singleThread: Bool, |
| 782 | | Name: [*:0]const u8, |
| 783 | | ) *Value; |
| 784 | | |
| 785 | | pub const buildAtomicRmw = LLVMBuildAtomicRMW; |
| 786 | | extern fn LLVMBuildAtomicRMW( |
| 787 | | B: *Builder, |
| 788 | | op: AtomicRMWBinOp, |
| 789 | | PTR: *Value, |
| 790 | | Val: *Value, |
| 791 | | ordering: AtomicOrdering, |
| 792 | | singleThread: Bool, |
| 793 | | ) *Value; |
| 794 | | |
| 795 | | pub const buildFPToUI = LLVMBuildFPToUI; |
| 796 | | extern fn LLVMBuildFPToUI( |
| 797 | | *Builder, |
| 798 | | Val: *Value, |
| 799 | | DestTy: *Type, |
| 800 | | Name: [*:0]const u8, |
| 801 | | ) *Value; |
| 802 | | |
| 803 | | pub const buildFPToSI = LLVMBuildFPToSI; |
| 804 | | extern fn LLVMBuildFPToSI( |
| 805 | | *Builder, |
| 806 | | Val: *Value, |
| 807 | | DestTy: *Type, |
| 808 | | Name: [*:0]const u8, |
| 809 | | ) *Value; |
| 810 | | |
| 811 | | pub const buildUIToFP = LLVMBuildUIToFP; |
| 812 | | extern fn LLVMBuildUIToFP( |
| 813 | | *Builder, |
| 814 | | Val: *Value, |
| 815 | | DestTy: *Type, |
| 816 | | Name: [*:0]const u8, |
| 817 | | ) *Value; |
| 818 | | |
| 819 | | pub const buildSIToFP = LLVMBuildSIToFP; |
| 820 | | extern fn LLVMBuildSIToFP( |
| 821 | | *Builder, |
| 822 | | Val: *Value, |
| 823 | | DestTy: *Type, |
| 824 | | Name: [*:0]const u8, |
| 825 | | ) *Value; |
| 826 | | |
| 827 | | pub const buildFPTrunc = LLVMBuildFPTrunc; |
| 828 | | extern fn LLVMBuildFPTrunc( |
| 829 | | *Builder, |
| 830 | | Val: *Value, |
| 831 | | DestTy: *Type, |
| 832 | | Name: [*:0]const u8, |
| 833 | | ) *Value; |
| 834 | | |
| 835 | | pub const buildFPExt = LLVMBuildFPExt; |
| 836 | | extern fn LLVMBuildFPExt( |
| 837 | | *Builder, |
| 838 | | Val: *Value, |
| 839 | | DestTy: *Type, |
| 840 | | Name: [*:0]const u8, |
| 841 | | ) *Value; |
| 842 | | |
| 843 | | pub const buildExactUDiv = LLVMBuildExactUDiv; |
| 844 | | extern fn LLVMBuildExactUDiv(*Builder, LHS: *Value, RHS: *Value, Name: [*:0]const u8) *Value; |
| 845 | | |
| 846 | | pub const buildExactSDiv = LLVMBuildExactSDiv; |
| 847 | | extern fn LLVMBuildExactSDiv(*Builder, LHS: *Value, RHS: *Value, Name: [*:0]const u8) *Value; |
| 848 | | |
| 849 | | pub const setCurrentDebugLocation = ZigLLVMSetCurrentDebugLocation2; |
| 850 | | extern fn ZigLLVMSetCurrentDebugLocation2(builder: *Builder, line: c_uint, column: c_uint, scope: *DIScope, inlined_at: ?*DILocation) void; |
| 851 | | |
| 852 | | pub const clearCurrentDebugLocation = ZigLLVMClearCurrentDebugLocation; |
| 853 | | extern fn ZigLLVMClearCurrentDebugLocation(builder: *Builder) void; |
| 854 | | |
| 855 | | pub const getCurrentDebugLocation2 = LLVMGetCurrentDebugLocation2; |
| 856 | | extern fn LLVMGetCurrentDebugLocation2(Builder: *Builder) *Metadata; |
| 857 | | |
| 858 | | pub const setCurrentDebugLocation2 = LLVMSetCurrentDebugLocation2; |
| 859 | | extern fn LLVMSetCurrentDebugLocation2(Builder: *Builder, Loc: *Metadata) void; |
| 860 | | |
| 861 | | pub const buildShuffleVector = LLVMBuildShuffleVector; |
| 862 | | extern fn LLVMBuildShuffleVector(*Builder, V1: *Value, V2: *Value, Mask: *Value, Name: [*:0]const u8) *Value; |
| 863 | | |
| 864 | | pub const setFastMath = ZigLLVMSetFastMath; |
| 865 | | extern fn ZigLLVMSetFastMath(B: *Builder, on_state: bool) void; |
| 866 | | |
| 867 | | pub const buildAddrSpaceCast = LLVMBuildAddrSpaceCast; |
| 868 | | extern fn LLVMBuildAddrSpaceCast(B: *Builder, Val: *Value, DestTy: *Type, Name: [*:0]const u8) *Value; |
| 869 | | |
| 870 | | pub const buildAllocaInAddressSpace = ZigLLVMBuildAllocaInAddressSpace; |
| 871 | | extern fn ZigLLVMBuildAllocaInAddressSpace(B: *Builder, Ty: *Type, AddressSpace: c_uint, Name: [*:0]const u8) *Value; |
| 872 | | |
| 873 | | pub const buildVAArg = LLVMBuildVAArg; |
| 874 | | extern fn LLVMBuildVAArg(*Builder, List: *Value, Ty: *Type, Name: [*:0]const u8) *Value; |
| 875 | | }; |
| 876 | | |
| 877 | | pub const MDString = opaque { |
| 878 | | pub const get = LLVMMDStringInContext2; |
| 879 | | extern fn LLVMMDStringInContext2(C: *Context, Str: [*]const u8, SLen: usize) *MDString; |
| 880 | | }; |
| 881 | | |
| 882 | | pub const DIScope = opaque { |
| 883 | | pub const toNode = ZigLLVMScopeToNode; |
| 884 | | extern fn ZigLLVMScopeToNode(scope: *DIScope) *DINode; |
| 885 | | }; |
| 886 | | |
| 887 | | pub const DINode = opaque {}; |
| 888 | | pub const Metadata = opaque {}; |
| 889 | | |
| 890 | | pub const IntPredicate = enum(c_uint) { |
| 891 | | EQ = 32, |
| 892 | | NE = 33, |
| 893 | | UGT = 34, |
| 894 | | UGE = 35, |
| 895 | | ULT = 36, |
| 896 | | ULE = 37, |
| 897 | | SGT = 38, |
| 898 | | SGE = 39, |
| 899 | | SLT = 40, |
| 900 | | SLE = 41, |
| 901 | | }; |
| 902 | | |
| 903 | | pub const RealPredicate = enum(c_uint) { |
| 904 | | OEQ = 1, |
| 905 | | OGT = 2, |
| 906 | | OGE = 3, |
| 907 | | OLT = 4, |
| 908 | | OLE = 5, |
| 909 | | ONE = 6, |
| 910 | | ORD = 7, |
| 911 | | UNO = 8, |
| 912 | | UEQ = 9, |
| 913 | | UGT = 10, |
| 914 | | UGE = 11, |
| 915 | | ULT = 12, |
| 916 | | ULE = 13, |
| 917 | | UNE = 14, |
| 918 | | }; |
| 919 | | |
| 920 | | pub const BasicBlock = opaque { |
| 921 | | pub const deleteBasicBlock = LLVMDeleteBasicBlock; |
| 922 | | extern fn LLVMDeleteBasicBlock(BB: *BasicBlock) void; |
| 923 | | }; |
| 924 | | |
| 925 | 59 | pub const TargetMachine = opaque { |
| 926 | 60 | pub const create = ZigLLVMCreateTargetMachine; |
| 927 | 61 | extern fn ZigLLVMCreateTargetMachine( |
| ... | ... | @@ -956,23 +90,11 @@ pub const TargetMachine = opaque { |
| 956 | 90 | llvm_ir_filename: ?[*:0]const u8, |
| 957 | 91 | bitcode_filename: ?[*:0]const u8, |
| 958 | 92 | ) bool; |
| 959 | | |
| 960 | | pub const createTargetDataLayout = LLVMCreateTargetDataLayout; |
| 961 | | extern fn LLVMCreateTargetDataLayout(*TargetMachine) *TargetData; |
| 962 | 93 | }; |
| 963 | 94 | |
| 964 | 95 | pub const TargetData = opaque { |
| 965 | 96 | pub const dispose = LLVMDisposeTargetData; |
| 966 | 97 | extern fn LLVMDisposeTargetData(*TargetData) void; |
| 967 | | |
| 968 | | pub const abiAlignmentOfType = LLVMABIAlignmentOfType; |
| 969 | | extern fn LLVMABIAlignmentOfType(TD: *TargetData, Ty: *Type) c_uint; |
| 970 | | |
| 971 | | pub const abiSizeOfType = LLVMABISizeOfType; |
| 972 | | extern fn LLVMABISizeOfType(TD: *TargetData, Ty: *Type) c_ulonglong; |
| 973 | | |
| 974 | | pub const stringRep = LLVMCopyStringRepOfTargetData; |
| 975 | | extern fn LLVMCopyStringRepOfTargetData(TD: *TargetData) [*:0]const u8; |
| 976 | 98 | }; |
| 977 | 99 | |
| 978 | 100 | pub const CodeModel = enum(c_int) { |
| ... | ... | @@ -1002,11 +124,6 @@ pub const RelocMode = enum(c_int) { |
| 1002 | 124 | ROPI_RWPI, |
| 1003 | 125 | }; |
| 1004 | 126 | |
| 1005 | | pub const CodeGenFileType = enum(c_int) { |
| 1006 | | AssemblyFile, |
| 1007 | | ObjectFile, |
| 1008 | | }; |
| 1009 | | |
| 1010 | 127 | pub const ABIType = enum(c_int) { |
| 1011 | 128 | /// Target-specific (either soft or hard depending on triple, etc). |
| 1012 | 129 | Default, |
| ... | ... | @@ -1278,541 +395,6 @@ extern fn ZigLLVMWriteImportLibrary( |
| 1278 | 395 | kill_at: bool, |
| 1279 | 396 | ) bool; |
| 1280 | 397 | |
| 1281 | | pub const Linkage = enum(c_uint) { |
| 1282 | | External, |
| 1283 | | AvailableExternally, |
| 1284 | | LinkOnceAny, |
| 1285 | | LinkOnceODR, |
| 1286 | | LinkOnceODRAutoHide, |
| 1287 | | WeakAny, |
| 1288 | | WeakODR, |
| 1289 | | Appending, |
| 1290 | | Internal, |
| 1291 | | Private, |
| 1292 | | DLLImport, |
| 1293 | | DLLExport, |
| 1294 | | ExternalWeak, |
| 1295 | | Ghost, |
| 1296 | | Common, |
| 1297 | | LinkerPrivate, |
| 1298 | | LinkerPrivateWeak, |
| 1299 | | }; |
| 1300 | | |
| 1301 | | pub const Visibility = enum(c_uint) { |
| 1302 | | Default, |
| 1303 | | Hidden, |
| 1304 | | Protected, |
| 1305 | | }; |
| 1306 | | |
| 1307 | | pub const ThreadLocalMode = enum(c_uint) { |
| 1308 | | NotThreadLocal, |
| 1309 | | GeneralDynamicTLSModel, |
| 1310 | | LocalDynamicTLSModel, |
| 1311 | | InitialExecTLSModel, |
| 1312 | | LocalExecTLSModel, |
| 1313 | | }; |
| 1314 | | |
| 1315 | | pub const AtomicOrdering = enum(c_uint) { |
| 1316 | | NotAtomic = 0, |
| 1317 | | Unordered = 1, |
| 1318 | | Monotonic = 2, |
| 1319 | | Acquire = 4, |
| 1320 | | Release = 5, |
| 1321 | | AcquireRelease = 6, |
| 1322 | | SequentiallyConsistent = 7, |
| 1323 | | }; |
| 1324 | | |
| 1325 | | pub const AtomicRMWBinOp = enum(c_int) { |
| 1326 | | Xchg, |
| 1327 | | Add, |
| 1328 | | Sub, |
| 1329 | | And, |
| 1330 | | Nand, |
| 1331 | | Or, |
| 1332 | | Xor, |
| 1333 | | Max, |
| 1334 | | Min, |
| 1335 | | UMax, |
| 1336 | | UMin, |
| 1337 | | FAdd, |
| 1338 | | FSub, |
| 1339 | | FMax, |
| 1340 | | FMin, |
| 1341 | | }; |
| 1342 | | |
| 1343 | | pub const CallConv = enum(c_uint) { |
| 1344 | | C = 0, |
| 1345 | | Fast = 8, |
| 1346 | | Cold = 9, |
| 1347 | | GHC = 10, |
| 1348 | | HiPE = 11, |
| 1349 | | WebKit_JS = 12, |
| 1350 | | AnyReg = 13, |
| 1351 | | PreserveMost = 14, |
| 1352 | | PreserveAll = 15, |
| 1353 | | Swift = 16, |
| 1354 | | CXX_FAST_TLS = 17, |
| 1355 | | |
| 1356 | | X86_StdCall = 64, |
| 1357 | | X86_FastCall = 65, |
| 1358 | | ARM_APCS = 66, |
| 1359 | | ARM_AAPCS = 67, |
| 1360 | | ARM_AAPCS_VFP = 68, |
| 1361 | | MSP430_INTR = 69, |
| 1362 | | X86_ThisCall = 70, |
| 1363 | | PTX_Kernel = 71, |
| 1364 | | PTX_Device = 72, |
| 1365 | | SPIR_FUNC = 75, |
| 1366 | | SPIR_KERNEL = 76, |
| 1367 | | Intel_OCL_BI = 77, |
| 1368 | | X86_64_SysV = 78, |
| 1369 | | Win64 = 79, |
| 1370 | | X86_VectorCall = 80, |
| 1371 | | HHVM = 81, |
| 1372 | | HHVM_C = 82, |
| 1373 | | X86_INTR = 83, |
| 1374 | | AVR_INTR = 84, |
| 1375 | | AVR_SIGNAL = 85, |
| 1376 | | AVR_BUILTIN = 86, |
| 1377 | | AMDGPU_VS = 87, |
| 1378 | | AMDGPU_GS = 88, |
| 1379 | | AMDGPU_PS = 89, |
| 1380 | | AMDGPU_CS = 90, |
| 1381 | | AMDGPU_KERNEL = 91, |
| 1382 | | X86_RegCall = 92, |
| 1383 | | AMDGPU_HS = 93, |
| 1384 | | MSP430_BUILTIN = 94, |
| 1385 | | AMDGPU_LS = 95, |
| 1386 | | AMDGPU_ES = 96, |
| 1387 | | AArch64_VectorCall = 97, |
| 1388 | | }; |
| 1389 | | |
| 1390 | | pub const CallAttr = enum(c_int) { |
| 1391 | | Auto, |
| 1392 | | NeverTail, |
| 1393 | | NeverInline, |
| 1394 | | AlwaysTail, |
| 1395 | | AlwaysInline, |
| 1396 | | }; |
| 1397 | | |
| 1398 | | pub const TailCallKind = enum(c_uint) { |
| 1399 | | None, |
| 1400 | | Tail, |
| 1401 | | MustTail, |
| 1402 | | NoTail, |
| 1403 | | }; |
| 1404 | | |
| 1405 | | pub const DLLStorageClass = enum(c_uint) { |
| 1406 | | Default, |
| 1407 | | DLLImport, |
| 1408 | | DLLExport, |
| 1409 | | }; |
| 1410 | | |
| 1411 | | pub const address_space = struct { |
| 1412 | | pub const default: c_uint = 0; |
| 1413 | | |
| 1414 | | // See llvm/lib/Target/X86/X86.h |
| 1415 | | pub const x86_64 = x86; |
| 1416 | | pub const x86 = struct { |
| 1417 | | pub const gs: c_uint = 256; |
| 1418 | | pub const fs: c_uint = 257; |
| 1419 | | pub const ss: c_uint = 258; |
| 1420 | | |
| 1421 | | pub const ptr32_sptr: c_uint = 270; |
| 1422 | | pub const ptr32_uptr: c_uint = 271; |
| 1423 | | pub const ptr64: c_uint = 272; |
| 1424 | | }; |
| 1425 | | |
| 1426 | | // See llvm/lib/Target/AVR/AVR.h |
| 1427 | | pub const avr = struct { |
| 1428 | | pub const flash: c_uint = 1; |
| 1429 | | pub const flash1: c_uint = 2; |
| 1430 | | pub const flash2: c_uint = 3; |
| 1431 | | pub const flash3: c_uint = 4; |
| 1432 | | pub const flash4: c_uint = 5; |
| 1433 | | pub const flash5: c_uint = 6; |
| 1434 | | }; |
| 1435 | | |
| 1436 | | // See llvm/lib/Target/NVPTX/NVPTX.h |
| 1437 | | pub const nvptx = struct { |
| 1438 | | pub const generic: c_uint = 0; |
| 1439 | | pub const global: c_uint = 1; |
| 1440 | | pub const constant: c_uint = 2; |
| 1441 | | pub const shared: c_uint = 3; |
| 1442 | | pub const param: c_uint = 4; |
| 1443 | | pub const local: c_uint = 5; |
| 1444 | | }; |
| 1445 | | |
| 1446 | | // See llvm/lib/Target/AMDGPU/AMDGPU.h |
| 1447 | | pub const amdgpu = struct { |
| 1448 | | pub const flat: c_uint = 0; |
| 1449 | | pub const global: c_uint = 1; |
| 1450 | | pub const region: c_uint = 2; |
| 1451 | | pub const local: c_uint = 3; |
| 1452 | | pub const constant: c_uint = 4; |
| 1453 | | pub const private: c_uint = 5; |
| 1454 | | pub const constant_32bit: c_uint = 6; |
| 1455 | | pub const buffer_fat_pointer: c_uint = 7; |
| 1456 | | pub const param_d: c_uint = 6; |
| 1457 | | pub const param_i: c_uint = 7; |
| 1458 | | pub const constant_buffer_0: c_uint = 8; |
| 1459 | | pub const constant_buffer_1: c_uint = 9; |
| 1460 | | pub const constant_buffer_2: c_uint = 10; |
| 1461 | | pub const constant_buffer_3: c_uint = 11; |
| 1462 | | pub const constant_buffer_4: c_uint = 12; |
| 1463 | | pub const constant_buffer_5: c_uint = 13; |
| 1464 | | pub const constant_buffer_6: c_uint = 14; |
| 1465 | | pub const constant_buffer_7: c_uint = 15; |
| 1466 | | pub const constant_buffer_8: c_uint = 16; |
| 1467 | | pub const constant_buffer_9: c_uint = 17; |
| 1468 | | pub const constant_buffer_10: c_uint = 18; |
| 1469 | | pub const constant_buffer_11: c_uint = 19; |
| 1470 | | pub const constant_buffer_12: c_uint = 20; |
| 1471 | | pub const constant_buffer_13: c_uint = 21; |
| 1472 | | pub const constant_buffer_14: c_uint = 22; |
| 1473 | | pub const constant_buffer_15: c_uint = 23; |
| 1474 | | }; |
| 1475 | | |
| 1476 | | // See llvm/lib/Target/WebAssembly/Utils/WebAssemblyTypetilities.h |
| 1477 | | pub const wasm = struct { |
| 1478 | | pub const variable: c_uint = 1; |
| 1479 | | pub const externref: c_uint = 10; |
| 1480 | | pub const funcref: c_uint = 20; |
| 1481 | | }; |
| 1482 | | }; |
| 1483 | | |
| 1484 | | pub const DIEnumerator = opaque {}; |
| 1485 | | pub const DILocalVariable = opaque {}; |
| 1486 | | pub const DILocation = opaque {}; |
| 1487 | | pub const DIGlobalExpression = opaque {}; |
| 1488 | | |
| 1489 | | pub const DIGlobalVariable = opaque { |
| 1490 | | pub const toNode = ZigLLVMGlobalVariableToNode; |
| 1491 | | extern fn ZigLLVMGlobalVariableToNode(global_variable: *DIGlobalVariable) *DINode; |
| 1492 | | |
| 1493 | | pub const replaceLinkageName = ZigLLVMGlobalVariableReplaceLinkageName; |
| 1494 | | extern fn ZigLLVMGlobalVariableReplaceLinkageName(global_variable: *DIGlobalVariable, linkage_name: *MDString) void; |
| 1495 | | }; |
| 1496 | | pub const DIGlobalVariableExpression = opaque { |
| 1497 | | pub const getVariable = ZigLLVMGlobalGetVariable; |
| 1498 | | extern fn ZigLLVMGlobalGetVariable(global_variable: *DIGlobalVariableExpression) *DIGlobalVariable; |
| 1499 | | }; |
| 1500 | | pub const DIType = opaque { |
| 1501 | | pub const toScope = ZigLLVMTypeToScope; |
| 1502 | | extern fn ZigLLVMTypeToScope(ty: *DIType) *DIScope; |
| 1503 | | |
| 1504 | | pub const toNode = ZigLLVMTypeToNode; |
| 1505 | | extern fn ZigLLVMTypeToNode(ty: *DIType) *DINode; |
| 1506 | | }; |
| 1507 | | pub const DIFile = opaque { |
| 1508 | | pub const toScope = ZigLLVMFileToScope; |
| 1509 | | extern fn ZigLLVMFileToScope(difile: *DIFile) *DIScope; |
| 1510 | | |
| 1511 | | pub const toNode = ZigLLVMFileToNode; |
| 1512 | | extern fn ZigLLVMFileToNode(difile: *DIFile) *DINode; |
| 1513 | | }; |
| 1514 | | pub const DILexicalBlock = opaque { |
| 1515 | | pub const toScope = ZigLLVMLexicalBlockToScope; |
| 1516 | | extern fn ZigLLVMLexicalBlockToScope(lexical_block: *DILexicalBlock) *DIScope; |
| 1517 | | |
| 1518 | | pub const toNode = ZigLLVMLexicalBlockToNode; |
| 1519 | | extern fn ZigLLVMLexicalBlockToNode(lexical_block: *DILexicalBlock) *DINode; |
| 1520 | | }; |
| 1521 | | pub const DICompileUnit = opaque { |
| 1522 | | pub const toScope = ZigLLVMCompileUnitToScope; |
| 1523 | | extern fn ZigLLVMCompileUnitToScope(compile_unit: *DICompileUnit) *DIScope; |
| 1524 | | |
| 1525 | | pub const toNode = ZigLLVMCompileUnitToNode; |
| 1526 | | extern fn ZigLLVMCompileUnitToNode(compile_unit: *DICompileUnit) *DINode; |
| 1527 | | }; |
| 1528 | | pub const DISubprogram = opaque { |
| 1529 | | pub const toScope = ZigLLVMSubprogramToScope; |
| 1530 | | extern fn ZigLLVMSubprogramToScope(subprogram: *DISubprogram) *DIScope; |
| 1531 | | |
| 1532 | | pub const toNode = ZigLLVMSubprogramToNode; |
| 1533 | | extern fn ZigLLVMSubprogramToNode(subprogram: *DISubprogram) *DINode; |
| 1534 | | |
| 1535 | | pub const replaceLinkageName = ZigLLVMSubprogramReplaceLinkageName; |
| 1536 | | extern fn ZigLLVMSubprogramReplaceLinkageName(subprogram: *DISubprogram, linkage_name: *MDString) void; |
| 1537 | | }; |
| 1538 | | |
| 1539 | | pub const getDebugLoc = ZigLLVMGetDebugLoc2; |
| 1540 | | extern fn ZigLLVMGetDebugLoc2(line: c_uint, col: c_uint, scope: *DIScope, inlined_at: ?*DILocation) *DILocation; |
| 1541 | | |
| 1542 | | pub const DIBuilder = opaque { |
| 1543 | | pub const dispose = ZigLLVMDisposeDIBuilder; |
| 1544 | | extern fn ZigLLVMDisposeDIBuilder(dib: *DIBuilder) void; |
| 1545 | | |
| 1546 | | pub const finalize = ZigLLVMDIBuilderFinalize; |
| 1547 | | extern fn ZigLLVMDIBuilderFinalize(dib: *DIBuilder) void; |
| 1548 | | |
| 1549 | | pub const createPointerType = ZigLLVMCreateDebugPointerType; |
| 1550 | | extern fn ZigLLVMCreateDebugPointerType( |
| 1551 | | dib: *DIBuilder, |
| 1552 | | pointee_type: *DIType, |
| 1553 | | size_in_bits: u64, |
| 1554 | | align_in_bits: u64, |
| 1555 | | name: [*:0]const u8, |
| 1556 | | ) *DIType; |
| 1557 | | |
| 1558 | | pub const createBasicType = ZigLLVMCreateDebugBasicType; |
| 1559 | | extern fn ZigLLVMCreateDebugBasicType( |
| 1560 | | dib: *DIBuilder, |
| 1561 | | name: [*:0]const u8, |
| 1562 | | size_in_bits: u64, |
| 1563 | | encoding: c_uint, |
| 1564 | | ) *DIType; |
| 1565 | | |
| 1566 | | pub const createArrayType = ZigLLVMCreateDebugArrayType; |
| 1567 | | extern fn ZigLLVMCreateDebugArrayType( |
| 1568 | | dib: *DIBuilder, |
| 1569 | | size_in_bits: u64, |
| 1570 | | align_in_bits: u64, |
| 1571 | | elem_type: *DIType, |
| 1572 | | elem_count: i64, |
| 1573 | | ) *DIType; |
| 1574 | | |
| 1575 | | pub const createEnumerator = ZigLLVMCreateDebugEnumerator; |
| 1576 | | extern fn ZigLLVMCreateDebugEnumerator( |
| 1577 | | dib: *DIBuilder, |
| 1578 | | name: [*:0]const u8, |
| 1579 | | val: u64, |
| 1580 | | is_unsigned: bool, |
| 1581 | | ) *DIEnumerator; |
| 1582 | | |
| 1583 | | pub const createEnumerator2 = ZigLLVMCreateDebugEnumeratorOfArbitraryPrecision; |
| 1584 | | extern fn ZigLLVMCreateDebugEnumeratorOfArbitraryPrecision( |
| 1585 | | dib: *DIBuilder, |
| 1586 | | name: [*:0]const u8, |
| 1587 | | num_words: c_uint, |
| 1588 | | words: [*]const u64, |
| 1589 | | bits: c_uint, |
| 1590 | | is_unsigned: bool, |
| 1591 | | ) *DIEnumerator; |
| 1592 | | |
| 1593 | | pub const createEnumerationType = ZigLLVMCreateDebugEnumerationType; |
| 1594 | | extern fn ZigLLVMCreateDebugEnumerationType( |
| 1595 | | dib: *DIBuilder, |
| 1596 | | scope: *DIScope, |
| 1597 | | name: [*:0]const u8, |
| 1598 | | file: *DIFile, |
| 1599 | | line_number: c_uint, |
| 1600 | | size_in_bits: u64, |
| 1601 | | align_in_bits: u64, |
| 1602 | | enumerator_array: [*]const *DIEnumerator, |
| 1603 | | enumerator_array_len: c_int, |
| 1604 | | underlying_type: *DIType, |
| 1605 | | unique_id: [*:0]const u8, |
| 1606 | | ) *DIType; |
| 1607 | | |
| 1608 | | pub const createStructType = ZigLLVMCreateDebugStructType; |
| 1609 | | extern fn ZigLLVMCreateDebugStructType( |
| 1610 | | dib: *DIBuilder, |
| 1611 | | scope: *DIScope, |
| 1612 | | name: [*:0]const u8, |
| 1613 | | file: ?*DIFile, |
| 1614 | | line_number: c_uint, |
| 1615 | | size_in_bits: u64, |
| 1616 | | align_in_bits: u64, |
| 1617 | | flags: c_uint, |
| 1618 | | derived_from: ?*DIType, |
| 1619 | | types_array: [*]const *DIType, |
| 1620 | | types_array_len: c_int, |
| 1621 | | run_time_lang: c_uint, |
| 1622 | | vtable_holder: ?*DIType, |
| 1623 | | unique_id: [*:0]const u8, |
| 1624 | | ) *DIType; |
| 1625 | | |
| 1626 | | pub const createUnionType = ZigLLVMCreateDebugUnionType; |
| 1627 | | extern fn ZigLLVMCreateDebugUnionType( |
| 1628 | | dib: *DIBuilder, |
| 1629 | | scope: *DIScope, |
| 1630 | | name: [*:0]const u8, |
| 1631 | | file: ?*DIFile, |
| 1632 | | line_number: c_uint, |
| 1633 | | size_in_bits: u64, |
| 1634 | | align_in_bits: u64, |
| 1635 | | flags: c_uint, |
| 1636 | | types_array: [*]const *DIType, |
| 1637 | | types_array_len: c_int, |
| 1638 | | run_time_lang: c_uint, |
| 1639 | | unique_id: [*:0]const u8, |
| 1640 | | ) *DIType; |
| 1641 | | |
| 1642 | | pub const createMemberType = ZigLLVMCreateDebugMemberType; |
| 1643 | | extern fn ZigLLVMCreateDebugMemberType( |
| 1644 | | dib: *DIBuilder, |
| 1645 | | scope: *DIScope, |
| 1646 | | name: [*:0]const u8, |
| 1647 | | file: ?*DIFile, |
| 1648 | | line: c_uint, |
| 1649 | | size_in_bits: u64, |
| 1650 | | align_in_bits: u64, |
| 1651 | | offset_in_bits: u64, |
| 1652 | | flags: c_uint, |
| 1653 | | ty: *DIType, |
| 1654 | | ) *DIType; |
| 1655 | | |
| 1656 | | pub const createReplaceableCompositeType = ZigLLVMCreateReplaceableCompositeType; |
| 1657 | | extern fn ZigLLVMCreateReplaceableCompositeType( |
| 1658 | | dib: *DIBuilder, |
| 1659 | | tag: c_uint, |
| 1660 | | name: [*:0]const u8, |
| 1661 | | scope: *DIScope, |
| 1662 | | file: ?*DIFile, |
| 1663 | | line: c_uint, |
| 1664 | | ) *DIType; |
| 1665 | | |
| 1666 | | pub const createForwardDeclType = ZigLLVMCreateDebugForwardDeclType; |
| 1667 | | extern fn ZigLLVMCreateDebugForwardDeclType( |
| 1668 | | dib: *DIBuilder, |
| 1669 | | tag: c_uint, |
| 1670 | | name: [*:0]const u8, |
| 1671 | | scope: ?*DIScope, |
| 1672 | | file: ?*DIFile, |
| 1673 | | line: c_uint, |
| 1674 | | ) *DIType; |
| 1675 | | |
| 1676 | | pub const replaceTemporary = ZigLLVMReplaceTemporary; |
| 1677 | | extern fn ZigLLVMReplaceTemporary(dib: *DIBuilder, ty: *DIType, replacement: *DIType) void; |
| 1678 | | |
| 1679 | | pub const replaceDebugArrays = ZigLLVMReplaceDebugArrays; |
| 1680 | | extern fn ZigLLVMReplaceDebugArrays( |
| 1681 | | dib: *DIBuilder, |
| 1682 | | ty: *DIType, |
| 1683 | | types_array: [*]const *DIType, |
| 1684 | | types_array_len: c_int, |
| 1685 | | ) void; |
| 1686 | | |
| 1687 | | pub const createSubroutineType = ZigLLVMCreateSubroutineType; |
| 1688 | | extern fn ZigLLVMCreateSubroutineType( |
| 1689 | | dib: *DIBuilder, |
| 1690 | | types_array: [*]const *DIType, |
| 1691 | | types_array_len: c_int, |
| 1692 | | flags: c_uint, |
| 1693 | | ) *DIType; |
| 1694 | | |
| 1695 | | pub const createAutoVariable = ZigLLVMCreateAutoVariable; |
| 1696 | | extern fn ZigLLVMCreateAutoVariable( |
| 1697 | | dib: *DIBuilder, |
| 1698 | | scope: *DIScope, |
| 1699 | | name: [*:0]const u8, |
| 1700 | | file: *DIFile, |
| 1701 | | line_no: c_uint, |
| 1702 | | ty: *DIType, |
| 1703 | | always_preserve: bool, |
| 1704 | | flags: c_uint, |
| 1705 | | ) *DILocalVariable; |
| 1706 | | |
| 1707 | | pub const createGlobalVariableExpression = ZigLLVMCreateGlobalVariableExpression; |
| 1708 | | extern fn ZigLLVMCreateGlobalVariableExpression( |
| 1709 | | dib: *DIBuilder, |
| 1710 | | scope: *DIScope, |
| 1711 | | name: [*:0]const u8, |
| 1712 | | linkage_name: [*:0]const u8, |
| 1713 | | file: *DIFile, |
| 1714 | | line_no: c_uint, |
| 1715 | | di_type: *DIType, |
| 1716 | | is_local_to_unit: bool, |
| 1717 | | ) *DIGlobalVariableExpression; |
| 1718 | | |
| 1719 | | pub const createParameterVariable = ZigLLVMCreateParameterVariable; |
| 1720 | | extern fn ZigLLVMCreateParameterVariable( |
| 1721 | | dib: *DIBuilder, |
| 1722 | | scope: *DIScope, |
| 1723 | | name: [*:0]const u8, |
| 1724 | | file: *DIFile, |
| 1725 | | line_no: c_uint, |
| 1726 | | ty: *DIType, |
| 1727 | | always_preserve: bool, |
| 1728 | | flags: c_uint, |
| 1729 | | arg_no: c_uint, |
| 1730 | | ) *DILocalVariable; |
| 1731 | | |
| 1732 | | pub const createLexicalBlock = ZigLLVMCreateLexicalBlock; |
| 1733 | | extern fn ZigLLVMCreateLexicalBlock( |
| 1734 | | dib: *DIBuilder, |
| 1735 | | scope: *DIScope, |
| 1736 | | file: *DIFile, |
| 1737 | | line: c_uint, |
| 1738 | | col: c_uint, |
| 1739 | | ) *DILexicalBlock; |
| 1740 | | |
| 1741 | | pub const createCompileUnit = ZigLLVMCreateCompileUnit; |
| 1742 | | extern fn ZigLLVMCreateCompileUnit( |
| 1743 | | dib: *DIBuilder, |
| 1744 | | lang: c_uint, |
| 1745 | | difile: *DIFile, |
| 1746 | | producer: [*:0]const u8, |
| 1747 | | is_optimized: bool, |
| 1748 | | flags: [*:0]const u8, |
| 1749 | | runtime_version: c_uint, |
| 1750 | | split_name: [*:0]const u8, |
| 1751 | | dwo_id: u64, |
| 1752 | | emit_debug_info: bool, |
| 1753 | | ) *DICompileUnit; |
| 1754 | | |
| 1755 | | pub const createFile = ZigLLVMCreateFile; |
| 1756 | | extern fn ZigLLVMCreateFile( |
| 1757 | | dib: *DIBuilder, |
| 1758 | | filename: [*:0]const u8, |
| 1759 | | directory: [*:0]const u8, |
| 1760 | | ) *DIFile; |
| 1761 | | |
| 1762 | | pub const createFunction = ZigLLVMCreateFunction; |
| 1763 | | extern fn ZigLLVMCreateFunction( |
| 1764 | | dib: *DIBuilder, |
| 1765 | | scope: *DIScope, |
| 1766 | | name: [*:0]const u8, |
| 1767 | | linkage_name: [*:0]const u8, |
| 1768 | | file: *DIFile, |
| 1769 | | lineno: c_uint, |
| 1770 | | fn_di_type: *DIType, |
| 1771 | | is_local_to_unit: bool, |
| 1772 | | is_definition: bool, |
| 1773 | | scope_line: c_uint, |
| 1774 | | flags: c_uint, |
| 1775 | | is_optimized: bool, |
| 1776 | | decl_subprogram: ?*DISubprogram, |
| 1777 | | ) *DISubprogram; |
| 1778 | | |
| 1779 | | pub const createVectorType = ZigLLVMDIBuilderCreateVectorType; |
| 1780 | | extern fn ZigLLVMDIBuilderCreateVectorType( |
| 1781 | | dib: *DIBuilder, |
| 1782 | | SizeInBits: u64, |
| 1783 | | AlignInBits: u32, |
| 1784 | | Ty: *DIType, |
| 1785 | | elem_count: u32, |
| 1786 | | ) *DIType; |
| 1787 | | |
| 1788 | | pub const insertDeclareAtEnd = ZigLLVMInsertDeclareAtEnd; |
| 1789 | | extern fn ZigLLVMInsertDeclareAtEnd( |
| 1790 | | dib: *DIBuilder, |
| 1791 | | storage: *Value, |
| 1792 | | var_info: *DILocalVariable, |
| 1793 | | debug_loc: *DILocation, |
| 1794 | | basic_block_ref: *BasicBlock, |
| 1795 | | ) *Value; |
| 1796 | | |
| 1797 | | pub const insertDeclare = ZigLLVMInsertDeclare; |
| 1798 | | extern fn ZigLLVMInsertDeclare( |
| 1799 | | dib: *DIBuilder, |
| 1800 | | storage: *Value, |
| 1801 | | var_info: *DILocalVariable, |
| 1802 | | debug_loc: *DILocation, |
| 1803 | | insert_before_instr: *Value, |
| 1804 | | ) *Value; |
| 1805 | | |
| 1806 | | pub const insertDbgValueIntrinsicAtEnd = ZigLLVMInsertDbgValueIntrinsicAtEnd; |
| 1807 | | extern fn ZigLLVMInsertDbgValueIntrinsicAtEnd( |
| 1808 | | dib: *DIBuilder, |
| 1809 | | val: *Value, |
| 1810 | | var_info: *DILocalVariable, |
| 1811 | | debug_loc: *DILocation, |
| 1812 | | basic_block_ref: *BasicBlock, |
| 1813 | | ) *Value; |
| 1814 | | }; |
| 1815 | | |
| 1816 | 398 | pub const DIFlags = opaque { |
| 1817 | 399 | pub const Zero = 0; |
| 1818 | 400 | pub const Private = 1; |