Mark LLVMAttribute as a bitfield, add some missing functions, note URLs for upstreame...
[cl-llvm.git] / src / generated / core.lisp
blobf745d19e7f8a6c944eac35f928ed2af17fdb60ec
1 ;;; This file was automatically generated by SWIG (http://www.swig.org).
2 ;;; Version 1.3.40
3 ;;;
4 ;;; Do not make changes to this file unless you know what you are doing--modify
5 ;;; the SWIG interface file instead.
7 (in-package :llvm)
10 (cffi:defctype uint8_t :unsigned-char)
12 (cffi:defctype LLVMBool :int)
14 (cffi:defctype LLVMContextRef :pointer)
16 (cffi:defctype LLVMModuleRef :pointer)
18 (cffi:defctype LLVMTypeRef :pointer)
20 (cffi:defctype LLVMTypeHandleRef :pointer)
22 (cffi:defctype LLVMValueRef :pointer)
24 (cffi:defctype LLVMBasicBlockRef :pointer)
26 (cffi:defctype LLVMBuilderRef :pointer)
28 (cffi:defctype LLVMModuleProviderRef :pointer)
30 (cffi:defctype LLVMMemoryBufferRef :pointer)
32 (cffi:defctype LLVMPassManagerRef :pointer)
34 (cffi:defctype LLVMUseIteratorRef :pointer)
36 (cffi:defbitfield LLVMAttribute
37 (:LLVMZExtAttribute #.(cl:ash 1 0))
38 (:LLVMSExtAttribute #.(cl:ash 1 1))
39 (:LLVMNoReturnAttribute #.(cl:ash 1 2))
40 (:LLVMInRegAttribute #.(cl:ash 1 3))
41 (:LLVMStructRetAttribute #.(cl:ash 1 4))
42 (:LLVMNoUnwindAttribute #.(cl:ash 1 5))
43 (:LLVMNoAliasAttribute #.(cl:ash 1 6))
44 (:LLVMByValAttribute #.(cl:ash 1 7))
45 (:LLVMNestAttribute #.(cl:ash 1 8))
46 (:LLVMReadNoneAttribute #.(cl:ash 1 9))
47 (:LLVMReadOnlyAttribute #.(cl:ash 1 10))
48 (:LLVMNoInlineAttribute #.(cl:ash 1 11))
49 (:LLVMAlwaysInlineAttribute #.(cl:ash 1 12))
50 (:LLVMOptimizeForSizeAttribute #.(cl:ash 1 13))
51 (:LLVMStackProtectAttribute #.(cl:ash 1 14))
52 (:LLVMStackProtectReqAttribute #.(cl:ash 1 15))
53 (:LLVMNoCaptureAttribute #.(cl:ash 1 21))
54 (:LLVMNoRedZoneAttribute #.(cl:ash 1 22))
55 (:LLVMNoImplicitFloatAttribute #.(cl:ash 1 23))
56 (:LLVMNakedAttribute #.(cl:ash 1 24))
57 (:LLVMInlineHintAttribute #.(cl:ash 1 25)))
59 (cffi:defcenum LLVMOpcode
60 (:LLVMRet #.1)
61 (:LLVMBr #.2)
62 (:LLVMSwitch #.3)
63 (:LLVMInvoke #.4)
64 (:LLVMUnwind #.5)
65 (:LLVMUnreachable #.6)
66 (:LLVMAdd #.7)
67 (:LLVMFAdd #.8)
68 (:LLVMSub #.9)
69 (:LLVMFSub #.10)
70 (:LLVMMul #.11)
71 (:LLVMFMul #.12)
72 (:LLVMUDiv #.13)
73 (:LLVMSDiv #.14)
74 (:LLVMFDiv #.15)
75 (:LLVMURem #.16)
76 (:LLVMSRem #.17)
77 (:LLVMFRem #.18)
78 (:LLVMShl #.19)
79 (:LLVMLShr #.20)
80 (:LLVMAShr #.21)
81 (:LLVMAnd #.22)
82 (:LLVMOr #.23)
83 (:LLVMXor #.24)
84 (:LLVMMalloc #.25)
85 (:LLVMFree #.26)
86 (:LLVMAlloca #.27)
87 (:LLVMLoad #.28)
88 (:LLVMStore #.29)
89 (:LLVMGetElementPtr #.30)
90 (:LLVMTrunk #.31)
91 (:LLVMZExt #.32)
92 (:LLVMSExt #.33)
93 (:LLVMFPToUI #.34)
94 (:LLVMFPToSI #.35)
95 (:LLVMUIToFP #.36)
96 (:LLVMSIToFP #.37)
97 (:LLVMFPTrunc #.38)
98 (:LLVMFPExt #.39)
99 (:LLVMPtrToInt #.40)
100 (:LLVMIntToPtr #.41)
101 (:LLVMBitCast #.42)
102 (:LLVMICmp #.43)
103 (:LLVMFCmp #.44)
104 (:LLVMPHI #.45)
105 (:LLVMCall #.46)
106 (:LLVMSelect #.47)
107 (:LLVMVAArg #.50)
108 (:LLVMExtractElement #.51)
109 (:LLVMInsertElement #.52)
110 (:LLVMShuffleVector #.53)
111 (:LLVMExtractValue #.54)
112 (:LLVMInsertValue #.55))
114 (cffi:defcenum LLVMTypeKind
115 :LLVMVoidTypeKind
116 :LLVMFloatTypeKind
117 :LLVMDoubleTypeKind
118 :LLVMX86_FP80TypeKind
119 :LLVMFP128TypeKind
120 :LLVMPPC_FP128TypeKind
121 :LLVMLabelTypeKind
122 :LLVMIntegerTypeKind
123 :LLVMFunctionTypeKind
124 :LLVMStructTypeKind
125 :LLVMArrayTypeKind
126 :LLVMPointerTypeKind
127 :LLVMOpaqueTypeKind
128 :LLVMVectorTypeKind
129 :LLVMMetadataTypeKind)
131 (cffi:defcenum LLVMLinkage
132 :LLVMExternalLinkage
133 :LLVMAvailableExternallyLinkage
134 :LLVMLinkOnceAnyLinkage
135 :LLVMLinkOnceODRLinkage
136 :LLVMWeakAnyLinkage
137 :LLVMWeakODRLinkage
138 :LLVMAppendingLinkage
139 :LLVMInternalLinkage
140 :LLVMPrivateLinkage
141 :LLVMDLLImportLinkage
142 :LLVMDLLExportLinkage
143 :LLVMExternalWeakLinkage
144 :LLVMGhostLinkage
145 :LLVMCommonLinkage
146 :LLVMLinkerPrivateLinkage)
148 (cffi:defcenum LLVMVisibility
149 :LLVMDefaultVisibility
150 :LLVMHiddenVisibility
151 :LLVMProtectedVisibility)
153 (cffi:defcenum LLVMCallConv
154 (:LLVMCCallConv #.0)
155 (:LLVMFastCallConv #.8)
156 (:LLVMColdCallConv #.9)
157 (:LLVMX86StdcallCallConv #.64)
158 (:LLVMX86FastcallCallConv #.65))
160 (cffi:defcenum LLVMIntPredicate
161 (:LLVMIntEQ #.32)
162 :LLVMIntNE
163 :LLVMIntUGT
164 :LLVMIntUGE
165 :LLVMIntULT
166 :LLVMIntULE
167 :LLVMIntSGT
168 :LLVMIntSGE
169 :LLVMIntSLT
170 :LLVMIntSLE)
172 (cffi:defcenum LLVMRealPredicate
173 :LLVMRealPredicateFalse
174 :LLVMRealOEQ
175 :LLVMRealOGT
176 :LLVMRealOGE
177 :LLVMRealOLT
178 :LLVMRealOLE
179 :LLVMRealONE
180 :LLVMRealORD
181 :LLVMRealUNO
182 :LLVMRealUEQ
183 :LLVMRealUGT
184 :LLVMRealUGE
185 :LLVMRealULT
186 :LLVMRealULE
187 :LLVMRealUNE
188 :LLVMRealPredicateTrue)
190 (cffi:defcfun ("LLVMDisposeMessage" LLVMDisposeMessage) :void
191 (Message :string))
193 (cffi:defcfun ("LLVMContextCreate" LLVMContextCreate) LLVMContextRef)
195 (cffi:defcfun ("LLVMGetGlobalContext" LLVMGetGlobalContext) LLVMContextRef)
197 (cffi:defcfun ("LLVMContextDispose" LLVMContextDispose) :void
198 (C LLVMContextRef))
200 (cffi:defcfun ("LLVMModuleCreateWithNameInContext" %LLVMModuleCreateWithNameInContext) LLVMModuleRef
201 (ModuleID :string)
202 (C LLVMContextRef))
204 (cffi:defcfun ("LLVMDisposeModule" LLVMDisposeModule) :void
205 (M LLVMModuleRef))
207 (cffi:defcfun ("LLVMGetDataLayout" LLVMGetDataLayout) :string
208 (M LLVMModuleRef))
210 (cffi:defcfun ("LLVMSetDataLayout" LLVMSetDataLayout) :void
211 (M LLVMModuleRef)
212 (Triple :string))
214 (cffi:defcfun ("LLVMGetTarget" LLVMGetTarget) :string
215 (M LLVMModuleRef))
217 (cffi:defcfun ("LLVMSetTarget" LLVMSetTarget) :void
218 (M LLVMModuleRef)
219 (Triple :string))
221 (cffi:defcfun ("LLVMAddTypeName" LLVMAddTypeName) :boolean
222 (M LLVMModuleRef)
223 (Name :string)
224 (Ty LLVMTypeRef))
226 (cffi:defcfun ("LLVMDeleteTypeName" LLVMDeleteTypeName) :void
227 (M LLVMModuleRef)
228 (Name :string))
230 (cffi:defcfun ("LLVMGetTypeByName" LLVMGetTypeByName) LLVMTypeRef
231 (M LLVMModuleRef)
232 (Name :string))
234 (cffi:defcfun ("LLVMDumpModule" LLVMDumpModule) :void
235 (M LLVMModuleRef))
237 (cffi:defcfun ("LLVMGetTypeKind" LLVMGetTypeKind) LLVMTypeKind
238 (Ty LLVMTypeRef))
240 (cffi:defcfun ("LLVMGetTypeContext" LLVMGetTypeContext) LLVMContextRef
241 (Ty LLVMTypeRef))
243 (cffi:defcfun ("LLVMInt1TypeInContext" %LLVMInt1TypeInContext) LLVMTypeRef
244 (C LLVMContextRef))
246 (cffi:defcfun ("LLVMInt8TypeInContext" %LLVMInt8TypeInContext) LLVMTypeRef
247 (C LLVMContextRef))
249 (cffi:defcfun ("LLVMInt16TypeInContext" %LLVMInt16TypeInContext) LLVMTypeRef
250 (C LLVMContextRef))
252 (cffi:defcfun ("LLVMInt32TypeInContext" %LLVMInt32TypeInContext) LLVMTypeRef
253 (C LLVMContextRef))
255 (cffi:defcfun ("LLVMInt64TypeInContext" %LLVMInt64TypeInContext) LLVMTypeRef
256 (C LLVMContextRef))
258 (cffi:defcfun ("LLVMIntTypeInContext" %LLVMIntTypeInContext) LLVMTypeRef
259 (C LLVMContextRef)
260 (NumBits :unsigned-int))
262 (cffi:defcfun ("LLVMGetIntTypeWidth" LLVMGetIntTypeWidth) :unsigned-int
263 (IntegerTy LLVMTypeRef))
265 (cffi:defcfun ("LLVMFloatTypeInContext" %LLVMFloatTypeInContext) LLVMTypeRef
266 (C LLVMContextRef))
268 (cffi:defcfun ("LLVMDoubleTypeInContext" %LLVMDoubleTypeInContext) LLVMTypeRef
269 (C LLVMContextRef))
271 (cffi:defcfun ("LLVMX86FP80TypeInContext" %LLVMX86FP80TypeInContext) LLVMTypeRef
272 (C LLVMContextRef))
274 (cffi:defcfun ("LLVMFP128TypeInContext" %LLVMFP128TypeInContext) LLVMTypeRef
275 (C LLVMContextRef))
277 (cffi:defcfun ("LLVMPPCFP128TypeInContext" %LLVMPPCFP128TypeInContext) LLVMTypeRef
278 (C LLVMContextRef))
280 (cffi:defcfun ("LLVMFunctionType" %LLVMFunctionType) LLVMTypeRef
281 (ReturnType LLVMTypeRef)
282 (ParamTypes :pointer)
283 (ParamCount :unsigned-int)
284 (IsVarArg :boolean))
286 (cffi:defcfun ("LLVMIsFunctionVarArg" LLVMIsFunctionVarArg) :boolean
287 (FunctionTy LLVMTypeRef))
289 (cffi:defcfun ("LLVMGetReturnType" LLVMGetReturnType) LLVMTypeRef
290 (FunctionTy LLVMTypeRef))
292 (cffi:defcfun ("LLVMCountParamTypes" LLVMCountParamTypes) :unsigned-int
293 (FunctionTy LLVMTypeRef))
295 (cffi:defcfun ("LLVMGetParamTypes" %LLVMGetParamTypes) :void
296 (FunctionTy LLVMTypeRef)
297 (Dest :pointer))
299 (cffi:defcfun ("LLVMStructTypeInContext" %LLVMStructTypeInContext) LLVMTypeRef
300 (C LLVMContextRef)
301 (ElementTypes :pointer)
302 (ElementCount :unsigned-int)
303 (Packed :boolean))
305 (cffi:defcfun ("LLVMCountStructElementTypes" LLVMCountStructElementTypes) :unsigned-int
306 (StructTy LLVMTypeRef))
308 (cffi:defcfun ("LLVMGetStructElementTypes" %LLVMGetStructElementTypes) :void
309 (StructTy LLVMTypeRef)
310 (Dest :pointer))
312 (cffi:defcfun ("LLVMIsPackedStruct" LLVMIsPackedStruct) :boolean
313 (StructTy LLVMTypeRef))
315 (cffi:defcfun ("LLVMArrayType" LLVMArrayType) LLVMTypeRef
316 (ElementType LLVMTypeRef)
317 (ElementCount :unsigned-int))
319 (cffi:defcfun ("LLVMPointerType" LLVMPointerType) LLVMTypeRef
320 (ElementType LLVMTypeRef)
321 (AddressSpace :unsigned-int))
323 (cffi:defcfun ("LLVMVectorType" LLVMVectorType) LLVMTypeRef
324 (ElementType LLVMTypeRef)
325 (ElementCount :unsigned-int))
327 (cffi:defcfun ("LLVMGetElementType" LLVMGetElementType) LLVMTypeRef
328 (Ty LLVMTypeRef))
330 (cffi:defcfun ("LLVMGetArrayLength" LLVMGetArrayLength) :unsigned-int
331 (ArrayTy LLVMTypeRef))
333 (cffi:defcfun ("LLVMGetPointerAddressSpace" LLVMGetPointerAddressSpace) :unsigned-int
334 (PointerTy LLVMTypeRef))
336 (cffi:defcfun ("LLVMGetVectorSize" LLVMGetVectorSize) :unsigned-int
337 (VectorTy LLVMTypeRef))
339 (cffi:defcfun ("LLVMVoidTypeInContext" %LLVMVoidTypeInContext) LLVMTypeRef
340 (C LLVMContextRef))
342 (cffi:defcfun ("LLVMLabelTypeInContext" %LLVMLabelTypeInContext) LLVMTypeRef
343 (C LLVMContextRef))
345 (cffi:defcfun ("LLVMOpaqueTypeInContext" %LLVMOpaqueTypeInContext) LLVMTypeRef
346 (C LLVMContextRef))
348 (cffi:defcfun ("LLVMCreateTypeHandle" LLVMCreateTypeHandle) LLVMTypeHandleRef
349 (PotentiallyAbstractTy LLVMTypeRef))
351 (cffi:defcfun ("LLVMRefineType" LLVMRefineType) :void
352 (AbstractTy LLVMTypeRef)
353 (ConcreteTy LLVMTypeRef))
355 (cffi:defcfun ("LLVMResolveTypeHandle" LLVMResolveTypeHandle) LLVMTypeRef
356 (TypeHandle LLVMTypeHandleRef))
358 (cffi:defcfun ("LLVMDisposeTypeHandle" LLVMDisposeTypeHandle) :void
359 (TypeHandle LLVMTypeHandleRef))
361 (cffi:defcfun ("LLVMTypeOf" LLVMTypeOf) LLVMTypeRef
362 (Val LLVMValueRef))
364 (cffi:defcfun ("LLVMGetValueName" LLVMGetValueName) :string
365 (Val LLVMValueRef))
367 (cffi:defcfun ("LLVMSetValueName" LLVMSetValueName) :void
368 (Val LLVMValueRef)
369 (Name :string))
371 (cffi:defcfun ("LLVMDumpValue" LLVMDumpValue) :void
372 (Val LLVMValueRef))
374 (cffi:defcfun ("LLVMReplaceAllUsesWith" LLVMReplaceAllUsesWith) :void
375 (OldVal LLVMValueRef)
376 (NewVal LLVMValueRef))
378 (cffi:defcfun ("LLVMIsAArgument" LLVMIsAArgument) LLVMValueRef
379 (Val LLVMValueRef))
381 (cffi:defcfun ("LLVMIsABasicBlock" LLVMIsABasicBlock) LLVMValueRef
382 (Val LLVMValueRef))
384 (cffi:defcfun ("LLVMIsAInlineAsm" LLVMIsAInlineAsm) LLVMValueRef
385 (Val LLVMValueRef))
387 (cffi:defcfun ("LLVMIsAUser" LLVMIsAUser) LLVMValueRef
388 (Val LLVMValueRef))
390 (cffi:defcfun ("LLVMIsAConstant" LLVMIsAConstant) LLVMValueRef
391 (Val LLVMValueRef))
393 (cffi:defcfun ("LLVMIsAConstantAggregateZero" LLVMIsAConstantAggregateZero) LLVMValueRef
394 (Val LLVMValueRef))
396 (cffi:defcfun ("LLVMIsAConstantArray" LLVMIsAConstantArray) LLVMValueRef
397 (Val LLVMValueRef))
399 (cffi:defcfun ("LLVMIsAConstantExpr" LLVMIsAConstantExpr) LLVMValueRef
400 (Val LLVMValueRef))
402 (cffi:defcfun ("LLVMIsAConstantFP" LLVMIsAConstantFP) LLVMValueRef
403 (Val LLVMValueRef))
405 (cffi:defcfun ("LLVMIsAConstantInt" LLVMIsAConstantInt) LLVMValueRef
406 (Val LLVMValueRef))
408 (cffi:defcfun ("LLVMIsAConstantPointerNull" LLVMIsAConstantPointerNull) LLVMValueRef
409 (Val LLVMValueRef))
411 (cffi:defcfun ("LLVMIsAConstantStruct" LLVMIsAConstantStruct) LLVMValueRef
412 (Val LLVMValueRef))
414 (cffi:defcfun ("LLVMIsAConstantVector" LLVMIsAConstantVector) LLVMValueRef
415 (Val LLVMValueRef))
417 (cffi:defcfun ("LLVMIsAGlobalValue" LLVMIsAGlobalValue) LLVMValueRef
418 (Val LLVMValueRef))
420 (cffi:defcfun ("LLVMIsAFunction" LLVMIsAFunction) LLVMValueRef
421 (Val LLVMValueRef))
423 (cffi:defcfun ("LLVMIsAGlobalAlias" LLVMIsAGlobalAlias) LLVMValueRef
424 (Val LLVMValueRef))
426 (cffi:defcfun ("LLVMIsAGlobalVariable" LLVMIsAGlobalVariable) LLVMValueRef
427 (Val LLVMValueRef))
429 (cffi:defcfun ("LLVMIsAUndefValue" LLVMIsAUndefValue) LLVMValueRef
430 (Val LLVMValueRef))
432 (cffi:defcfun ("LLVMIsAInstruction" LLVMIsAInstruction) LLVMValueRef
433 (Val LLVMValueRef))
435 (cffi:defcfun ("LLVMIsABinaryOperator" LLVMIsABinaryOperator) LLVMValueRef
436 (Val LLVMValueRef))
438 (cffi:defcfun ("LLVMIsACallInst" LLVMIsACallInst) LLVMValueRef
439 (Val LLVMValueRef))
441 (cffi:defcfun ("LLVMIsAIntrinsicInst" LLVMIsAIntrinsicInst) LLVMValueRef
442 (Val LLVMValueRef))
444 (cffi:defcfun ("LLVMIsADbgInfoIntrinsic" LLVMIsADbgInfoIntrinsic) LLVMValueRef
445 (Val LLVMValueRef))
447 (cffi:defcfun ("LLVMIsADbgDeclareInst" LLVMIsADbgDeclareInst) LLVMValueRef
448 (Val LLVMValueRef))
450 (cffi:defcfun ("LLVMIsADbgFuncStartInst" LLVMIsADbgFuncStartInst) LLVMValueRef
451 (Val LLVMValueRef))
453 (cffi:defcfun ("LLVMIsADbgRegionEndInst" LLVMIsADbgRegionEndInst) LLVMValueRef
454 (Val LLVMValueRef))
456 (cffi:defcfun ("LLVMIsADbgRegionStartInst" LLVMIsADbgRegionStartInst) LLVMValueRef
457 (Val LLVMValueRef))
459 (cffi:defcfun ("LLVMIsADbgStopPointInst" LLVMIsADbgStopPointInst) LLVMValueRef
460 (Val LLVMValueRef))
462 (cffi:defcfun ("LLVMIsAEHSelectorInst" LLVMIsAEHSelectorInst) LLVMValueRef
463 (Val LLVMValueRef))
465 (cffi:defcfun ("LLVMIsAMemIntrinsic" LLVMIsAMemIntrinsic) LLVMValueRef
466 (Val LLVMValueRef))
468 (cffi:defcfun ("LLVMIsAMemCpyInst" LLVMIsAMemCpyInst) LLVMValueRef
469 (Val LLVMValueRef))
471 (cffi:defcfun ("LLVMIsAMemMoveInst" LLVMIsAMemMoveInst) LLVMValueRef
472 (Val LLVMValueRef))
474 (cffi:defcfun ("LLVMIsAMemSetInst" LLVMIsAMemSetInst) LLVMValueRef
475 (Val LLVMValueRef))
477 (cffi:defcfun ("LLVMIsACmpInst" LLVMIsACmpInst) LLVMValueRef
478 (Val LLVMValueRef))
480 (cffi:defcfun ("LLVMIsAFCmpInst" LLVMIsAFCmpInst) LLVMValueRef
481 (Val LLVMValueRef))
483 (cffi:defcfun ("LLVMIsAICmpInst" LLVMIsAICmpInst) LLVMValueRef
484 (Val LLVMValueRef))
486 (cffi:defcfun ("LLVMIsAExtractElementInst" LLVMIsAExtractElementInst) LLVMValueRef
487 (Val LLVMValueRef))
489 (cffi:defcfun ("LLVMIsAGetElementPtrInst" LLVMIsAGetElementPtrInst) LLVMValueRef
490 (Val LLVMValueRef))
492 (cffi:defcfun ("LLVMIsAInsertElementInst" LLVMIsAInsertElementInst) LLVMValueRef
493 (Val LLVMValueRef))
495 (cffi:defcfun ("LLVMIsAInsertValueInst" LLVMIsAInsertValueInst) LLVMValueRef
496 (Val LLVMValueRef))
498 (cffi:defcfun ("LLVMIsAPHINode" LLVMIsAPHINode) LLVMValueRef
499 (Val LLVMValueRef))
501 (cffi:defcfun ("LLVMIsASelectInst" LLVMIsASelectInst) LLVMValueRef
502 (Val LLVMValueRef))
504 (cffi:defcfun ("LLVMIsAShuffleVectorInst" LLVMIsAShuffleVectorInst) LLVMValueRef
505 (Val LLVMValueRef))
507 (cffi:defcfun ("LLVMIsAStoreInst" LLVMIsAStoreInst) LLVMValueRef
508 (Val LLVMValueRef))
510 (cffi:defcfun ("LLVMIsATerminatorInst" LLVMIsATerminatorInst) LLVMValueRef
511 (Val LLVMValueRef))
513 (cffi:defcfun ("LLVMIsABranchInst" LLVMIsABranchInst) LLVMValueRef
514 (Val LLVMValueRef))
516 (cffi:defcfun ("LLVMIsAInvokeInst" LLVMIsAInvokeInst) LLVMValueRef
517 (Val LLVMValueRef))
519 (cffi:defcfun ("LLVMIsAReturnInst" LLVMIsAReturnInst) LLVMValueRef
520 (Val LLVMValueRef))
522 (cffi:defcfun ("LLVMIsASwitchInst" LLVMIsASwitchInst) LLVMValueRef
523 (Val LLVMValueRef))
525 (cffi:defcfun ("LLVMIsAUnreachableInst" LLVMIsAUnreachableInst) LLVMValueRef
526 (Val LLVMValueRef))
528 (cffi:defcfun ("LLVMIsAUnwindInst" LLVMIsAUnwindInst) LLVMValueRef
529 (Val LLVMValueRef))
531 (cffi:defcfun ("LLVMIsAUnaryInstruction" LLVMIsAUnaryInstruction) LLVMValueRef
532 (Val LLVMValueRef))
534 (cffi:defcfun ("LLVMIsAAllocaInst" LLVMIsAAllocaInst) LLVMValueRef
535 (Val LLVMValueRef))
537 (cffi:defcfun ("LLVMIsACastInst" LLVMIsACastInst) LLVMValueRef
538 (Val LLVMValueRef))
540 (cffi:defcfun ("LLVMIsABitCastInst" LLVMIsABitCastInst) LLVMValueRef
541 (Val LLVMValueRef))
543 (cffi:defcfun ("LLVMIsAFPExtInst" LLVMIsAFPExtInst) LLVMValueRef
544 (Val LLVMValueRef))
546 (cffi:defcfun ("LLVMIsAFPToSIInst" LLVMIsAFPToSIInst) LLVMValueRef
547 (Val LLVMValueRef))
549 (cffi:defcfun ("LLVMIsAFPToUIInst" LLVMIsAFPToUIInst) LLVMValueRef
550 (Val LLVMValueRef))
552 (cffi:defcfun ("LLVMIsAFPTruncInst" LLVMIsAFPTruncInst) LLVMValueRef
553 (Val LLVMValueRef))
555 (cffi:defcfun ("LLVMIsAIntToPtrInst" LLVMIsAIntToPtrInst) LLVMValueRef
556 (Val LLVMValueRef))
558 (cffi:defcfun ("LLVMIsAPtrToIntInst" LLVMIsAPtrToIntInst) LLVMValueRef
559 (Val LLVMValueRef))
561 (cffi:defcfun ("LLVMIsASExtInst" LLVMIsASExtInst) LLVMValueRef
562 (Val LLVMValueRef))
564 (cffi:defcfun ("LLVMIsASIToFPInst" LLVMIsASIToFPInst) LLVMValueRef
565 (Val LLVMValueRef))
567 (cffi:defcfun ("LLVMIsATruncInst" LLVMIsATruncInst) LLVMValueRef
568 (Val LLVMValueRef))
570 (cffi:defcfun ("LLVMIsAUIToFPInst" LLVMIsAUIToFPInst) LLVMValueRef
571 (Val LLVMValueRef))
573 (cffi:defcfun ("LLVMIsAZExtInst" LLVMIsAZExtInst) LLVMValueRef
574 (Val LLVMValueRef))
576 (cffi:defcfun ("LLVMIsAExtractValueInst" LLVMIsAExtractValueInst) LLVMValueRef
577 (Val LLVMValueRef))
579 (cffi:defcfun ("LLVMIsALoadInst" LLVMIsALoadInst) LLVMValueRef
580 (Val LLVMValueRef))
582 (cffi:defcfun ("LLVMIsAVAArgInst" LLVMIsAVAArgInst) LLVMValueRef
583 (Val LLVMValueRef))
585 (cffi:defcfun ("LLVMGetFirstUse" LLVMGetFirstUse) LLVMUseIteratorRef
586 (Val LLVMValueRef))
588 (cffi:defcfun ("LLVMGetNextUse" LLVMGetNextUse) LLVMUseIteratorRef
589 (U LLVMUseIteratorRef))
591 (cffi:defcfun ("LLVMGetUser" LLVMGetUser) LLVMValueRef
592 (U LLVMUseIteratorRef))
594 (cffi:defcfun ("LLVMGetUsedValue" LLVMGetUsedValue) LLVMValueRef
595 (U LLVMUseIteratorRef))
597 (cffi:defcfun ("LLVMGetOperand" LLVMGetOperand) LLVMValueRef
598 (Val LLVMValueRef)
599 (Index :unsigned-int))
601 (cffi:defcfun ("LLVMConstNull" LLVMConstNull) LLVMValueRef
602 (Ty LLVMTypeRef))
604 (cffi:defcfun ("LLVMConstAllOnes" LLVMConstAllOnes) LLVMValueRef
605 (Ty LLVMTypeRef))
607 (cffi:defcfun ("LLVMGetUndef" LLVMGetUndef) LLVMValueRef
608 (Ty LLVMTypeRef))
610 (cffi:defcfun ("LLVMIsConstant" LLVMIsConstant) :boolean
611 (Val LLVMValueRef))
613 (cffi:defcfun ("LLVMIsNull" LLVMIsNull) :boolean
614 (Val LLVMValueRef))
616 (cffi:defcfun ("LLVMIsUndef" LLVMIsUndef) :boolean
617 (Val LLVMValueRef))
619 (cffi:defcfun ("LLVMConstPointerNull" LLVMConstPointerNull) LLVMValueRef
620 (Ty LLVMTypeRef))
622 (cffi:defcfun ("LLVMConstInt" LLVMConstInt) LLVMValueRef
623 (IntTy LLVMTypeRef)
624 (N :unsigned-long-long)
625 (SignExtend :boolean))
627 (cffi:defcfun ("LLVMConstIntOfString" LLVMConstIntOfString) LLVMValueRef
628 (IntTy LLVMTypeRef)
629 (Text :string)
630 (Radix :unsigned-char))
632 (cffi:defcfun ("LLVMConstIntOfStringAndSize" LLVMConstIntOfStringAndSize) LLVMValueRef
633 (IntTy LLVMTypeRef)
634 (Text :string)
635 (SLen :unsigned-int)
636 (Radix :unsigned-char))
638 (cffi:defcfun ("LLVMConstReal" LLVMConstReal) LLVMValueRef
639 (RealTy LLVMTypeRef)
640 (N :double))
642 (cffi:defcfun ("LLVMConstRealOfString" LLVMConstRealOfString) LLVMValueRef
643 (RealTy LLVMTypeRef)
644 (Text :string))
646 (cffi:defcfun ("LLVMConstRealOfStringAndSize" LLVMConstRealOfStringAndSize) LLVMValueRef
647 (RealTy LLVMTypeRef)
648 (Text :string)
649 (SLen :unsigned-int))
651 (cffi:defcfun ("LLVMConstIntGetZExtValue" LLVMConstIntGetZExtValue) :unsigned-long-long
652 (ConstantVal LLVMValueRef))
654 (cffi:defcfun ("LLVMConstIntGetSExtValue" LLVMConstIntGetSExtValue) :long-long
655 (ConstantVal LLVMValueRef))
657 (cffi:defcfun ("LLVMConstStringInContext" %LLVMConstStringInContext) LLVMValueRef
658 (C LLVMContextRef)
659 (Str :string)
660 (Length :unsigned-int)
661 (DontNullTerminate :boolean))
663 (cffi:defcfun ("LLVMConstStructInContext" %LLVMConstStructInContext) LLVMValueRef
664 (C LLVMContextRef)
665 (ConstantVals :pointer)
666 (Count :unsigned-int)
667 (Packed :boolean))
669 (cffi:defcfun ("LLVMConstArray" %LLVMConstArray) LLVMValueRef
670 (ElementTy LLVMTypeRef)
671 (ConstantVals :pointer)
672 (Length :unsigned-int))
674 (cffi:defcfun ("LLVMConstVector" %LLVMConstVector) LLVMValueRef
675 (ScalarConstantVals :pointer)
676 (Size :unsigned-int))
678 (cffi:defcfun ("LLVMGetConstOpcode" LLVMGetConstOpcode) LLVMOpcode
679 (ConstantVal LLVMValueRef))
681 (cffi:defcfun ("LLVMAlignOf" LLVMAlignOf) LLVMValueRef
682 (Ty LLVMTypeRef))
684 (cffi:defcfun ("LLVMSizeOf" LLVMSizeOf) LLVMValueRef
685 (Ty LLVMTypeRef))
687 (cffi:defcfun ("LLVMConstNeg" LLVMConstNeg) LLVMValueRef
688 (ConstantVal LLVMValueRef))
690 (cffi:defcfun ("LLVMConstFNeg" LLVMConstFNeg) LLVMValueRef
691 (ConstantVal LLVMValueRef))
693 (cffi:defcfun ("LLVMConstNot" LLVMConstNot) LLVMValueRef
694 (ConstantVal LLVMValueRef))
696 (cffi:defcfun ("LLVMConstAdd" LLVMConstAdd) LLVMValueRef
697 (LHSConstant LLVMValueRef)
698 (RHSConstant LLVMValueRef))
700 (cffi:defcfun ("LLVMConstNSWAdd" LLVMConstNSWAdd) LLVMValueRef
701 (LHSConstant LLVMValueRef)
702 (RHSConstant LLVMValueRef))
704 (cffi:defcfun ("LLVMConstFAdd" LLVMConstFAdd) LLVMValueRef
705 (LHSConstant LLVMValueRef)
706 (RHSConstant LLVMValueRef))
708 (cffi:defcfun ("LLVMConstSub" LLVMConstSub) LLVMValueRef
709 (LHSConstant LLVMValueRef)
710 (RHSConstant LLVMValueRef))
712 (cffi:defcfun ("LLVMConstFSub" LLVMConstFSub) LLVMValueRef
713 (LHSConstant LLVMValueRef)
714 (RHSConstant LLVMValueRef))
716 (cffi:defcfun ("LLVMConstMul" LLVMConstMul) LLVMValueRef
717 (LHSConstant LLVMValueRef)
718 (RHSConstant LLVMValueRef))
720 (cffi:defcfun ("LLVMConstFMul" LLVMConstFMul) LLVMValueRef
721 (LHSConstant LLVMValueRef)
722 (RHSConstant LLVMValueRef))
724 (cffi:defcfun ("LLVMConstUDiv" LLVMConstUDiv) LLVMValueRef
725 (LHSConstant LLVMValueRef)
726 (RHSConstant LLVMValueRef))
728 (cffi:defcfun ("LLVMConstSDiv" LLVMConstSDiv) LLVMValueRef
729 (LHSConstant LLVMValueRef)
730 (RHSConstant LLVMValueRef))
732 (cffi:defcfun ("LLVMConstExactSDiv" LLVMConstExactSDiv) LLVMValueRef
733 (LHSConstant LLVMValueRef)
734 (RHSConstant LLVMValueRef))
736 (cffi:defcfun ("LLVMConstFDiv" LLVMConstFDiv) LLVMValueRef
737 (LHSConstant LLVMValueRef)
738 (RHSConstant LLVMValueRef))
740 (cffi:defcfun ("LLVMConstURem" LLVMConstURem) LLVMValueRef
741 (LHSConstant LLVMValueRef)
742 (RHSConstant LLVMValueRef))
744 (cffi:defcfun ("LLVMConstSRem" LLVMConstSRem) LLVMValueRef
745 (LHSConstant LLVMValueRef)
746 (RHSConstant LLVMValueRef))
748 (cffi:defcfun ("LLVMConstFRem" LLVMConstFRem) LLVMValueRef
749 (LHSConstant LLVMValueRef)
750 (RHSConstant LLVMValueRef))
752 (cffi:defcfun ("LLVMConstAnd" LLVMConstAnd) LLVMValueRef
753 (LHSConstant LLVMValueRef)
754 (RHSConstant LLVMValueRef))
756 (cffi:defcfun ("LLVMConstOr" LLVMConstOr) LLVMValueRef
757 (LHSConstant LLVMValueRef)
758 (RHSConstant LLVMValueRef))
760 (cffi:defcfun ("LLVMConstXor" LLVMConstXor) LLVMValueRef
761 (LHSConstant LLVMValueRef)
762 (RHSConstant LLVMValueRef))
764 (cffi:defcfun ("LLVMConstICmp" LLVMConstICmp) LLVMValueRef
765 (Predicate LLVMIntPredicate)
766 (LHSConstant LLVMValueRef)
767 (RHSConstant LLVMValueRef))
769 (cffi:defcfun ("LLVMConstFCmp" LLVMConstFCmp) LLVMValueRef
770 (Predicate LLVMRealPredicate)
771 (LHSConstant LLVMValueRef)
772 (RHSConstant LLVMValueRef))
774 (cffi:defcfun ("LLVMConstShl" LLVMConstShl) LLVMValueRef
775 (LHSConstant LLVMValueRef)
776 (RHSConstant LLVMValueRef))
778 (cffi:defcfun ("LLVMConstLShr" LLVMConstLShr) LLVMValueRef
779 (LHSConstant LLVMValueRef)
780 (RHSConstant LLVMValueRef))
782 (cffi:defcfun ("LLVMConstAShr" LLVMConstAShr) LLVMValueRef
783 (LHSConstant LLVMValueRef)
784 (RHSConstant LLVMValueRef))
786 (cffi:defcfun ("LLVMConstGEP" %LLVMConstGEP) LLVMValueRef
787 (ConstantVal LLVMValueRef)
788 (ConstantIndices :pointer)
789 (NumIndices :unsigned-int))
791 (cffi:defcfun ("LLVMConstInBoundsGEP" %LLVMConstInBoundsGEP) LLVMValueRef
792 (ConstantVal LLVMValueRef)
793 (ConstantIndices :pointer)
794 (NumIndices :unsigned-int))
796 (cffi:defcfun ("LLVMConstTrunc" LLVMConstTrunc) LLVMValueRef
797 (ConstantVal LLVMValueRef)
798 (ToType LLVMTypeRef))
800 (cffi:defcfun ("LLVMConstSExt" LLVMConstSExt) LLVMValueRef
801 (ConstantVal LLVMValueRef)
802 (ToType LLVMTypeRef))
804 (cffi:defcfun ("LLVMConstZExt" LLVMConstZExt) LLVMValueRef
805 (ConstantVal LLVMValueRef)
806 (ToType LLVMTypeRef))
808 (cffi:defcfun ("LLVMConstFPTrunc" LLVMConstFPTrunc) LLVMValueRef
809 (ConstantVal LLVMValueRef)
810 (ToType LLVMTypeRef))
812 (cffi:defcfun ("LLVMConstFPExt" LLVMConstFPExt) LLVMValueRef
813 (ConstantVal LLVMValueRef)
814 (ToType LLVMTypeRef))
816 (cffi:defcfun ("LLVMConstUIToFP" LLVMConstUIToFP) LLVMValueRef
817 (ConstantVal LLVMValueRef)
818 (ToType LLVMTypeRef))
820 (cffi:defcfun ("LLVMConstSIToFP" LLVMConstSIToFP) LLVMValueRef
821 (ConstantVal LLVMValueRef)
822 (ToType LLVMTypeRef))
824 (cffi:defcfun ("LLVMConstFPToUI" LLVMConstFPToUI) LLVMValueRef
825 (ConstantVal LLVMValueRef)
826 (ToType LLVMTypeRef))
828 (cffi:defcfun ("LLVMConstFPToSI" LLVMConstFPToSI) LLVMValueRef
829 (ConstantVal LLVMValueRef)
830 (ToType LLVMTypeRef))
832 (cffi:defcfun ("LLVMConstPtrToInt" LLVMConstPtrToInt) LLVMValueRef
833 (ConstantVal LLVMValueRef)
834 (ToType LLVMTypeRef))
836 (cffi:defcfun ("LLVMConstIntToPtr" LLVMConstIntToPtr) LLVMValueRef
837 (ConstantVal LLVMValueRef)
838 (ToType LLVMTypeRef))
840 (cffi:defcfun ("LLVMConstBitCast" LLVMConstBitCast) LLVMValueRef
841 (ConstantVal LLVMValueRef)
842 (ToType LLVMTypeRef))
844 (cffi:defcfun ("LLVMConstZExtOrBitCast" LLVMConstZExtOrBitCast) LLVMValueRef
845 (ConstantVal LLVMValueRef)
846 (ToType LLVMTypeRef))
848 (cffi:defcfun ("LLVMConstSExtOrBitCast" LLVMConstSExtOrBitCast) LLVMValueRef
849 (ConstantVal LLVMValueRef)
850 (ToType LLVMTypeRef))
852 (cffi:defcfun ("LLVMConstTruncOrBitCast" LLVMConstTruncOrBitCast) LLVMValueRef
853 (ConstantVal LLVMValueRef)
854 (ToType LLVMTypeRef))
856 (cffi:defcfun ("LLVMConstPointerCast" LLVMConstPointerCast) LLVMValueRef
857 (ConstantVal LLVMValueRef)
858 (ToType LLVMTypeRef))
860 (cffi:defcfun ("LLVMConstIntCast" LLVMConstIntCast) LLVMValueRef
861 (ConstantVal LLVMValueRef)
862 (ToType LLVMTypeRef)
863 (isSigned :boolean))
865 (cffi:defcfun ("LLVMConstFPCast" LLVMConstFPCast) LLVMValueRef
866 (ConstantVal LLVMValueRef)
867 (ToType LLVMTypeRef))
869 (cffi:defcfun ("LLVMConstSelect" LLVMConstSelect) LLVMValueRef
870 (ConstantCondition LLVMValueRef)
871 (ConstantIfTrue LLVMValueRef)
872 (ConstantIfFalse LLVMValueRef))
874 (cffi:defcfun ("LLVMConstExtractElement" LLVMConstExtractElement) LLVMValueRef
875 (VectorConstant LLVMValueRef)
876 (IndexConstant LLVMValueRef))
878 (cffi:defcfun ("LLVMConstInsertElement" LLVMConstInsertElement) LLVMValueRef
879 (VectorConstant LLVMValueRef)
880 (ElementValueConstant LLVMValueRef)
881 (IndexConstant LLVMValueRef))
883 (cffi:defcfun ("LLVMConstShuffleVector" LLVMConstShuffleVector) LLVMValueRef
884 (VectorAConstant LLVMValueRef)
885 (VectorBConstant LLVMValueRef)
886 (MaskConstant LLVMValueRef))
888 (cffi:defcfun ("LLVMConstExtractValue" %LLVMConstExtractValue) LLVMValueRef
889 (AggConstant LLVMValueRef)
890 (IdxList :pointer)
891 (NumIdx :unsigned-int))
893 (cffi:defcfun ("LLVMConstInsertValue" %LLVMConstInsertValue) LLVMValueRef
894 (AggConstant LLVMValueRef)
895 (ElementValueConstant LLVMValueRef)
896 (IdxList :pointer)
897 (NumIdx :unsigned-int))
899 (cffi:defcfun ("LLVMConstInlineAsm" LLVMConstInlineAsm) LLVMValueRef
900 (Ty LLVMTypeRef)
901 (AsmString :string)
902 (Constraints :string)
903 (HasSideEffects :boolean)
904 (IsAlignStack :boolean))
906 (cffi:defcfun ("LLVMGetGlobalParent" LLVMGetGlobalParent) LLVMModuleRef
907 (Global LLVMValueRef))
909 (cffi:defcfun ("LLVMIsDeclaration" LLVMIsDeclaration) :boolean
910 (Global LLVMValueRef))
912 (cffi:defcfun ("LLVMGetLinkage" LLVMGetLinkage) LLVMLinkage
913 (Global LLVMValueRef))
915 (cffi:defcfun ("LLVMSetLinkage" LLVMSetLinkage) :void
916 (Global LLVMValueRef)
917 (Linkage LLVMLinkage))
919 (cffi:defcfun ("LLVMGetSection" LLVMGetSection) :string
920 (Global LLVMValueRef))
922 (cffi:defcfun ("LLVMSetSection" LLVMSetSection) :void
923 (Global LLVMValueRef)
924 (Section :string))
926 (cffi:defcfun ("LLVMGetVisibility" LLVMGetVisibility) LLVMVisibility
927 (Global LLVMValueRef))
929 (cffi:defcfun ("LLVMSetVisibility" LLVMSetVisibility) :void
930 (Global LLVMValueRef)
931 (Viz LLVMVisibility))
933 (cffi:defcfun ("LLVMGetAlignment" LLVMGetAlignment) :unsigned-int
934 (Global LLVMValueRef))
936 (cffi:defcfun ("LLVMSetAlignment" LLVMSetAlignment) :void
937 (Global LLVMValueRef)
938 (Bytes :unsigned-int))
940 (cffi:defcfun ("LLVMAddGlobal" LLVMAddGlobal) LLVMValueRef
941 (M LLVMModuleRef)
942 (Ty LLVMTypeRef)
943 (Name :string))
945 (cffi:defcfun ("LLVMGetNamedGlobal" LLVMGetNamedGlobal) LLVMValueRef
946 (M LLVMModuleRef)
947 (Name :string))
949 (cffi:defcfun ("LLVMGetFirstGlobal" LLVMGetFirstGlobal) LLVMValueRef
950 (M LLVMModuleRef))
952 (cffi:defcfun ("LLVMGetLastGlobal" LLVMGetLastGlobal) LLVMValueRef
953 (M LLVMModuleRef))
955 (cffi:defcfun ("LLVMGetNextGlobal" LLVMGetNextGlobal) LLVMValueRef
956 (GlobalVar LLVMValueRef))
958 (cffi:defcfun ("LLVMGetPreviousGlobal" LLVMGetPreviousGlobal) LLVMValueRef
959 (GlobalVar LLVMValueRef))
961 (cffi:defcfun ("LLVMDeleteGlobal" LLVMDeleteGlobal) :void
962 (GlobalVar LLVMValueRef))
964 (cffi:defcfun ("LLVMGetInitializer" LLVMGetInitializer) LLVMValueRef
965 (GlobalVar LLVMValueRef))
967 (cffi:defcfun ("LLVMSetInitializer" LLVMSetInitializer) :void
968 (GlobalVar LLVMValueRef)
969 (ConstantVal LLVMValueRef))
971 (cffi:defcfun ("LLVMIsThreadLocal" LLVMIsThreadLocal) :boolean
972 (GlobalVar LLVMValueRef))
974 (cffi:defcfun ("LLVMSetThreadLocal" LLVMSetThreadLocal) :void
975 (GlobalVar LLVMValueRef)
976 (IsThreadLocal :boolean))
978 (cffi:defcfun ("LLVMIsGlobalConstant" LLVMIsGlobalConstant) :boolean
979 (GlobalVar LLVMValueRef))
981 (cffi:defcfun ("LLVMSetGlobalConstant" LLVMSetGlobalConstant) :void
982 (GlobalVar LLVMValueRef)
983 (IsConstant :boolean))
985 (cffi:defcfun ("LLVMAddAlias" LLVMAddAlias) LLVMValueRef
986 (M LLVMModuleRef)
987 (Ty LLVMTypeRef)
988 (Aliasee LLVMValueRef)
989 (Name :string))
991 (cffi:defcfun ("LLVMAddFunction" LLVMAddFunction) LLVMValueRef
992 (M LLVMModuleRef)
993 (Name :string)
994 (FunctionTy LLVMTypeRef))
996 (cffi:defcfun ("LLVMGetNamedFunction" LLVMGetNamedFunction) LLVMValueRef
997 (M LLVMModuleRef)
998 (Name :string))
1000 (cffi:defcfun ("LLVMGetFirstFunction" LLVMGetFirstFunction) LLVMValueRef
1001 (M LLVMModuleRef))
1003 (cffi:defcfun ("LLVMGetLastFunction" LLVMGetLastFunction) LLVMValueRef
1004 (M LLVMModuleRef))
1006 (cffi:defcfun ("LLVMGetNextFunction" LLVMGetNextFunction) LLVMValueRef
1007 (Fn LLVMValueRef))
1009 (cffi:defcfun ("LLVMGetPreviousFunction" LLVMGetPreviousFunction) LLVMValueRef
1010 (Fn LLVMValueRef))
1012 (cffi:defcfun ("LLVMDeleteFunction" LLVMDeleteFunction) :void
1013 (Fn LLVMValueRef))
1015 (cffi:defcfun ("LLVMGetIntrinsicID" LLVMGetIntrinsicID) :unsigned-int
1016 (Fn LLVMValueRef))
1018 (cffi:defcfun ("LLVMGetFunctionCallConv" LLVMGetFunctionCallConv) :unsigned-int
1019 (Fn LLVMValueRef))
1021 (cffi:defcfun ("LLVMSetFunctionCallConv" LLVMSetFunctionCallConv) :void
1022 (Fn LLVMValueRef)
1023 (CC :unsigned-int))
1025 (cffi:defcfun ("LLVMGetGC" LLVMGetGC) :string
1026 (Fn LLVMValueRef))
1028 (cffi:defcfun ("LLVMSetGC" LLVMSetGC) :void
1029 (Fn LLVMValueRef)
1030 (Name :string))
1032 (cffi:defcfun ("LLVMAddFunctionAttr" LLVMAddFunctionAttr) :void
1033 (Fn LLVMValueRef)
1034 (PA LLVMAttribute))
1036 (cffi:defcfun ("LLVMGetFunctionAttr" LLVMGetFunctionAttr) LLVMAttribute
1037 (Fn LLVMValueRef))
1039 (cffi:defcfun ("LLVMRemoveFunctionAttr" LLVMRemoveFunctionAttr) :void
1040 (Fn LLVMValueRef)
1041 (PA LLVMAttribute))
1043 (cffi:defcfun ("LLVMCountParams" LLVMCountParams) :unsigned-int
1044 (Fn LLVMValueRef))
1046 (cffi:defcfun ("LLVMGetParams" %LLVMGetParams) :void
1047 (Fn LLVMValueRef)
1048 (Params :pointer))
1050 (cffi:defcfun ("LLVMGetParam" LLVMGetParam) LLVMValueRef
1051 (Fn LLVMValueRef)
1052 (Index :unsigned-int))
1054 (cffi:defcfun ("LLVMGetParamParent" LLVMGetParamParent) LLVMValueRef
1055 (Inst LLVMValueRef))
1057 (cffi:defcfun ("LLVMGetFirstParam" LLVMGetFirstParam) LLVMValueRef
1058 (Fn LLVMValueRef))
1060 (cffi:defcfun ("LLVMGetLastParam" LLVMGetLastParam) LLVMValueRef
1061 (Fn LLVMValueRef))
1063 (cffi:defcfun ("LLVMGetNextParam" LLVMGetNextParam) LLVMValueRef
1064 (Arg LLVMValueRef))
1066 (cffi:defcfun ("LLVMGetPreviousParam" LLVMGetPreviousParam) LLVMValueRef
1067 (Arg LLVMValueRef))
1069 (cffi:defcfun ("LLVMAddAttribute" LLVMAddAttribute) :void
1070 (Arg LLVMValueRef)
1071 (PA LLVMAttribute))
1073 (cffi:defcfun ("LLVMRemoveAttribute" LLVMRemoveAttribute) :void
1074 (Arg LLVMValueRef)
1075 (PA LLVMAttribute))
1077 (cffi:defcfun ("LLVMGetAttribute" LLVMGetAttribute) LLVMAttribute
1078 (Arg LLVMValueRef))
1080 (cffi:defcfun ("LLVMSetParamAlignment" LLVMSetParamAlignment) :void
1081 (Arg LLVMValueRef)
1082 (align :unsigned-int))
1084 (cffi:defcfun ("LLVMBasicBlockAsValue" LLVMBasicBlockAsValue) LLVMValueRef
1085 (BB LLVMBasicBlockRef))
1087 (cffi:defcfun ("LLVMValueIsBasicBlock" LLVMValueIsBasicBlock) :boolean
1088 (Val LLVMValueRef))
1090 (cffi:defcfun ("LLVMValueAsBasicBlock" LLVMValueAsBasicBlock) LLVMBasicBlockRef
1091 (Val LLVMValueRef))
1093 (cffi:defcfun ("LLVMGetBasicBlockParent" LLVMGetBasicBlockParent) LLVMValueRef
1094 (BB LLVMBasicBlockRef))
1096 (cffi:defcfun ("LLVMCountBasicBlocks" LLVMCountBasicBlocks) :unsigned-int
1097 (Fn LLVMValueRef))
1099 (cffi:defcfun ("LLVMGetBasicBlocks" LLVMGetBasicBlocks) :void
1100 (Fn LLVMValueRef)
1101 (BasicBlocks :pointer))
1103 (cffi:defcfun ("LLVMGetFirstBasicBlock" LLVMGetFirstBasicBlock) LLVMBasicBlockRef
1104 (Fn LLVMValueRef))
1106 (cffi:defcfun ("LLVMGetLastBasicBlock" LLVMGetLastBasicBlock) LLVMBasicBlockRef
1107 (Fn LLVMValueRef))
1109 (cffi:defcfun ("LLVMGetNextBasicBlock" LLVMGetNextBasicBlock) LLVMBasicBlockRef
1110 (BB LLVMBasicBlockRef))
1112 (cffi:defcfun ("LLVMGetPreviousBasicBlock" LLVMGetPreviousBasicBlock) LLVMBasicBlockRef
1113 (BB LLVMBasicBlockRef))
1115 (cffi:defcfun ("LLVMGetEntryBasicBlock" LLVMGetEntryBasicBlock) LLVMBasicBlockRef
1116 (Fn LLVMValueRef))
1118 (cffi:defcfun ("LLVMAppendBasicBlockInContext" %LLVMAppendBasicBlockInContext) LLVMBasicBlockRef
1119 (C LLVMContextRef)
1120 (Fn LLVMValueRef)
1121 (Name :string))
1123 (cffi:defcfun ("LLVMInsertBasicBlockInContext" %LLVMInsertBasicBlockInContext) LLVMBasicBlockRef
1124 (C LLVMContextRef)
1125 (BB LLVMBasicBlockRef)
1126 (Name :string))
1128 (cffi:defcfun ("LLVMDeleteBasicBlock" LLVMDeleteBasicBlock) :void
1129 (BB LLVMBasicBlockRef))
1131 (cffi:defcfun ("LLVMGetInstructionParent" LLVMGetInstructionParent) LLVMBasicBlockRef
1132 (Inst LLVMValueRef))
1134 (cffi:defcfun ("LLVMGetFirstInstruction" LLVMGetFirstInstruction) LLVMValueRef
1135 (BB LLVMBasicBlockRef))
1137 (cffi:defcfun ("LLVMGetLastInstruction" LLVMGetLastInstruction) LLVMValueRef
1138 (BB LLVMBasicBlockRef))
1140 (cffi:defcfun ("LLVMGetNextInstruction" LLVMGetNextInstruction) LLVMValueRef
1141 (Inst LLVMValueRef))
1143 (cffi:defcfun ("LLVMGetPreviousInstruction" LLVMGetPreviousInstruction) LLVMValueRef
1144 (Inst LLVMValueRef))
1146 (cffi:defcfun ("LLVMSetInstructionCallConv" LLVMSetInstructionCallConv) :void
1147 (Instr LLVMValueRef)
1148 (CC :unsigned-int))
1150 (cffi:defcfun ("LLVMGetInstructionCallConv" LLVMGetInstructionCallConv) :unsigned-int
1151 (Instr LLVMValueRef))
1153 (cffi:defcfun ("LLVMAddInstrAttribute" LLVMAddInstrAttribute) :void
1154 (Instr LLVMValueRef)
1155 (index :unsigned-int)
1156 (arg2 LLVMAttribute))
1158 (cffi:defcfun ("LLVMRemoveInstrAttribute" LLVMRemoveInstrAttribute) :void
1159 (Instr LLVMValueRef)
1160 (index :unsigned-int)
1161 (arg2 LLVMAttribute))
1163 (cffi:defcfun ("LLVMSetInstrParamAlignment" LLVMSetInstrParamAlignment) :void
1164 (Instr LLVMValueRef)
1165 (index :unsigned-int)
1166 (align :unsigned-int))
1168 (cffi:defcfun ("LLVMIsTailCall" LLVMIsTailCall) :boolean
1169 (CallInst LLVMValueRef))
1171 (cffi:defcfun ("LLVMSetTailCall" LLVMSetTailCall) :void
1172 (CallInst LLVMValueRef)
1173 (IsTailCall :boolean))
1175 (cffi:defcfun ("LLVMAddIncoming" %LLVMAddIncoming) :void
1176 (PhiNode LLVMValueRef)
1177 (IncomingValues :pointer)
1178 (IncomingBlocks :pointer)
1179 (Count :unsigned-int))
1181 (cffi:defcfun ("LLVMCountIncoming" LLVMCountIncoming) :unsigned-int
1182 (PhiNode LLVMValueRef))
1184 (cffi:defcfun ("LLVMGetIncomingValue" LLVMGetIncomingValue) LLVMValueRef
1185 (PhiNode LLVMValueRef)
1186 (Index :unsigned-int))
1188 (cffi:defcfun ("LLVMGetIncomingBlock" LLVMGetIncomingBlock) LLVMBasicBlockRef
1189 (PhiNode LLVMValueRef)
1190 (Index :unsigned-int))
1192 (cffi:defcfun ("LLVMCreateBuilderInContext" %LLVMCreateBuilderInContext) LLVMBuilderRef
1193 (C LLVMContextRef))
1195 (cffi:defcfun ("LLVMPositionBuilder" LLVMPositionBuilder) :void
1196 (Builder LLVMBuilderRef)
1197 (Block LLVMBasicBlockRef)
1198 (Instr LLVMValueRef))
1200 (cffi:defcfun ("LLVMPositionBuilderBefore" LLVMPositionBuilderBefore) :void
1201 (Builder LLVMBuilderRef)
1202 (Instr LLVMValueRef))
1204 (cffi:defcfun ("LLVMPositionBuilderAtEnd" LLVMPositionBuilderAtEnd) :void
1205 (Builder LLVMBuilderRef)
1206 (Block LLVMBasicBlockRef))
1208 (cffi:defcfun ("LLVMGetInsertBlock" LLVMGetInsertBlock) LLVMBasicBlockRef
1209 (Builder LLVMBuilderRef))
1211 (cffi:defcfun ("LLVMClearInsertionPosition" LLVMClearInsertionPosition) :void
1212 (Builder LLVMBuilderRef))
1214 (cffi:defcfun ("LLVMInsertIntoBuilder" LLVMInsertIntoBuilder) :void
1215 (Builder LLVMBuilderRef)
1216 (Instr LLVMValueRef))
1218 (cffi:defcfun ("LLVMInsertIntoBuilderWithName" LLVMInsertIntoBuilderWithName) :void
1219 (Builder LLVMBuilderRef)
1220 (Instr LLVMValueRef)
1221 (Name :string))
1223 (cffi:defcfun ("LLVMDisposeBuilder" LLVMDisposeBuilder) :void
1224 (Builder LLVMBuilderRef))
1226 (cffi:defcfun ("LLVMBuildRetVoid" LLVMBuildRetVoid) LLVMValueRef
1227 (arg0 LLVMBuilderRef))
1229 (cffi:defcfun ("LLVMBuildRet" LLVMBuildRet) LLVMValueRef
1230 (arg0 LLVMBuilderRef)
1231 (V LLVMValueRef))
1233 (cffi:defcfun ("LLVMBuildAggregateRet" %LLVMBuildAggregateRet) LLVMValueRef
1234 (arg0 LLVMBuilderRef)
1235 (RetVals :pointer)
1236 (N :unsigned-int))
1238 (cffi:defcfun ("LLVMBuildBr" LLVMBuildBr) LLVMValueRef
1239 (arg0 LLVMBuilderRef)
1240 (Dest LLVMBasicBlockRef))
1242 (cffi:defcfun ("LLVMBuildCondBr" LLVMBuildCondBr) LLVMValueRef
1243 (arg0 LLVMBuilderRef)
1244 (If LLVMValueRef)
1245 (Then LLVMBasicBlockRef)
1246 (Else LLVMBasicBlockRef))
1248 (cffi:defcfun ("LLVMBuildSwitch" LLVMBuildSwitch) LLVMValueRef
1249 (arg0 LLVMBuilderRef)
1250 (V LLVMValueRef)
1251 (Else LLVMBasicBlockRef)
1252 (NumCases :unsigned-int))
1254 (cffi:defcfun ("LLVMBuildInvoke" %LLVMBuildInvoke) LLVMValueRef
1255 (arg0 LLVMBuilderRef)
1256 (Fn LLVMValueRef)
1257 (Args :pointer)
1258 (NumArgs :unsigned-int)
1259 (Then LLVMBasicBlockRef)
1260 (Catch LLVMBasicBlockRef)
1261 (Name :string))
1263 (cffi:defcfun ("LLVMBuildUnwind" LLVMBuildUnwind) LLVMValueRef
1264 (arg0 LLVMBuilderRef))
1266 (cffi:defcfun ("LLVMBuildUnreachable" LLVMBuildUnreachable) LLVMValueRef
1267 (arg0 LLVMBuilderRef))
1269 (cffi:defcfun ("LLVMAddCase" LLVMAddCase) :void
1270 (Switch LLVMValueRef)
1271 (OnVal LLVMValueRef)
1272 (Dest LLVMBasicBlockRef))
1274 (cffi:defcfun ("LLVMBuildAdd" LLVMBuildAdd) LLVMValueRef
1275 (arg0 LLVMBuilderRef)
1276 (LHS LLVMValueRef)
1277 (RHS LLVMValueRef)
1278 (Name :string))
1280 (cffi:defcfun ("LLVMBuildNSWAdd" LLVMBuildNSWAdd) LLVMValueRef
1281 (arg0 LLVMBuilderRef)
1282 (LHS LLVMValueRef)
1283 (RHS LLVMValueRef)
1284 (Name :string))
1286 (cffi:defcfun ("LLVMBuildFAdd" LLVMBuildFAdd) LLVMValueRef
1287 (arg0 LLVMBuilderRef)
1288 (LHS LLVMValueRef)
1289 (RHS LLVMValueRef)
1290 (Name :string))
1292 (cffi:defcfun ("LLVMBuildSub" LLVMBuildSub) LLVMValueRef
1293 (arg0 LLVMBuilderRef)
1294 (LHS LLVMValueRef)
1295 (RHS LLVMValueRef)
1296 (Name :string))
1298 (cffi:defcfun ("LLVMBuildFSub" LLVMBuildFSub) LLVMValueRef
1299 (arg0 LLVMBuilderRef)
1300 (LHS LLVMValueRef)
1301 (RHS LLVMValueRef)
1302 (Name :string))
1304 (cffi:defcfun ("LLVMBuildMul" LLVMBuildMul) LLVMValueRef
1305 (arg0 LLVMBuilderRef)
1306 (LHS LLVMValueRef)
1307 (RHS LLVMValueRef)
1308 (Name :string))
1310 (cffi:defcfun ("LLVMBuildFMul" LLVMBuildFMul) LLVMValueRef
1311 (arg0 LLVMBuilderRef)
1312 (LHS LLVMValueRef)
1313 (RHS LLVMValueRef)
1314 (Name :string))
1316 (cffi:defcfun ("LLVMBuildUDiv" LLVMBuildUDiv) LLVMValueRef
1317 (arg0 LLVMBuilderRef)
1318 (LHS LLVMValueRef)
1319 (RHS LLVMValueRef)
1320 (Name :string))
1322 (cffi:defcfun ("LLVMBuildSDiv" LLVMBuildSDiv) LLVMValueRef
1323 (arg0 LLVMBuilderRef)
1324 (LHS LLVMValueRef)
1325 (RHS LLVMValueRef)
1326 (Name :string))
1328 (cffi:defcfun ("LLVMBuildExactSDiv" LLVMBuildExactSDiv) LLVMValueRef
1329 (arg0 LLVMBuilderRef)
1330 (LHS LLVMValueRef)
1331 (RHS LLVMValueRef)
1332 (Name :string))
1334 (cffi:defcfun ("LLVMBuildFDiv" LLVMBuildFDiv) LLVMValueRef
1335 (arg0 LLVMBuilderRef)
1336 (LHS LLVMValueRef)
1337 (RHS LLVMValueRef)
1338 (Name :string))
1340 (cffi:defcfun ("LLVMBuildURem" LLVMBuildURem) LLVMValueRef
1341 (arg0 LLVMBuilderRef)
1342 (LHS LLVMValueRef)
1343 (RHS LLVMValueRef)
1344 (Name :string))
1346 (cffi:defcfun ("LLVMBuildSRem" LLVMBuildSRem) LLVMValueRef
1347 (arg0 LLVMBuilderRef)
1348 (LHS LLVMValueRef)
1349 (RHS LLVMValueRef)
1350 (Name :string))
1352 (cffi:defcfun ("LLVMBuildFRem" LLVMBuildFRem) LLVMValueRef
1353 (arg0 LLVMBuilderRef)
1354 (LHS LLVMValueRef)
1355 (RHS LLVMValueRef)
1356 (Name :string))
1358 (cffi:defcfun ("LLVMBuildShl" LLVMBuildShl) LLVMValueRef
1359 (arg0 LLVMBuilderRef)
1360 (LHS LLVMValueRef)
1361 (RHS LLVMValueRef)
1362 (Name :string))
1364 (cffi:defcfun ("LLVMBuildLShr" LLVMBuildLShr) LLVMValueRef
1365 (arg0 LLVMBuilderRef)
1366 (LHS LLVMValueRef)
1367 (RHS LLVMValueRef)
1368 (Name :string))
1370 (cffi:defcfun ("LLVMBuildAShr" LLVMBuildAShr) LLVMValueRef
1371 (arg0 LLVMBuilderRef)
1372 (LHS LLVMValueRef)
1373 (RHS LLVMValueRef)
1374 (Name :string))
1376 (cffi:defcfun ("LLVMBuildAnd" LLVMBuildAnd) LLVMValueRef
1377 (arg0 LLVMBuilderRef)
1378 (LHS LLVMValueRef)
1379 (RHS LLVMValueRef)
1380 (Name :string))
1382 (cffi:defcfun ("LLVMBuildOr" LLVMBuildOr) LLVMValueRef
1383 (arg0 LLVMBuilderRef)
1384 (LHS LLVMValueRef)
1385 (RHS LLVMValueRef)
1386 (Name :string))
1388 (cffi:defcfun ("LLVMBuildXor" LLVMBuildXor) LLVMValueRef
1389 (arg0 LLVMBuilderRef)
1390 (LHS LLVMValueRef)
1391 (RHS LLVMValueRef)
1392 (Name :string))
1394 (cffi:defcfun ("LLVMBuildNeg" LLVMBuildNeg) LLVMValueRef
1395 (arg0 LLVMBuilderRef)
1396 (V LLVMValueRef)
1397 (Name :string))
1399 (cffi:defcfun ("LLVMBuildFNeg" LLVMBuildFNeg) LLVMValueRef
1400 (arg0 LLVMBuilderRef)
1401 (V LLVMValueRef)
1402 (Name :string))
1404 (cffi:defcfun ("LLVMBuildNot" LLVMBuildNot) LLVMValueRef
1405 (arg0 LLVMBuilderRef)
1406 (V LLVMValueRef)
1407 (Name :string))
1409 (cffi:defcfun ("LLVMBuildMalloc" LLVMBuildMalloc) LLVMValueRef
1410 (arg0 LLVMBuilderRef)
1411 (Ty LLVMTypeRef)
1412 (Name :string))
1414 (cffi:defcfun ("LLVMBuildArrayMalloc" LLVMBuildArrayMalloc) LLVMValueRef
1415 (arg0 LLVMBuilderRef)
1416 (Ty LLVMTypeRef)
1417 (Val LLVMValueRef)
1418 (Name :string))
1420 (cffi:defcfun ("LLVMBuildAlloca" LLVMBuildAlloca) LLVMValueRef
1421 (arg0 LLVMBuilderRef)
1422 (Ty LLVMTypeRef)
1423 (Name :string))
1425 (cffi:defcfun ("LLVMBuildArrayAlloca" LLVMBuildArrayAlloca) LLVMValueRef
1426 (arg0 LLVMBuilderRef)
1427 (Ty LLVMTypeRef)
1428 (Val LLVMValueRef)
1429 (Name :string))
1431 (cffi:defcfun ("LLVMBuildFree" LLVMBuildFree) LLVMValueRef
1432 (arg0 LLVMBuilderRef)
1433 (PointerVal LLVMValueRef))
1435 (cffi:defcfun ("LLVMBuildLoad" LLVMBuildLoad) LLVMValueRef
1436 (arg0 LLVMBuilderRef)
1437 (PointerVal LLVMValueRef)
1438 (Name :string))
1440 (cffi:defcfun ("LLVMBuildStore" LLVMBuildStore) LLVMValueRef
1441 (arg0 LLVMBuilderRef)
1442 (Val LLVMValueRef)
1443 (Ptr LLVMValueRef))
1445 (cffi:defcfun ("LLVMBuildGEP" %LLVMBuildGEP) LLVMValueRef
1446 (B LLVMBuilderRef)
1447 (Pointer LLVMValueRef)
1448 (Indices :pointer)
1449 (NumIndices :unsigned-int)
1450 (Name :string))
1452 (cffi:defcfun ("LLVMBuildInBoundsGEP" %LLVMBuildInBoundsGEP) LLVMValueRef
1453 (B LLVMBuilderRef)
1454 (Pointer LLVMValueRef)
1455 (Indices :pointer)
1456 (NumIndices :unsigned-int)
1457 (Name :string))
1459 (cffi:defcfun ("LLVMBuildStructGEP" LLVMBuildStructGEP) LLVMValueRef
1460 (B LLVMBuilderRef)
1461 (Pointer LLVMValueRef)
1462 (Idx :unsigned-int)
1463 (Name :string))
1465 (cffi:defcfun ("LLVMBuildGlobalString" LLVMBuildGlobalString) LLVMValueRef
1466 (B LLVMBuilderRef)
1467 (Str :string)
1468 (Name :string))
1470 (cffi:defcfun ("LLVMBuildGlobalStringPtr" LLVMBuildGlobalStringPtr) LLVMValueRef
1471 (B LLVMBuilderRef)
1472 (Str :string)
1473 (Name :string))
1475 (cffi:defcfun ("LLVMBuildTrunc" LLVMBuildTrunc) LLVMValueRef
1476 (arg0 LLVMBuilderRef)
1477 (Val LLVMValueRef)
1478 (DestTy LLVMTypeRef)
1479 (Name :string))
1481 (cffi:defcfun ("LLVMBuildZExt" LLVMBuildZExt) LLVMValueRef
1482 (arg0 LLVMBuilderRef)
1483 (Val LLVMValueRef)
1484 (DestTy LLVMTypeRef)
1485 (Name :string))
1487 (cffi:defcfun ("LLVMBuildSExt" LLVMBuildSExt) LLVMValueRef
1488 (arg0 LLVMBuilderRef)
1489 (Val LLVMValueRef)
1490 (DestTy LLVMTypeRef)
1491 (Name :string))
1493 (cffi:defcfun ("LLVMBuildFPToUI" LLVMBuildFPToUI) LLVMValueRef
1494 (arg0 LLVMBuilderRef)
1495 (Val LLVMValueRef)
1496 (DestTy LLVMTypeRef)
1497 (Name :string))
1499 (cffi:defcfun ("LLVMBuildFPToSI" LLVMBuildFPToSI) LLVMValueRef
1500 (arg0 LLVMBuilderRef)
1501 (Val LLVMValueRef)
1502 (DestTy LLVMTypeRef)
1503 (Name :string))
1505 (cffi:defcfun ("LLVMBuildUIToFP" LLVMBuildUIToFP) LLVMValueRef
1506 (arg0 LLVMBuilderRef)
1507 (Val LLVMValueRef)
1508 (DestTy LLVMTypeRef)
1509 (Name :string))
1511 (cffi:defcfun ("LLVMBuildSIToFP" LLVMBuildSIToFP) LLVMValueRef
1512 (arg0 LLVMBuilderRef)
1513 (Val LLVMValueRef)
1514 (DestTy LLVMTypeRef)
1515 (Name :string))
1517 (cffi:defcfun ("LLVMBuildFPTrunc" LLVMBuildFPTrunc) LLVMValueRef
1518 (arg0 LLVMBuilderRef)
1519 (Val LLVMValueRef)
1520 (DestTy LLVMTypeRef)
1521 (Name :string))
1523 (cffi:defcfun ("LLVMBuildFPExt" LLVMBuildFPExt) LLVMValueRef
1524 (arg0 LLVMBuilderRef)
1525 (Val LLVMValueRef)
1526 (DestTy LLVMTypeRef)
1527 (Name :string))
1529 (cffi:defcfun ("LLVMBuildPtrToInt" LLVMBuildPtrToInt) LLVMValueRef
1530 (arg0 LLVMBuilderRef)
1531 (Val LLVMValueRef)
1532 (DestTy LLVMTypeRef)
1533 (Name :string))
1535 (cffi:defcfun ("LLVMBuildIntToPtr" LLVMBuildIntToPtr) LLVMValueRef
1536 (arg0 LLVMBuilderRef)
1537 (Val LLVMValueRef)
1538 (DestTy LLVMTypeRef)
1539 (Name :string))
1541 (cffi:defcfun ("LLVMBuildBitCast" LLVMBuildBitCast) LLVMValueRef
1542 (arg0 LLVMBuilderRef)
1543 (Val LLVMValueRef)
1544 (DestTy LLVMTypeRef)
1545 (Name :string))
1547 (cffi:defcfun ("LLVMBuildZExtOrBitCast" LLVMBuildZExtOrBitCast) LLVMValueRef
1548 (arg0 LLVMBuilderRef)
1549 (Val LLVMValueRef)
1550 (DestTy LLVMTypeRef)
1551 (Name :string))
1553 (cffi:defcfun ("LLVMBuildSExtOrBitCast" LLVMBuildSExtOrBitCast) LLVMValueRef
1554 (arg0 LLVMBuilderRef)
1555 (Val LLVMValueRef)
1556 (DestTy LLVMTypeRef)
1557 (Name :string))
1559 (cffi:defcfun ("LLVMBuildTruncOrBitCast" LLVMBuildTruncOrBitCast) LLVMValueRef
1560 (arg0 LLVMBuilderRef)
1561 (Val LLVMValueRef)
1562 (DestTy LLVMTypeRef)
1563 (Name :string))
1565 (cffi:defcfun ("LLVMBuildPointerCast" LLVMBuildPointerCast) LLVMValueRef
1566 (arg0 LLVMBuilderRef)
1567 (Val LLVMValueRef)
1568 (DestTy LLVMTypeRef)
1569 (Name :string))
1571 (cffi:defcfun ("LLVMBuildIntCast" LLVMBuildIntCast) LLVMValueRef
1572 (arg0 LLVMBuilderRef)
1573 (Val LLVMValueRef)
1574 (DestTy LLVMTypeRef)
1575 (Name :string))
1577 (cffi:defcfun ("LLVMBuildFPCast" LLVMBuildFPCast) LLVMValueRef
1578 (arg0 LLVMBuilderRef)
1579 (Val LLVMValueRef)
1580 (DestTy LLVMTypeRef)
1581 (Name :string))
1583 (cffi:defcfun ("LLVMBuildICmp" LLVMBuildICmp) LLVMValueRef
1584 (arg0 LLVMBuilderRef)
1585 (Op LLVMIntPredicate)
1586 (LHS LLVMValueRef)
1587 (RHS LLVMValueRef)
1588 (Name :string))
1590 (cffi:defcfun ("LLVMBuildFCmp" LLVMBuildFCmp) LLVMValueRef
1591 (arg0 LLVMBuilderRef)
1592 (Op LLVMRealPredicate)
1593 (LHS LLVMValueRef)
1594 (RHS LLVMValueRef)
1595 (Name :string))
1597 (cffi:defcfun ("LLVMBuildPhi" LLVMBuildPhi) LLVMValueRef
1598 (arg0 LLVMBuilderRef)
1599 (Ty LLVMTypeRef)
1600 (Name :string))
1602 (cffi:defcfun ("LLVMBuildCall" %LLVMBuildCall) LLVMValueRef
1603 (arg0 LLVMBuilderRef)
1604 (Fn LLVMValueRef)
1605 (Args :pointer)
1606 (NumArgs :unsigned-int)
1607 (Name :string))
1609 (cffi:defcfun ("LLVMBuildSelect" LLVMBuildSelect) LLVMValueRef
1610 (arg0 LLVMBuilderRef)
1611 (If LLVMValueRef)
1612 (Then LLVMValueRef)
1613 (Else LLVMValueRef)
1614 (Name :string))
1616 (cffi:defcfun ("LLVMBuildVAArg" LLVMBuildVAArg) LLVMValueRef
1617 (arg0 LLVMBuilderRef)
1618 (List LLVMValueRef)
1619 (Ty LLVMTypeRef)
1620 (Name :string))
1622 (cffi:defcfun ("LLVMBuildExtractElement" LLVMBuildExtractElement) LLVMValueRef
1623 (arg0 LLVMBuilderRef)
1624 (VecVal LLVMValueRef)
1625 (Index LLVMValueRef)
1626 (Name :string))
1628 (cffi:defcfun ("LLVMBuildInsertElement" LLVMBuildInsertElement) LLVMValueRef
1629 (arg0 LLVMBuilderRef)
1630 (VecVal LLVMValueRef)
1631 (EltVal LLVMValueRef)
1632 (Index LLVMValueRef)
1633 (Name :string))
1635 (cffi:defcfun ("LLVMBuildShuffleVector" LLVMBuildShuffleVector) LLVMValueRef
1636 (arg0 LLVMBuilderRef)
1637 (V1 LLVMValueRef)
1638 (V2 LLVMValueRef)
1639 (Mask LLVMValueRef)
1640 (Name :string))
1642 (cffi:defcfun ("LLVMBuildExtractValue" LLVMBuildExtractValue) LLVMValueRef
1643 (arg0 LLVMBuilderRef)
1644 (AggVal LLVMValueRef)
1645 (Index :unsigned-int)
1646 (Name :string))
1648 (cffi:defcfun ("LLVMBuildInsertValue" LLVMBuildInsertValue) LLVMValueRef
1649 (arg0 LLVMBuilderRef)
1650 (AggVal LLVMValueRef)
1651 (EltVal LLVMValueRef)
1652 (Index :unsigned-int)
1653 (Name :string))
1655 (cffi:defcfun ("LLVMBuildIsNull" LLVMBuildIsNull) LLVMValueRef
1656 (arg0 LLVMBuilderRef)
1657 (Val LLVMValueRef)
1658 (Name :string))
1660 (cffi:defcfun ("LLVMBuildIsNotNull" LLVMBuildIsNotNull) LLVMValueRef
1661 (arg0 LLVMBuilderRef)
1662 (Val LLVMValueRef)
1663 (Name :string))
1665 (cffi:defcfun ("LLVMBuildPtrDiff" LLVMBuildPtrDiff) LLVMValueRef
1666 (arg0 LLVMBuilderRef)
1667 (LHS LLVMValueRef)
1668 (RHS LLVMValueRef)
1669 (Name :string))
1671 (cffi:defcfun ("LLVMCreateModuleProviderForExistingModule" LLVMCreateModuleProviderForExistingModule) LLVMModuleProviderRef
1672 (M LLVMModuleRef))
1674 (cffi:defcfun ("LLVMDisposeModuleProvider" LLVMDisposeModuleProvider) :void
1675 (MP LLVMModuleProviderRef))
1677 (cffi:defcfun ("LLVMCreateMemoryBufferWithContentsOfFile" LLVMCreateMemoryBufferWithContentsOfFile) :boolean
1678 (Path :string)
1679 (OutMemBuf :pointer)
1680 (OutMessage :pointer))
1682 (cffi:defcfun ("LLVMCreateMemoryBufferWithSTDIN" LLVMCreateMemoryBufferWithSTDIN) :boolean
1683 (OutMemBuf :pointer)
1684 (OutMessage :pointer))
1686 (cffi:defcfun ("LLVMDisposeMemoryBuffer" LLVMDisposeMemoryBuffer) :void
1687 (MemBuf LLVMMemoryBufferRef))
1689 (cffi:defcfun ("LLVMCreatePassManager" LLVMCreatePassManager) LLVMPassManagerRef)
1691 (cffi:defcfun ("LLVMCreateFunctionPassManager" LLVMCreateFunctionPassManager) LLVMPassManagerRef
1692 (MP LLVMModuleProviderRef))
1694 (cffi:defcfun ("LLVMRunPassManager" LLVMRunPassManager) :boolean
1695 (PM LLVMPassManagerRef)
1696 (M LLVMModuleRef))
1698 (cffi:defcfun ("LLVMInitializeFunctionPassManager" LLVMInitializeFunctionPassManager) :boolean
1699 (FPM LLVMPassManagerRef))
1701 (cffi:defcfun ("LLVMRunFunctionPassManager" LLVMRunFunctionPassManager) :boolean
1702 (FPM LLVMPassManagerRef)
1703 (F LLVMValueRef))
1705 (cffi:defcfun ("LLVMFinalizeFunctionPassManager" LLVMFinalizeFunctionPassManager) :boolean
1706 (FPM LLVMPassManagerRef))
1708 (cffi:defcfun ("LLVMDisposePassManager" LLVMDisposePassManager) :void
1709 (PM LLVMPassManagerRef))
1711 ;;; The wrappers to expose the "InContext" versions of the functions
1712 ;;; in a more lispy way.
1713 (declaim (special *llvm-context*))
1715 (defun LLVMModuleCreateWithName (ModuleId &optional (context *llvm-context*))
1716 (%LLVMModuleCreateWithNameInContext ModuleId context))
1718 (defun LLVMInt1Type (&optional (context *llvm-context*))
1719 (%LLVMInt1TypeInContext context))
1721 (defun LLVMInt8Type (&optional (context *llvm-context*))
1722 (%LLVMInt8TypeInContext context))
1724 (defun LLVMInt16Type (&optional (context *llvm-context*))
1725 (%LLVMInt16TypeInContext context))
1727 (defun LLVMInt32Type (&optional (context *llvm-context*))
1728 (%LLVMInt32TypeInContext context))
1730 (defun LLVMInt64Type (&optional (context *llvm-context*))
1731 (%LLVMInt64TypeInContext context))
1733 (defun LLVMIntType (NumBits &optional (context *llvm-context*))
1734 (%LLVMIntTypeInContext context NumBits))
1736 (defun LLVMFloatType (&optional (context *llvm-context*))
1737 (%LLVMFloatTypeInContext context))
1739 (defun LLVMDoubleType (&optional (context *llvm-context*))
1740 (%LLVMDoubleTypeInContext context))
1742 (defun LLVMX86FP80Type (&optional (context *llvm-context*))
1743 (%LLVMX86FP80TypeInContext context))
1745 (defun LLVMFP128Type (&optional (context *llvm-context*))
1746 (%LLVMFP128TypeInContext context))
1748 (defun LLVMPPCFP128Type (&optional (context *llvm-context*))
1749 (%LLVMPPCFP128TypeInContext context))
1751 ;; LLVMStructTypeInContext handled below.
1753 (defun LLVMVoidType (&optional (context *llvm-context*))
1754 (%LLVMVoidTypeInContext context))
1756 (defun LLVMLabelType (&optional (context *llvm-context*))
1757 (%LLVMLabelTypeInContext context))
1759 (defun LLVMOpaqueType (&optional (context *llvm-context*))
1760 (%LLVMOpaqueTypeInContext context))
1762 ;; LLVMConstStringInContext handled below
1763 ;; LLVMConstStructInContext handled below
1765 (defun LLVMAppendBasicBlock (Fn Name &optional (context *llvm-context*))
1766 (%LLVMAppendBasicBlockInContext context Fn Name))
1768 (defun LLVMInsertBasicBlock (BB Name &optional (context *llvm-context*))
1769 (%LLVMInsertBasicBlockInContext context BB Name))
1771 (defun LLVMCreateBuilder (&optional (context *llvm-context*))
1772 (%LLVMCreateBuilderInContext context))
1775 ;; More complex wrappers for dealing with pointers.
1777 (defmacro with-array-and-length ((array len list) &body body)
1778 (let ((list-v (gensym "list")))
1779 `(let* ((,list-v ,list)
1780 (,len (length ,list-v)))
1781 (cffi:with-foreign-object (,array :pointer ,len)
1782 (loop for l in ,list-v
1783 for i from 0
1785 (setf (cffi:mem-aref ,array :pointer i) l))
1786 (progn ,@body)))))
1788 (defun LLVMFunctionType (ret params is-var-arg)
1789 "Combines the C API's ParamTypes array and ParamCount arguments into
1790 a single list PARAMS."
1791 (with-array-and-length (array len params)
1792 (%LLVMFunctionType ret array len is-var-arg)))
1794 (defun LLVMGetParamTypes (function-type)
1795 "Returns a list of param types rather than filling out a Dest pointer argument"
1796 (let ((len (LLVMCountParamTypes function-type)))
1797 (cffi:with-foreign-object (array :pointer len)
1798 (%LLVMGetParamTypes function-type array)
1799 (loop for i from 0 below len
1800 collect
1801 (cffi:mem-aref array :pointer i)))))
1803 (defun LLVMStructType (element-types is-packed &optional (context *llvm-context*))
1804 (with-array-and-length (array len element-types)
1805 (%LLVMStructTypeInContext context array len is-packed)))
1807 (defun LLVMGetStructElementTypes (struct-type)
1808 "Returns a list of param types rather than filling out a Dest pointer argument"
1809 (let ((len (LLVMCountStructElementTypes struct-type)))
1810 (cffi:with-foreign-object (array :pointer len)
1811 (%LLVMGetStructElementTypes struct-type array)
1812 (loop for i from 0 below len
1813 collect
1814 (cffi:mem-aref array :pointer i)))))
1816 (defun LLVMConstString (str dont-null-terminate &optional (context *llvm-context*))
1817 (cffi:with-foreign-string ((foreign-string num-bytes) str)
1818 (%LLVMConstStringInContext context foreign-string num-bytes dont-null-terminate)))
1820 (defun LLVMConstStruct (vals packed-p &optional (context *llvm-context*))
1821 (with-array-and-length (array len vals)
1822 (%LLVMConstStructInContext context array len packed-p)))
1824 (defun LLVMConstArray (type vals)
1825 (with-array-and-length (array len vals)
1826 (%LLVMConstArray type array len)))
1828 (defun LLVMConstVector (vals)
1829 (with-array-and-length (array len vals)
1830 (%LLVMConstVector array len)))
1832 (defun LLVMConstGEP (ptr indices)
1833 (with-array-and-length (array len indices)
1834 (%LLVMConstGEP ptr array len)))
1836 (defun LLVMConstInBoundsGEP (ptr indices)
1837 (with-array-and-length (array len indices)
1838 (%LLVMConstInBoundsGEP ptr array len)))
1840 (defun LLVMConstExtractValue (AggConstant indices)
1841 (with-array-and-length (array len indices)
1842 (%LLVMConstExtractValue AggConstant array len)))
1844 (defun LLVMConstInsertValue (AggConstant ValConstant indices)
1845 (with-array-and-length (array len indices)
1846 (%LLVMConstInsertValue AggConstant ValConstant array len)))
1848 (defun LLVMGetParams (fn)
1849 "Returns a list of params rather than filling out a Dest pointer argument."
1850 (let ((len (LLVMCountParams fn)))
1851 (cffi:with-foreign-object (array :pointer len)
1852 (%LLVMGetParams fn array)
1853 (loop for i from 0 below len
1854 collect
1855 (cffi:mem-aref array :pointer i)))))
1857 (defun LLVMAddIncoming (phi-node incoming-val incoming-block)
1858 "Unlike the C API (but like the C++ API...), takes only a single
1859 incoming val and incoming block. Call multiple times if you want to
1860 add multiple incoming values."
1861 (cffi:with-foreign-objects ((incoming-vals :pointer)
1862 (incoming-blocks :pointer))
1863 (setf (cffi:mem-aref incoming-vals :pointer 0) incoming-val)
1864 (setf (cffi:mem-aref incoming-blocks :pointer 0) incoming-block)
1865 (%LLVMAddIncoming phi-node incoming-vals incoming-blocks 1)))
1867 (defun LLVMBuildAggregateRet (builder vals)
1868 (with-array-and-length (array len vals)
1869 (%LLVMBuildAggregateRet builder array len)))
1871 (defun LLVMBuildInvoke (builder fn args then catch name)
1872 (with-array-and-length (array len args)
1873 (%LLVMBuildInvoke builder fn array len then catch name)))
1875 (defun LLVMBuildGEP (builder ptr indices name)
1876 (with-array-and-length (array len indices)
1877 (%LLVMBuildGEP builder ptr array len name)))
1879 (defun LLVMBuildInBoundsGEP (builder ptr indices name)
1880 (with-array-and-length (array len indices)
1881 (%LLVMBuildInBoundsGEP builder ptr array len name)))
1883 (defun LLVMBuildCall (builder fn args name)
1884 "Combines the C API's Args array and NumArgs arguments into a single
1885 list ARGS."
1886 (with-array-and-length (array len args)
1887 (%LLVMBuildCall builder fn array len name)))
1889 ;; TODO:
1890 ;; LLVMCreateMemoryBufferWithContentsOfFile has OutMemBuf, OutMessage
1891 ;; LLVMCreateMemoryBufferWithSTDIN has OutMemBuf, OutMessage