Start to clean things up to get into a state usable by others.
[cl-llvm.git] / src / generated / core.lisp
blob605d318a6ba6931a2ee65f3e34c4f364939c51da
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:defcenum 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))
905 (cffi:defcfun ("LLVMGetGlobalParent" LLVMGetGlobalParent) LLVMModuleRef
906 (Global LLVMValueRef))
908 (cffi:defcfun ("LLVMIsDeclaration" LLVMIsDeclaration) :boolean
909 (Global LLVMValueRef))
911 (cffi:defcfun ("LLVMGetLinkage" LLVMGetLinkage) LLVMLinkage
912 (Global LLVMValueRef))
914 (cffi:defcfun ("LLVMSetLinkage" LLVMSetLinkage) :void
915 (Global LLVMValueRef)
916 (Linkage LLVMLinkage))
918 (cffi:defcfun ("LLVMGetSection" LLVMGetSection) :string
919 (Global LLVMValueRef))
921 (cffi:defcfun ("LLVMSetSection" LLVMSetSection) :void
922 (Global LLVMValueRef)
923 (Section :string))
925 (cffi:defcfun ("LLVMGetVisibility" LLVMGetVisibility) LLVMVisibility
926 (Global LLVMValueRef))
928 (cffi:defcfun ("LLVMSetVisibility" LLVMSetVisibility) :void
929 (Global LLVMValueRef)
930 (Viz LLVMVisibility))
932 (cffi:defcfun ("LLVMGetAlignment" LLVMGetAlignment) :unsigned-int
933 (Global LLVMValueRef))
935 (cffi:defcfun ("LLVMSetAlignment" LLVMSetAlignment) :void
936 (Global LLVMValueRef)
937 (Bytes :unsigned-int))
939 (cffi:defcfun ("LLVMAddGlobal" LLVMAddGlobal) LLVMValueRef
940 (M LLVMModuleRef)
941 (Ty LLVMTypeRef)
942 (Name :string))
944 (cffi:defcfun ("LLVMGetNamedGlobal" LLVMGetNamedGlobal) LLVMValueRef
945 (M LLVMModuleRef)
946 (Name :string))
948 (cffi:defcfun ("LLVMGetFirstGlobal" LLVMGetFirstGlobal) LLVMValueRef
949 (M LLVMModuleRef))
951 (cffi:defcfun ("LLVMGetLastGlobal" LLVMGetLastGlobal) LLVMValueRef
952 (M LLVMModuleRef))
954 (cffi:defcfun ("LLVMGetNextGlobal" LLVMGetNextGlobal) LLVMValueRef
955 (GlobalVar LLVMValueRef))
957 (cffi:defcfun ("LLVMGetPreviousGlobal" LLVMGetPreviousGlobal) LLVMValueRef
958 (GlobalVar LLVMValueRef))
960 (cffi:defcfun ("LLVMDeleteGlobal" LLVMDeleteGlobal) :void
961 (GlobalVar LLVMValueRef))
963 (cffi:defcfun ("LLVMGetInitializer" LLVMGetInitializer) LLVMValueRef
964 (GlobalVar LLVMValueRef))
966 (cffi:defcfun ("LLVMSetInitializer" LLVMSetInitializer) :void
967 (GlobalVar LLVMValueRef)
968 (ConstantVal LLVMValueRef))
970 (cffi:defcfun ("LLVMIsThreadLocal" LLVMIsThreadLocal) :boolean
971 (GlobalVar LLVMValueRef))
973 (cffi:defcfun ("LLVMSetThreadLocal" LLVMSetThreadLocal) :void
974 (GlobalVar LLVMValueRef)
975 (IsThreadLocal :boolean))
977 (cffi:defcfun ("LLVMIsGlobalConstant" LLVMIsGlobalConstant) :boolean
978 (GlobalVar LLVMValueRef))
980 (cffi:defcfun ("LLVMSetGlobalConstant" LLVMSetGlobalConstant) :void
981 (GlobalVar LLVMValueRef)
982 (IsConstant :boolean))
984 (cffi:defcfun ("LLVMAddAlias" LLVMAddAlias) LLVMValueRef
985 (M LLVMModuleRef)
986 (Ty LLVMTypeRef)
987 (Aliasee LLVMValueRef)
988 (Name :string))
990 (cffi:defcfun ("LLVMAddFunction" LLVMAddFunction) LLVMValueRef
991 (M LLVMModuleRef)
992 (Name :string)
993 (FunctionTy LLVMTypeRef))
995 (cffi:defcfun ("LLVMGetNamedFunction" LLVMGetNamedFunction) LLVMValueRef
996 (M LLVMModuleRef)
997 (Name :string))
999 (cffi:defcfun ("LLVMGetFirstFunction" LLVMGetFirstFunction) LLVMValueRef
1000 (M LLVMModuleRef))
1002 (cffi:defcfun ("LLVMGetLastFunction" LLVMGetLastFunction) LLVMValueRef
1003 (M LLVMModuleRef))
1005 (cffi:defcfun ("LLVMGetNextFunction" LLVMGetNextFunction) LLVMValueRef
1006 (Fn LLVMValueRef))
1008 (cffi:defcfun ("LLVMGetPreviousFunction" LLVMGetPreviousFunction) LLVMValueRef
1009 (Fn LLVMValueRef))
1011 (cffi:defcfun ("LLVMDeleteFunction" LLVMDeleteFunction) :void
1012 (Fn LLVMValueRef))
1014 (cffi:defcfun ("LLVMGetIntrinsicID" LLVMGetIntrinsicID) :unsigned-int
1015 (Fn LLVMValueRef))
1017 (cffi:defcfun ("LLVMGetFunctionCallConv" LLVMGetFunctionCallConv) :unsigned-int
1018 (Fn LLVMValueRef))
1020 (cffi:defcfun ("LLVMSetFunctionCallConv" LLVMSetFunctionCallConv) :void
1021 (Fn LLVMValueRef)
1022 (CC :unsigned-int))
1024 (cffi:defcfun ("LLVMGetGC" LLVMGetGC) :string
1025 (Fn LLVMValueRef))
1027 (cffi:defcfun ("LLVMSetGC" LLVMSetGC) :void
1028 (Fn LLVMValueRef)
1029 (Name :string))
1031 (cffi:defcfun ("LLVMAddFunctionAttr" LLVMAddFunctionAttr) :void
1032 (Fn LLVMValueRef)
1033 (PA LLVMAttribute))
1035 (cffi:defcfun ("LLVMGetFunctionAttr" LLVMGetFunctionAttr) LLVMAttribute
1036 (Fn LLVMValueRef))
1038 (cffi:defcfun ("LLVMRemoveFunctionAttr" LLVMRemoveFunctionAttr) :void
1039 (Fn LLVMValueRef)
1040 (PA LLVMAttribute))
1042 (cffi:defcfun ("LLVMCountParams" LLVMCountParams) :unsigned-int
1043 (Fn LLVMValueRef))
1045 (cffi:defcfun ("LLVMGetParams" %LLVMGetParams) :void
1046 (Fn LLVMValueRef)
1047 (Params :pointer))
1049 (cffi:defcfun ("LLVMGetParam" LLVMGetParam) LLVMValueRef
1050 (Fn LLVMValueRef)
1051 (Index :unsigned-int))
1053 (cffi:defcfun ("LLVMGetParamParent" LLVMGetParamParent) LLVMValueRef
1054 (Inst LLVMValueRef))
1056 (cffi:defcfun ("LLVMGetFirstParam" LLVMGetFirstParam) LLVMValueRef
1057 (Fn LLVMValueRef))
1059 (cffi:defcfun ("LLVMGetLastParam" LLVMGetLastParam) LLVMValueRef
1060 (Fn LLVMValueRef))
1062 (cffi:defcfun ("LLVMGetNextParam" LLVMGetNextParam) LLVMValueRef
1063 (Arg LLVMValueRef))
1065 (cffi:defcfun ("LLVMGetPreviousParam" LLVMGetPreviousParam) LLVMValueRef
1066 (Arg LLVMValueRef))
1068 (cffi:defcfun ("LLVMAddAttribute" LLVMAddAttribute) :void
1069 (Arg LLVMValueRef)
1070 (PA LLVMAttribute))
1072 (cffi:defcfun ("LLVMRemoveAttribute" LLVMRemoveAttribute) :void
1073 (Arg LLVMValueRef)
1074 (PA LLVMAttribute))
1076 (cffi:defcfun ("LLVMGetAttribute" LLVMGetAttribute) LLVMAttribute
1077 (Arg LLVMValueRef))
1079 (cffi:defcfun ("LLVMSetParamAlignment" LLVMSetParamAlignment) :void
1080 (Arg LLVMValueRef)
1081 (align :unsigned-int))
1083 (cffi:defcfun ("LLVMBasicBlockAsValue" LLVMBasicBlockAsValue) LLVMValueRef
1084 (BB LLVMBasicBlockRef))
1086 (cffi:defcfun ("LLVMValueIsBasicBlock" LLVMValueIsBasicBlock) :boolean
1087 (Val LLVMValueRef))
1089 (cffi:defcfun ("LLVMValueAsBasicBlock" LLVMValueAsBasicBlock) LLVMBasicBlockRef
1090 (Val LLVMValueRef))
1092 (cffi:defcfun ("LLVMGetBasicBlockParent" LLVMGetBasicBlockParent) LLVMValueRef
1093 (BB LLVMBasicBlockRef))
1095 (cffi:defcfun ("LLVMCountBasicBlocks" LLVMCountBasicBlocks) :unsigned-int
1096 (Fn LLVMValueRef))
1098 (cffi:defcfun ("LLVMGetBasicBlocks" LLVMGetBasicBlocks) :void
1099 (Fn LLVMValueRef)
1100 (BasicBlocks :pointer))
1102 (cffi:defcfun ("LLVMGetFirstBasicBlock" LLVMGetFirstBasicBlock) LLVMBasicBlockRef
1103 (Fn LLVMValueRef))
1105 (cffi:defcfun ("LLVMGetLastBasicBlock" LLVMGetLastBasicBlock) LLVMBasicBlockRef
1106 (Fn LLVMValueRef))
1108 (cffi:defcfun ("LLVMGetNextBasicBlock" LLVMGetNextBasicBlock) LLVMBasicBlockRef
1109 (BB LLVMBasicBlockRef))
1111 (cffi:defcfun ("LLVMGetPreviousBasicBlock" LLVMGetPreviousBasicBlock) LLVMBasicBlockRef
1112 (BB LLVMBasicBlockRef))
1114 (cffi:defcfun ("LLVMGetEntryBasicBlock" LLVMGetEntryBasicBlock) LLVMBasicBlockRef
1115 (Fn LLVMValueRef))
1117 (cffi:defcfun ("LLVMAppendBasicBlockInContext" %LLVMAppendBasicBlockInContext) LLVMBasicBlockRef
1118 (C LLVMContextRef)
1119 (Fn LLVMValueRef)
1120 (Name :string))
1122 (cffi:defcfun ("LLVMInsertBasicBlockInContext" %LLVMInsertBasicBlockInContext) LLVMBasicBlockRef
1123 (C LLVMContextRef)
1124 (BB LLVMBasicBlockRef)
1125 (Name :string))
1127 (cffi:defcfun ("LLVMDeleteBasicBlock" LLVMDeleteBasicBlock) :void
1128 (BB LLVMBasicBlockRef))
1130 (cffi:defcfun ("LLVMGetInstructionParent" LLVMGetInstructionParent) LLVMBasicBlockRef
1131 (Inst LLVMValueRef))
1133 (cffi:defcfun ("LLVMGetFirstInstruction" LLVMGetFirstInstruction) LLVMValueRef
1134 (BB LLVMBasicBlockRef))
1136 (cffi:defcfun ("LLVMGetLastInstruction" LLVMGetLastInstruction) LLVMValueRef
1137 (BB LLVMBasicBlockRef))
1139 (cffi:defcfun ("LLVMGetNextInstruction" LLVMGetNextInstruction) LLVMValueRef
1140 (Inst LLVMValueRef))
1142 (cffi:defcfun ("LLVMGetPreviousInstruction" LLVMGetPreviousInstruction) LLVMValueRef
1143 (Inst LLVMValueRef))
1145 (cffi:defcfun ("LLVMSetInstructionCallConv" LLVMSetInstructionCallConv) :void
1146 (Instr LLVMValueRef)
1147 (CC :unsigned-int))
1149 (cffi:defcfun ("LLVMGetInstructionCallConv" LLVMGetInstructionCallConv) :unsigned-int
1150 (Instr LLVMValueRef))
1152 (cffi:defcfun ("LLVMAddInstrAttribute" LLVMAddInstrAttribute) :void
1153 (Instr LLVMValueRef)
1154 (index :unsigned-int)
1155 (arg2 LLVMAttribute))
1157 (cffi:defcfun ("LLVMRemoveInstrAttribute" LLVMRemoveInstrAttribute) :void
1158 (Instr LLVMValueRef)
1159 (index :unsigned-int)
1160 (arg2 LLVMAttribute))
1162 (cffi:defcfun ("LLVMSetInstrParamAlignment" LLVMSetInstrParamAlignment) :void
1163 (Instr LLVMValueRef)
1164 (index :unsigned-int)
1165 (align :unsigned-int))
1167 (cffi:defcfun ("LLVMIsTailCall" LLVMIsTailCall) :boolean
1168 (CallInst LLVMValueRef))
1170 (cffi:defcfun ("LLVMSetTailCall" LLVMSetTailCall) :void
1171 (CallInst LLVMValueRef)
1172 (IsTailCall :boolean))
1174 (cffi:defcfun ("LLVMAddIncoming" %LLVMAddIncoming) :void
1175 (PhiNode LLVMValueRef)
1176 (IncomingValues :pointer)
1177 (IncomingBlocks :pointer)
1178 (Count :unsigned-int))
1180 (cffi:defcfun ("LLVMCountIncoming" LLVMCountIncoming) :unsigned-int
1181 (PhiNode LLVMValueRef))
1183 (cffi:defcfun ("LLVMGetIncomingValue" LLVMGetIncomingValue) LLVMValueRef
1184 (PhiNode LLVMValueRef)
1185 (Index :unsigned-int))
1187 (cffi:defcfun ("LLVMGetIncomingBlock" LLVMGetIncomingBlock) LLVMBasicBlockRef
1188 (PhiNode LLVMValueRef)
1189 (Index :unsigned-int))
1191 (cffi:defcfun ("LLVMCreateBuilderInContext" %LLVMCreateBuilderInContext) LLVMBuilderRef
1192 (C LLVMContextRef))
1194 (cffi:defcfun ("LLVMPositionBuilder" LLVMPositionBuilder) :void
1195 (Builder LLVMBuilderRef)
1196 (Block LLVMBasicBlockRef)
1197 (Instr LLVMValueRef))
1199 (cffi:defcfun ("LLVMPositionBuilderBefore" LLVMPositionBuilderBefore) :void
1200 (Builder LLVMBuilderRef)
1201 (Instr LLVMValueRef))
1203 (cffi:defcfun ("LLVMPositionBuilderAtEnd" LLVMPositionBuilderAtEnd) :void
1204 (Builder LLVMBuilderRef)
1205 (Block LLVMBasicBlockRef))
1207 (cffi:defcfun ("LLVMGetInsertBlock" LLVMGetInsertBlock) LLVMBasicBlockRef
1208 (Builder LLVMBuilderRef))
1210 (cffi:defcfun ("LLVMClearInsertionPosition" LLVMClearInsertionPosition) :void
1211 (Builder LLVMBuilderRef))
1213 (cffi:defcfun ("LLVMInsertIntoBuilder" LLVMInsertIntoBuilder) :void
1214 (Builder LLVMBuilderRef)
1215 (Instr LLVMValueRef))
1217 (cffi:defcfun ("LLVMInsertIntoBuilderWithName" LLVMInsertIntoBuilderWithName) :void
1218 (Builder LLVMBuilderRef)
1219 (Instr LLVMValueRef)
1220 (Name :string))
1222 (cffi:defcfun ("LLVMDisposeBuilder" LLVMDisposeBuilder) :void
1223 (Builder LLVMBuilderRef))
1225 (cffi:defcfun ("LLVMBuildRetVoid" LLVMBuildRetVoid) LLVMValueRef
1226 (arg0 LLVMBuilderRef))
1228 (cffi:defcfun ("LLVMBuildRet" LLVMBuildRet) LLVMValueRef
1229 (arg0 LLVMBuilderRef)
1230 (V LLVMValueRef))
1232 (cffi:defcfun ("LLVMBuildAggregateRet" %LLVMBuildAggregateRet) LLVMValueRef
1233 (arg0 LLVMBuilderRef)
1234 (RetVals :pointer)
1235 (N :unsigned-int))
1237 (cffi:defcfun ("LLVMBuildBr" LLVMBuildBr) LLVMValueRef
1238 (arg0 LLVMBuilderRef)
1239 (Dest LLVMBasicBlockRef))
1241 (cffi:defcfun ("LLVMBuildCondBr" LLVMBuildCondBr) LLVMValueRef
1242 (arg0 LLVMBuilderRef)
1243 (If LLVMValueRef)
1244 (Then LLVMBasicBlockRef)
1245 (Else LLVMBasicBlockRef))
1247 (cffi:defcfun ("LLVMBuildSwitch" LLVMBuildSwitch) LLVMValueRef
1248 (arg0 LLVMBuilderRef)
1249 (V LLVMValueRef)
1250 (Else LLVMBasicBlockRef)
1251 (NumCases :unsigned-int))
1253 (cffi:defcfun ("LLVMBuildInvoke" %LLVMBuildInvoke) LLVMValueRef
1254 (arg0 LLVMBuilderRef)
1255 (Fn LLVMValueRef)
1256 (Args :pointer)
1257 (NumArgs :unsigned-int)
1258 (Then LLVMBasicBlockRef)
1259 (Catch LLVMBasicBlockRef)
1260 (Name :string))
1262 (cffi:defcfun ("LLVMBuildUnwind" LLVMBuildUnwind) LLVMValueRef
1263 (arg0 LLVMBuilderRef))
1265 (cffi:defcfun ("LLVMBuildUnreachable" LLVMBuildUnreachable) LLVMValueRef
1266 (arg0 LLVMBuilderRef))
1268 (cffi:defcfun ("LLVMAddCase" LLVMAddCase) :void
1269 (Switch LLVMValueRef)
1270 (OnVal LLVMValueRef)
1271 (Dest LLVMBasicBlockRef))
1273 (cffi:defcfun ("LLVMBuildAdd" LLVMBuildAdd) LLVMValueRef
1274 (arg0 LLVMBuilderRef)
1275 (LHS LLVMValueRef)
1276 (RHS LLVMValueRef)
1277 (Name :string))
1279 (cffi:defcfun ("LLVMBuildNSWAdd" LLVMBuildNSWAdd) LLVMValueRef
1280 (arg0 LLVMBuilderRef)
1281 (LHS LLVMValueRef)
1282 (RHS LLVMValueRef)
1283 (Name :string))
1285 (cffi:defcfun ("LLVMBuildFAdd" LLVMBuildFAdd) LLVMValueRef
1286 (arg0 LLVMBuilderRef)
1287 (LHS LLVMValueRef)
1288 (RHS LLVMValueRef)
1289 (Name :string))
1291 (cffi:defcfun ("LLVMBuildSub" LLVMBuildSub) LLVMValueRef
1292 (arg0 LLVMBuilderRef)
1293 (LHS LLVMValueRef)
1294 (RHS LLVMValueRef)
1295 (Name :string))
1297 (cffi:defcfun ("LLVMBuildFSub" LLVMBuildFSub) LLVMValueRef
1298 (arg0 LLVMBuilderRef)
1299 (LHS LLVMValueRef)
1300 (RHS LLVMValueRef)
1301 (Name :string))
1303 (cffi:defcfun ("LLVMBuildMul" LLVMBuildMul) LLVMValueRef
1304 (arg0 LLVMBuilderRef)
1305 (LHS LLVMValueRef)
1306 (RHS LLVMValueRef)
1307 (Name :string))
1309 (cffi:defcfun ("LLVMBuildFMul" LLVMBuildFMul) LLVMValueRef
1310 (arg0 LLVMBuilderRef)
1311 (LHS LLVMValueRef)
1312 (RHS LLVMValueRef)
1313 (Name :string))
1315 (cffi:defcfun ("LLVMBuildUDiv" LLVMBuildUDiv) LLVMValueRef
1316 (arg0 LLVMBuilderRef)
1317 (LHS LLVMValueRef)
1318 (RHS LLVMValueRef)
1319 (Name :string))
1321 (cffi:defcfun ("LLVMBuildSDiv" LLVMBuildSDiv) LLVMValueRef
1322 (arg0 LLVMBuilderRef)
1323 (LHS LLVMValueRef)
1324 (RHS LLVMValueRef)
1325 (Name :string))
1327 (cffi:defcfun ("LLVMBuildExactSDiv" LLVMBuildExactSDiv) LLVMValueRef
1328 (arg0 LLVMBuilderRef)
1329 (LHS LLVMValueRef)
1330 (RHS LLVMValueRef)
1331 (Name :string))
1333 (cffi:defcfun ("LLVMBuildFDiv" LLVMBuildFDiv) LLVMValueRef
1334 (arg0 LLVMBuilderRef)
1335 (LHS LLVMValueRef)
1336 (RHS LLVMValueRef)
1337 (Name :string))
1339 (cffi:defcfun ("LLVMBuildURem" LLVMBuildURem) LLVMValueRef
1340 (arg0 LLVMBuilderRef)
1341 (LHS LLVMValueRef)
1342 (RHS LLVMValueRef)
1343 (Name :string))
1345 (cffi:defcfun ("LLVMBuildSRem" LLVMBuildSRem) LLVMValueRef
1346 (arg0 LLVMBuilderRef)
1347 (LHS LLVMValueRef)
1348 (RHS LLVMValueRef)
1349 (Name :string))
1351 (cffi:defcfun ("LLVMBuildFRem" LLVMBuildFRem) LLVMValueRef
1352 (arg0 LLVMBuilderRef)
1353 (LHS LLVMValueRef)
1354 (RHS LLVMValueRef)
1355 (Name :string))
1357 (cffi:defcfun ("LLVMBuildShl" LLVMBuildShl) LLVMValueRef
1358 (arg0 LLVMBuilderRef)
1359 (LHS LLVMValueRef)
1360 (RHS LLVMValueRef)
1361 (Name :string))
1363 (cffi:defcfun ("LLVMBuildLShr" LLVMBuildLShr) LLVMValueRef
1364 (arg0 LLVMBuilderRef)
1365 (LHS LLVMValueRef)
1366 (RHS LLVMValueRef)
1367 (Name :string))
1369 (cffi:defcfun ("LLVMBuildAShr" LLVMBuildAShr) LLVMValueRef
1370 (arg0 LLVMBuilderRef)
1371 (LHS LLVMValueRef)
1372 (RHS LLVMValueRef)
1373 (Name :string))
1375 (cffi:defcfun ("LLVMBuildAnd" LLVMBuildAnd) LLVMValueRef
1376 (arg0 LLVMBuilderRef)
1377 (LHS LLVMValueRef)
1378 (RHS LLVMValueRef)
1379 (Name :string))
1381 (cffi:defcfun ("LLVMBuildOr" LLVMBuildOr) LLVMValueRef
1382 (arg0 LLVMBuilderRef)
1383 (LHS LLVMValueRef)
1384 (RHS LLVMValueRef)
1385 (Name :string))
1387 (cffi:defcfun ("LLVMBuildXor" LLVMBuildXor) LLVMValueRef
1388 (arg0 LLVMBuilderRef)
1389 (LHS LLVMValueRef)
1390 (RHS LLVMValueRef)
1391 (Name :string))
1393 (cffi:defcfun ("LLVMBuildNeg" LLVMBuildNeg) LLVMValueRef
1394 (arg0 LLVMBuilderRef)
1395 (V LLVMValueRef)
1396 (Name :string))
1398 (cffi:defcfun ("LLVMBuildFNeg" LLVMBuildFNeg) LLVMValueRef
1399 (arg0 LLVMBuilderRef)
1400 (V LLVMValueRef)
1401 (Name :string))
1403 (cffi:defcfun ("LLVMBuildNot" LLVMBuildNot) LLVMValueRef
1404 (arg0 LLVMBuilderRef)
1405 (V LLVMValueRef)
1406 (Name :string))
1408 (cffi:defcfun ("LLVMBuildMalloc" LLVMBuildMalloc) LLVMValueRef
1409 (arg0 LLVMBuilderRef)
1410 (Ty LLVMTypeRef)
1411 (Name :string))
1413 (cffi:defcfun ("LLVMBuildArrayMalloc" LLVMBuildArrayMalloc) LLVMValueRef
1414 (arg0 LLVMBuilderRef)
1415 (Ty LLVMTypeRef)
1416 (Val LLVMValueRef)
1417 (Name :string))
1419 (cffi:defcfun ("LLVMBuildAlloca" LLVMBuildAlloca) LLVMValueRef
1420 (arg0 LLVMBuilderRef)
1421 (Ty LLVMTypeRef)
1422 (Name :string))
1424 (cffi:defcfun ("LLVMBuildArrayAlloca" LLVMBuildArrayAlloca) LLVMValueRef
1425 (arg0 LLVMBuilderRef)
1426 (Ty LLVMTypeRef)
1427 (Val LLVMValueRef)
1428 (Name :string))
1430 (cffi:defcfun ("LLVMBuildFree" LLVMBuildFree) LLVMValueRef
1431 (arg0 LLVMBuilderRef)
1432 (PointerVal LLVMValueRef))
1434 (cffi:defcfun ("LLVMBuildLoad" LLVMBuildLoad) LLVMValueRef
1435 (arg0 LLVMBuilderRef)
1436 (PointerVal LLVMValueRef)
1437 (Name :string))
1439 (cffi:defcfun ("LLVMBuildStore" LLVMBuildStore) LLVMValueRef
1440 (arg0 LLVMBuilderRef)
1441 (Val LLVMValueRef)
1442 (Ptr LLVMValueRef))
1444 (cffi:defcfun ("LLVMBuildGEP" %LLVMBuildGEP) LLVMValueRef
1445 (B LLVMBuilderRef)
1446 (Pointer LLVMValueRef)
1447 (Indices :pointer)
1448 (NumIndices :unsigned-int)
1449 (Name :string))
1451 (cffi:defcfun ("LLVMBuildInBoundsGEP" %LLVMBuildInBoundsGEP) LLVMValueRef
1452 (B LLVMBuilderRef)
1453 (Pointer LLVMValueRef)
1454 (Indices :pointer)
1455 (NumIndices :unsigned-int)
1456 (Name :string))
1458 (cffi:defcfun ("LLVMBuildStructGEP" LLVMBuildStructGEP) LLVMValueRef
1459 (B LLVMBuilderRef)
1460 (Pointer LLVMValueRef)
1461 (Idx :unsigned-int)
1462 (Name :string))
1464 (cffi:defcfun ("LLVMBuildGlobalString" LLVMBuildGlobalString) LLVMValueRef
1465 (B LLVMBuilderRef)
1466 (Str :string)
1467 (Name :string))
1469 (cffi:defcfun ("LLVMBuildGlobalStringPtr" LLVMBuildGlobalStringPtr) LLVMValueRef
1470 (B LLVMBuilderRef)
1471 (Str :string)
1472 (Name :string))
1474 (cffi:defcfun ("LLVMBuildTrunc" LLVMBuildTrunc) LLVMValueRef
1475 (arg0 LLVMBuilderRef)
1476 (Val LLVMValueRef)
1477 (DestTy LLVMTypeRef)
1478 (Name :string))
1480 (cffi:defcfun ("LLVMBuildZExt" LLVMBuildZExt) LLVMValueRef
1481 (arg0 LLVMBuilderRef)
1482 (Val LLVMValueRef)
1483 (DestTy LLVMTypeRef)
1484 (Name :string))
1486 (cffi:defcfun ("LLVMBuildSExt" LLVMBuildSExt) LLVMValueRef
1487 (arg0 LLVMBuilderRef)
1488 (Val LLVMValueRef)
1489 (DestTy LLVMTypeRef)
1490 (Name :string))
1492 (cffi:defcfun ("LLVMBuildFPToUI" LLVMBuildFPToUI) LLVMValueRef
1493 (arg0 LLVMBuilderRef)
1494 (Val LLVMValueRef)
1495 (DestTy LLVMTypeRef)
1496 (Name :string))
1498 (cffi:defcfun ("LLVMBuildFPToSI" LLVMBuildFPToSI) LLVMValueRef
1499 (arg0 LLVMBuilderRef)
1500 (Val LLVMValueRef)
1501 (DestTy LLVMTypeRef)
1502 (Name :string))
1504 (cffi:defcfun ("LLVMBuildUIToFP" LLVMBuildUIToFP) LLVMValueRef
1505 (arg0 LLVMBuilderRef)
1506 (Val LLVMValueRef)
1507 (DestTy LLVMTypeRef)
1508 (Name :string))
1510 (cffi:defcfun ("LLVMBuildSIToFP" LLVMBuildSIToFP) LLVMValueRef
1511 (arg0 LLVMBuilderRef)
1512 (Val LLVMValueRef)
1513 (DestTy LLVMTypeRef)
1514 (Name :string))
1516 (cffi:defcfun ("LLVMBuildFPTrunc" LLVMBuildFPTrunc) LLVMValueRef
1517 (arg0 LLVMBuilderRef)
1518 (Val LLVMValueRef)
1519 (DestTy LLVMTypeRef)
1520 (Name :string))
1522 (cffi:defcfun ("LLVMBuildFPExt" LLVMBuildFPExt) LLVMValueRef
1523 (arg0 LLVMBuilderRef)
1524 (Val LLVMValueRef)
1525 (DestTy LLVMTypeRef)
1526 (Name :string))
1528 (cffi:defcfun ("LLVMBuildPtrToInt" LLVMBuildPtrToInt) LLVMValueRef
1529 (arg0 LLVMBuilderRef)
1530 (Val LLVMValueRef)
1531 (DestTy LLVMTypeRef)
1532 (Name :string))
1534 (cffi:defcfun ("LLVMBuildIntToPtr" LLVMBuildIntToPtr) LLVMValueRef
1535 (arg0 LLVMBuilderRef)
1536 (Val LLVMValueRef)
1537 (DestTy LLVMTypeRef)
1538 (Name :string))
1540 (cffi:defcfun ("LLVMBuildBitCast" LLVMBuildBitCast) LLVMValueRef
1541 (arg0 LLVMBuilderRef)
1542 (Val LLVMValueRef)
1543 (DestTy LLVMTypeRef)
1544 (Name :string))
1546 (cffi:defcfun ("LLVMBuildZExtOrBitCast" LLVMBuildZExtOrBitCast) LLVMValueRef
1547 (arg0 LLVMBuilderRef)
1548 (Val LLVMValueRef)
1549 (DestTy LLVMTypeRef)
1550 (Name :string))
1552 (cffi:defcfun ("LLVMBuildSExtOrBitCast" LLVMBuildSExtOrBitCast) LLVMValueRef
1553 (arg0 LLVMBuilderRef)
1554 (Val LLVMValueRef)
1555 (DestTy LLVMTypeRef)
1556 (Name :string))
1558 (cffi:defcfun ("LLVMBuildTruncOrBitCast" LLVMBuildTruncOrBitCast) LLVMValueRef
1559 (arg0 LLVMBuilderRef)
1560 (Val LLVMValueRef)
1561 (DestTy LLVMTypeRef)
1562 (Name :string))
1564 (cffi:defcfun ("LLVMBuildPointerCast" LLVMBuildPointerCast) LLVMValueRef
1565 (arg0 LLVMBuilderRef)
1566 (Val LLVMValueRef)
1567 (DestTy LLVMTypeRef)
1568 (Name :string))
1570 (cffi:defcfun ("LLVMBuildIntCast" LLVMBuildIntCast) LLVMValueRef
1571 (arg0 LLVMBuilderRef)
1572 (Val LLVMValueRef)
1573 (DestTy LLVMTypeRef)
1574 (Name :string))
1576 (cffi:defcfun ("LLVMBuildFPCast" LLVMBuildFPCast) LLVMValueRef
1577 (arg0 LLVMBuilderRef)
1578 (Val LLVMValueRef)
1579 (DestTy LLVMTypeRef)
1580 (Name :string))
1582 (cffi:defcfun ("LLVMBuildICmp" LLVMBuildICmp) LLVMValueRef
1583 (arg0 LLVMBuilderRef)
1584 (Op LLVMIntPredicate)
1585 (LHS LLVMValueRef)
1586 (RHS LLVMValueRef)
1587 (Name :string))
1589 (cffi:defcfun ("LLVMBuildFCmp" LLVMBuildFCmp) LLVMValueRef
1590 (arg0 LLVMBuilderRef)
1591 (Op LLVMRealPredicate)
1592 (LHS LLVMValueRef)
1593 (RHS LLVMValueRef)
1594 (Name :string))
1596 (cffi:defcfun ("LLVMBuildPhi" LLVMBuildPhi) LLVMValueRef
1597 (arg0 LLVMBuilderRef)
1598 (Ty LLVMTypeRef)
1599 (Name :string))
1601 (cffi:defcfun ("LLVMBuildCall" %LLVMBuildCall) LLVMValueRef
1602 (arg0 LLVMBuilderRef)
1603 (Fn LLVMValueRef)
1604 (Args :pointer)
1605 (NumArgs :unsigned-int)
1606 (Name :string))
1608 (cffi:defcfun ("LLVMBuildSelect" LLVMBuildSelect) LLVMValueRef
1609 (arg0 LLVMBuilderRef)
1610 (If LLVMValueRef)
1611 (Then LLVMValueRef)
1612 (Else LLVMValueRef)
1613 (Name :string))
1615 (cffi:defcfun ("LLVMBuildVAArg" LLVMBuildVAArg) LLVMValueRef
1616 (arg0 LLVMBuilderRef)
1617 (List LLVMValueRef)
1618 (Ty LLVMTypeRef)
1619 (Name :string))
1621 (cffi:defcfun ("LLVMBuildExtractElement" LLVMBuildExtractElement) LLVMValueRef
1622 (arg0 LLVMBuilderRef)
1623 (VecVal LLVMValueRef)
1624 (Index LLVMValueRef)
1625 (Name :string))
1627 (cffi:defcfun ("LLVMBuildInsertElement" LLVMBuildInsertElement) LLVMValueRef
1628 (arg0 LLVMBuilderRef)
1629 (VecVal LLVMValueRef)
1630 (EltVal LLVMValueRef)
1631 (Index LLVMValueRef)
1632 (Name :string))
1634 (cffi:defcfun ("LLVMBuildShuffleVector" LLVMBuildShuffleVector) LLVMValueRef
1635 (arg0 LLVMBuilderRef)
1636 (V1 LLVMValueRef)
1637 (V2 LLVMValueRef)
1638 (Mask LLVMValueRef)
1639 (Name :string))
1641 (cffi:defcfun ("LLVMBuildExtractValue" LLVMBuildExtractValue) LLVMValueRef
1642 (arg0 LLVMBuilderRef)
1643 (AggVal LLVMValueRef)
1644 (Index :unsigned-int)
1645 (Name :string))
1647 (cffi:defcfun ("LLVMBuildInsertValue" LLVMBuildInsertValue) LLVMValueRef
1648 (arg0 LLVMBuilderRef)
1649 (AggVal LLVMValueRef)
1650 (EltVal LLVMValueRef)
1651 (Index :unsigned-int)
1652 (Name :string))
1654 (cffi:defcfun ("LLVMBuildIsNull" LLVMBuildIsNull) LLVMValueRef
1655 (arg0 LLVMBuilderRef)
1656 (Val LLVMValueRef)
1657 (Name :string))
1659 (cffi:defcfun ("LLVMBuildIsNotNull" LLVMBuildIsNotNull) LLVMValueRef
1660 (arg0 LLVMBuilderRef)
1661 (Val LLVMValueRef)
1662 (Name :string))
1664 (cffi:defcfun ("LLVMBuildPtrDiff" LLVMBuildPtrDiff) LLVMValueRef
1665 (arg0 LLVMBuilderRef)
1666 (LHS LLVMValueRef)
1667 (RHS LLVMValueRef)
1668 (Name :string))
1670 (cffi:defcfun ("LLVMCreateModuleProviderForExistingModule" LLVMCreateModuleProviderForExistingModule) LLVMModuleProviderRef
1671 (M LLVMModuleRef))
1673 (cffi:defcfun ("LLVMDisposeModuleProvider" LLVMDisposeModuleProvider) :void
1674 (MP LLVMModuleProviderRef))
1676 (cffi:defcfun ("LLVMCreateMemoryBufferWithContentsOfFile" LLVMCreateMemoryBufferWithContentsOfFile) :boolean
1677 (Path :string)
1678 (OutMemBuf :pointer)
1679 (OutMessage :pointer))
1681 (cffi:defcfun ("LLVMCreateMemoryBufferWithSTDIN" LLVMCreateMemoryBufferWithSTDIN) :boolean
1682 (OutMemBuf :pointer)
1683 (OutMessage :pointer))
1685 (cffi:defcfun ("LLVMDisposeMemoryBuffer" LLVMDisposeMemoryBuffer) :void
1686 (MemBuf LLVMMemoryBufferRef))
1688 (cffi:defcfun ("LLVMCreatePassManager" LLVMCreatePassManager) LLVMPassManagerRef)
1690 (cffi:defcfun ("LLVMCreateFunctionPassManager" LLVMCreateFunctionPassManager) LLVMPassManagerRef
1691 (MP LLVMModuleProviderRef))
1693 (cffi:defcfun ("LLVMRunPassManager" LLVMRunPassManager) :boolean
1694 (PM LLVMPassManagerRef)
1695 (M LLVMModuleRef))
1697 (cffi:defcfun ("LLVMInitializeFunctionPassManager" LLVMInitializeFunctionPassManager) :boolean
1698 (FPM LLVMPassManagerRef))
1700 (cffi:defcfun ("LLVMRunFunctionPassManager" LLVMRunFunctionPassManager) :boolean
1701 (FPM LLVMPassManagerRef)
1702 (F LLVMValueRef))
1704 (cffi:defcfun ("LLVMFinalizeFunctionPassManager" LLVMFinalizeFunctionPassManager) :boolean
1705 (FPM LLVMPassManagerRef))
1707 (cffi:defcfun ("LLVMDisposePassManager" LLVMDisposePassManager) :void
1708 (PM LLVMPassManagerRef))
1710 ;;; The wrappers to expose the "InContext" versions of the functions
1711 ;;; in a more lispy way.
1712 (declaim (special *llvm-context*))
1714 (defun LLVMModuleCreateWithName (ModuleId &optional (context *llvm-context*))
1715 (%LLVMModuleCreateWithNameInContext ModuleId context))
1717 (defun LLVMInt1Type (&optional (context *llvm-context*))
1718 (%LLVMInt1TypeInContext context))
1720 (defun LLVMInt8Type (&optional (context *llvm-context*))
1721 (%LLVMInt8TypeInContext context))
1723 (defun LLVMInt16Type (&optional (context *llvm-context*))
1724 (%LLVMInt16TypeInContext context))
1726 (defun LLVMInt32Type (&optional (context *llvm-context*))
1727 (%LLVMInt32TypeInContext context))
1729 (defun LLVMInt64Type (&optional (context *llvm-context*))
1730 (%LLVMInt64TypeInContext context))
1732 (defun LLVMIntType (NumBits &optional (context *llvm-context*))
1733 (%LLVMIntTypeInContext context NumBits))
1735 (defun LLVMFloatType (&optional (context *llvm-context*))
1736 (%LLVMFloatTypeInContext context))
1738 (defun LLVMDoubleType (&optional (context *llvm-context*))
1739 (%LLVMDoubleTypeInContext context))
1741 (defun LLVMX86FP80Type (&optional (context *llvm-context*))
1742 (%LLVMX86FP80TypeInContext context))
1744 (defun LLVMFP128Type (&optional (context *llvm-context*))
1745 (%LLVMFP128TypeInContext context))
1747 (defun LLVMPPCFP128Type (&optional (context *llvm-context*))
1748 (%LLVMPPCFP128TypeInContext context))
1750 ;; LLVMStructTypeInContext handled below.
1752 (defun LLVMVoidType (&optional (context *llvm-context*))
1753 (%LLVMVoidTypeInContext context))
1755 (defun LLVMLabelType (&optional (context *llvm-context*))
1756 (%LLVMLabelTypeInContext context))
1758 (defun LLVMOpaqueType (&optional (context *llvm-context*))
1759 (%LLVMOpaqueTypeInContext context))
1761 ;; LLVMConstStringInContext handled below
1762 ;; LLVMConstStructInContext handled below
1764 (defun LLVMAppendBasicBlock (Fn Name &optional (context *llvm-context*))
1765 (%LLVMAppendBasicBlockInContext context Fn Name))
1767 (defun LLVMInsertBasicBlock (BB Name &optional (context *llvm-context*))
1768 (%LLVMInsertBasicBlockInContext context BB Name))
1770 (defun LLVMCreateBuilder (&optional (context *llvm-context*))
1771 (%LLVMCreateBuilderInContext context))
1774 ;; More complex wrappers for dealing with pointers.
1776 (defmacro with-array-and-length ((array len list) &body body)
1777 (let ((list-v (gensym "list")))
1778 `(let* ((,list-v ,list)
1779 (,len (length ,list-v)))
1780 (cffi:with-foreign-object (,array :pointer ,len)
1781 (loop for l in ,list-v
1782 for i from 0
1784 (setf (cffi:mem-aref ,array :pointer i) l))
1785 (progn ,@body)))))
1787 (defun LLVMFunctionType (ret params is-var-arg)
1788 "Combines the C API's ParamTypes array and ParamCount arguments into
1789 a single list PARAMS."
1790 (with-array-and-length (array len params)
1791 (%LLVMFunctionType ret array len is-var-arg)))
1793 (defun LLVMGetParamTypes (function-type)
1794 "Returns a list of param types rather than filling out a Dest pointer argument"
1795 (let ((len (LLVMCountParamTypes function-type)))
1796 (cffi:with-foreign-object (array :pointer len)
1797 (%LLVMGetParamTypes function-type array)
1798 (loop for i from 0 below len
1799 collect
1800 (cffi:mem-aref array :pointer i)))))
1802 (defun LLVMStructType (element-types is-packed &optional (context *llvm-context*))
1803 (with-array-and-length (array len element-types)
1804 (%LLVMStructTypeInContext context array len is-packed)))
1806 (defun LLVMGetStructElementTypes (struct-type)
1807 "Returns a list of param types rather than filling out a Dest pointer argument"
1808 (let ((len (LLVMCountStructElementTypes struct-type)))
1809 (cffi:with-foreign-object (array :pointer len)
1810 (%LLVMGetStructElementTypes struct-type array)
1811 (loop for i from 0 below len
1812 collect
1813 (cffi:mem-aref array :pointer i)))))
1815 (defun LLVMConstString (str dont-null-terminate &optional (context *llvm-context*))
1816 (cffi:with-foreign-string ((foreign-string num-bytes) str)
1817 (%LLVMConstStringInContext context foreign-string num-bytes dont-null-terminate)))
1819 (defun LLVMConstStruct (vals packed-p &optional (context *llvm-context*))
1820 (with-array-and-length (array len vals)
1821 (%LLVMConstStructInContext context array len packed-p)))
1823 (defun LLVMConstArray (type vals)
1824 (with-array-and-length (array len vals)
1825 (%LLVMConstArray type array len)))
1827 (defun LLVMConstVector (vals)
1828 (with-array-and-length (array len vals)
1829 (%LLVMConstVector array len)))
1831 (defun LLVMConstGEP (ptr indices)
1832 (with-array-and-length (array len indices)
1833 (%LLVMConstGEP ptr array len)))
1835 (defun LLVMConstInBoundsGEP (ptr indices)
1836 (with-array-and-length (array len indices)
1837 (%LLVMConstInBoundsGEP ptr array len)))
1839 (defun LLVMConstExtractValue (AggConstant indices)
1840 (with-array-and-length (array len indices)
1841 (%LLVMConstExtractValue AggConstant array len)))
1843 (defun LLVMConstInsertValue (AggConstant ValConstant indices)
1844 (with-array-and-length (array len indices)
1845 (%LLVMConstInsertValue AggConstant ValConstant array len)))
1847 (defun LLVMGetParams (fn)
1848 "Returns a list of params rather than filling out a Dest pointer argument."
1849 (let ((len (LLVMCountParams fn)))
1850 (cffi:with-foreign-object (array :pointer len)
1851 (%LLVMGetParams fn array)
1852 (loop for i from 0 below len
1853 collect
1854 (cffi:mem-aref array :pointer i)))))
1856 (defun LLVMAddIncoming (phi-node incoming-val incoming-block)
1857 "Unlike the C API (but like the C++ API...), takes only a single
1858 incoming val and incoming block. Call multiple times if you want to
1859 add multiple incoming values."
1860 (cffi:with-foreign-objects ((incoming-vals :pointer)
1861 (incoming-blocks :pointer))
1862 (setf (cffi:mem-aref incoming-vals :pointer 0) incoming-val)
1863 (setf (cffi:mem-aref incoming-blocks :pointer 0) incoming-block)
1864 (%LLVMAddIncoming phi-node incoming-vals incoming-blocks 1)))
1866 (defun LLVMBuildAggregateRet (builder vals)
1867 (with-array-and-length (array len vals)
1868 (%LLVMBuildAggregateRet builder array len)))
1870 (defun LLVMBuildInvoke (builder fn args then catch name)
1871 (with-array-and-length (array len args)
1872 (%LLVMBuildInvoke builder fn array len then catch name)))
1874 (defun LLVMBuildGEP (builder ptr indices name)
1875 (with-array-and-length (array len indices)
1876 (%LLVMBuildGEP builder ptr array len name)))
1878 (defun LLVMBuildInBoundsGEP (builder ptr indices name)
1879 (with-array-and-length (array len indices)
1880 (%LLVMBuildInBoundsGEP builder ptr array len name)))
1882 (defun LLVMBuildCall (builder fn args name)
1883 "Combines the C API's Args array and NumArgs arguments into a single
1884 list ARGS."
1885 (with-array-and-length (array len args)
1886 (%LLVMBuildCall builder fn array len name)))
1888 ;; TODO:
1889 ;; LLVMCreateMemoryBufferWithContentsOfFile has OutMemBuf, OutMessage
1890 ;; LLVMCreateMemoryBufferWithSTDIN has OutMemBuf, OutMessage