Make LLVMConstInt transparently work with bignums.
[cl-llvm.git] / src / generated / core.lisp
blob02ebbb1c87ae45041a60ea6667f8024dddb7e8a3
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 ;; A little hack make the Name argument for LLVMBuild* be optional and
13 ;; default to the empty string.
14 (defmacro wrap-defcfun ((c-name lisp-name &rest options) return-type &body args)
15 (if (and (eql (mismatch "LLVMBuild" c-name) 9)
16 (equal (last args) '((Name :string))))
17 (let ((real-lisp-name (intern (concatenate 'string "%" (symbol-name lisp-name))
18 (symbol-package lisp-name)))
19 (mod-args (map 'list #'car (butlast args))))
20 `(progn
21 ( cffi:defcfun (,c-name ,real-lisp-name ,@options) ,return-type ,@args)
22 (defmacro ,lisp-name (,@mod-args &optional (name ""))
23 `(,',real-lisp-name ,,@mod-args ,name))))
24 `( cffi:defcfun (,c-name ,lisp-name ,@options) ,return-type ,@args)))
27 (cffi:defctype LLVMBool :int)
29 (cffi:defctype LLVMContextRef :pointer)
31 (cffi:defctype LLVMModuleRef :pointer)
33 (cffi:defctype LLVMTypeRef :pointer)
35 (cffi:defctype LLVMTypeHandleRef :pointer)
37 (cffi:defctype LLVMValueRef :pointer)
39 (cffi:defctype LLVMBasicBlockRef :pointer)
41 (cffi:defctype LLVMBuilderRef :pointer)
43 (cffi:defctype LLVMModuleProviderRef :pointer)
45 (cffi:defctype LLVMMemoryBufferRef :pointer)
47 (cffi:defctype LLVMPassManagerRef :pointer)
49 (cffi:defctype LLVMUseIteratorRef :pointer)
51 (cffi:defbitfield LLVMAttribute
52 (:LLVMZExtAttribute #.(cl:ash 1 0))
53 (:LLVMSExtAttribute #.(cl:ash 1 1))
54 (:LLVMNoReturnAttribute #.(cl:ash 1 2))
55 (:LLVMInRegAttribute #.(cl:ash 1 3))
56 (:LLVMStructRetAttribute #.(cl:ash 1 4))
57 (:LLVMNoUnwindAttribute #.(cl:ash 1 5))
58 (:LLVMNoAliasAttribute #.(cl:ash 1 6))
59 (:LLVMByValAttribute #.(cl:ash 1 7))
60 (:LLVMNestAttribute #.(cl:ash 1 8))
61 (:LLVMReadNoneAttribute #.(cl:ash 1 9))
62 (:LLVMReadOnlyAttribute #.(cl:ash 1 10))
63 (:LLVMNoInlineAttribute #.(cl:ash 1 11))
64 (:LLVMAlwaysInlineAttribute #.(cl:ash 1 12))
65 (:LLVMOptimizeForSizeAttribute #.(cl:ash 1 13))
66 (:LLVMStackProtectAttribute #.(cl:ash 1 14))
67 (:LLVMStackProtectReqAttribute #.(cl:ash 1 15))
68 (:LLVMNoCaptureAttribute #.(cl:ash 1 21))
69 (:LLVMNoRedZoneAttribute #.(cl:ash 1 22))
70 (:LLVMNoImplicitFloatAttribute #.(cl:ash 1 23))
71 (:LLVMNakedAttribute #.(cl:ash 1 24))
72 (:LLVMInlineHintAttribute #.(cl:ash 1 25)))
74 (cffi:defcenum LLVMOpcode
75 (:LLVMRet #.1)
76 (:LLVMBr #.2)
77 (:LLVMSwitch #.3)
78 (:LLVMInvoke #.4)
79 (:LLVMUnwind #.5)
80 (:LLVMUnreachable #.6)
81 (:LLVMAdd #.7)
82 (:LLVMFAdd #.8)
83 (:LLVMSub #.9)
84 (:LLVMFSub #.10)
85 (:LLVMMul #.11)
86 (:LLVMFMul #.12)
87 (:LLVMUDiv #.13)
88 (:LLVMSDiv #.14)
89 (:LLVMFDiv #.15)
90 (:LLVMURem #.16)
91 (:LLVMSRem #.17)
92 (:LLVMFRem #.18)
93 (:LLVMShl #.19)
94 (:LLVMLShr #.20)
95 (:LLVMAShr #.21)
96 (:LLVMAnd #.22)
97 (:LLVMOr #.23)
98 (:LLVMXor #.24)
99 (:LLVMMalloc #.25)
100 (:LLVMFree #.26)
101 (:LLVMAlloca #.27)
102 (:LLVMLoad #.28)
103 (:LLVMStore #.29)
104 (:LLVMGetElementPtr #.30)
105 (:LLVMTrunk #.31)
106 (:LLVMZExt #.32)
107 (:LLVMSExt #.33)
108 (:LLVMFPToUI #.34)
109 (:LLVMFPToSI #.35)
110 (:LLVMUIToFP #.36)
111 (:LLVMSIToFP #.37)
112 (:LLVMFPTrunc #.38)
113 (:LLVMFPExt #.39)
114 (:LLVMPtrToInt #.40)
115 (:LLVMIntToPtr #.41)
116 (:LLVMBitCast #.42)
117 (:LLVMICmp #.43)
118 (:LLVMFCmp #.44)
119 (:LLVMPHI #.45)
120 (:LLVMCall #.46)
121 (:LLVMSelect #.47)
122 (:LLVMVAArg #.50)
123 (:LLVMExtractElement #.51)
124 (:LLVMInsertElement #.52)
125 (:LLVMShuffleVector #.53)
126 (:LLVMExtractValue #.54)
127 (:LLVMInsertValue #.55))
129 (cffi:defcenum LLVMTypeKind
130 :LLVMVoidTypeKind
131 :LLVMFloatTypeKind
132 :LLVMDoubleTypeKind
133 :LLVMX86_FP80TypeKind
134 :LLVMFP128TypeKind
135 :LLVMPPC_FP128TypeKind
136 :LLVMLabelTypeKind
137 :LLVMIntegerTypeKind
138 :LLVMFunctionTypeKind
139 :LLVMStructTypeKind
140 :LLVMArrayTypeKind
141 :LLVMPointerTypeKind
142 :LLVMOpaqueTypeKind
143 :LLVMVectorTypeKind
144 :LLVMMetadataTypeKind)
146 (cffi:defcenum LLVMLinkage
147 :LLVMExternalLinkage
148 :LLVMAvailableExternallyLinkage
149 :LLVMLinkOnceAnyLinkage
150 :LLVMLinkOnceODRLinkage
151 :LLVMWeakAnyLinkage
152 :LLVMWeakODRLinkage
153 :LLVMAppendingLinkage
154 :LLVMInternalLinkage
155 :LLVMPrivateLinkage
156 :LLVMDLLImportLinkage
157 :LLVMDLLExportLinkage
158 :LLVMExternalWeakLinkage
159 :LLVMGhostLinkage
160 :LLVMCommonLinkage
161 :LLVMLinkerPrivateLinkage)
163 (cffi:defcenum LLVMVisibility
164 :LLVMDefaultVisibility
165 :LLVMHiddenVisibility
166 :LLVMProtectedVisibility)
168 (cffi:defcenum LLVMCallConv
169 (:LLVMCCallConv #.0)
170 (:LLVMFastCallConv #.8)
171 (:LLVMColdCallConv #.9)
172 (:LLVMX86StdcallCallConv #.64)
173 (:LLVMX86FastcallCallConv #.65))
175 (cffi:defcenum LLVMIntPredicate
176 (:LLVMIntEQ #.32)
177 :LLVMIntNE
178 :LLVMIntUGT
179 :LLVMIntUGE
180 :LLVMIntULT
181 :LLVMIntULE
182 :LLVMIntSGT
183 :LLVMIntSGE
184 :LLVMIntSLT
185 :LLVMIntSLE)
187 (cffi:defcenum LLVMRealPredicate
188 :LLVMRealPredicateFalse
189 :LLVMRealOEQ
190 :LLVMRealOGT
191 :LLVMRealOGE
192 :LLVMRealOLT
193 :LLVMRealOLE
194 :LLVMRealONE
195 :LLVMRealORD
196 :LLVMRealUNO
197 :LLVMRealUEQ
198 :LLVMRealUGT
199 :LLVMRealUGE
200 :LLVMRealULT
201 :LLVMRealULE
202 :LLVMRealUNE
203 :LLVMRealPredicateTrue)
205 (wrap-defcfun ("LLVMDisposeMessage" LLVMDisposeMessage) :void
206 (Message :string))
208 (wrap-defcfun ("LLVMContextCreate" LLVMContextCreate) LLVMContextRef)
210 (wrap-defcfun ("LLVMGetGlobalContext" LLVMGetGlobalContext) LLVMContextRef)
212 (wrap-defcfun ("LLVMContextDispose" LLVMContextDispose) :void
213 (C LLVMContextRef))
215 (wrap-defcfun ("LLVMModuleCreateWithNameInContext" %LLVMModuleCreateWithNameInContext) LLVMModuleRef
216 (ModuleID :string)
217 (C LLVMContextRef))
219 (wrap-defcfun ("LLVMDisposeModule" LLVMDisposeModule) :void
220 (M LLVMModuleRef))
222 (wrap-defcfun ("LLVMGetDataLayout" LLVMGetDataLayout) :string
223 (M LLVMModuleRef))
225 (wrap-defcfun ("LLVMSetDataLayout" LLVMSetDataLayout) :void
226 (M LLVMModuleRef)
227 (Triple :string))
229 (wrap-defcfun ("LLVMGetTarget" LLVMGetTarget) :string
230 (M LLVMModuleRef))
232 (wrap-defcfun ("LLVMSetTarget" LLVMSetTarget) :void
233 (M LLVMModuleRef)
234 (Triple :string))
236 (wrap-defcfun ("LLVMAddTypeName" LLVMAddTypeName) :boolean
237 (M LLVMModuleRef)
238 (Name :string)
239 (Ty LLVMTypeRef))
241 (wrap-defcfun ("LLVMDeleteTypeName" LLVMDeleteTypeName) :void
242 (M LLVMModuleRef)
243 (Name :string))
245 (wrap-defcfun ("LLVMGetTypeByName" LLVMGetTypeByName) LLVMTypeRef
246 (M LLVMModuleRef)
247 (Name :string))
249 (wrap-defcfun ("LLVMDumpModule" LLVMDumpModule) :void
250 (M LLVMModuleRef))
252 (wrap-defcfun ("LLVMGetTypeKind" LLVMGetTypeKind) LLVMTypeKind
253 (Ty LLVMTypeRef))
255 (wrap-defcfun ("LLVMGetTypeContext" LLVMGetTypeContext) LLVMContextRef
256 (Ty LLVMTypeRef))
258 (wrap-defcfun ("LLVMInt1TypeInContext" %LLVMInt1TypeInContext) LLVMTypeRef
259 (C LLVMContextRef))
261 (wrap-defcfun ("LLVMInt8TypeInContext" %LLVMInt8TypeInContext) LLVMTypeRef
262 (C LLVMContextRef))
264 (wrap-defcfun ("LLVMInt16TypeInContext" %LLVMInt16TypeInContext) LLVMTypeRef
265 (C LLVMContextRef))
267 (wrap-defcfun ("LLVMInt32TypeInContext" %LLVMInt32TypeInContext) LLVMTypeRef
268 (C LLVMContextRef))
270 (wrap-defcfun ("LLVMInt64TypeInContext" %LLVMInt64TypeInContext) LLVMTypeRef
271 (C LLVMContextRef))
273 (wrap-defcfun ("LLVMIntTypeInContext" %LLVMIntTypeInContext) LLVMTypeRef
274 (C LLVMContextRef)
275 (NumBits :unsigned-int))
277 (wrap-defcfun ("LLVMGetIntTypeWidth" LLVMGetIntTypeWidth) :unsigned-int
278 (IntegerTy LLVMTypeRef))
280 (wrap-defcfun ("LLVMFloatTypeInContext" %LLVMFloatTypeInContext) LLVMTypeRef
281 (C LLVMContextRef))
283 (wrap-defcfun ("LLVMDoubleTypeInContext" %LLVMDoubleTypeInContext) LLVMTypeRef
284 (C LLVMContextRef))
286 (wrap-defcfun ("LLVMX86FP80TypeInContext" %LLVMX86FP80TypeInContext) LLVMTypeRef
287 (C LLVMContextRef))
289 (wrap-defcfun ("LLVMFP128TypeInContext" %LLVMFP128TypeInContext) LLVMTypeRef
290 (C LLVMContextRef))
292 (wrap-defcfun ("LLVMPPCFP128TypeInContext" %LLVMPPCFP128TypeInContext) LLVMTypeRef
293 (C LLVMContextRef))
295 (wrap-defcfun ("LLVMFunctionType" %LLVMFunctionType) LLVMTypeRef
296 (ReturnType LLVMTypeRef)
297 (ParamTypes :pointer)
298 (ParamCount :unsigned-int)
299 (IsVarArg :boolean))
301 (wrap-defcfun ("LLVMIsFunctionVarArg" LLVMIsFunctionVarArg) :boolean
302 (FunctionTy LLVMTypeRef))
304 (wrap-defcfun ("LLVMGetReturnType" LLVMGetReturnType) LLVMTypeRef
305 (FunctionTy LLVMTypeRef))
307 (wrap-defcfun ("LLVMCountParamTypes" LLVMCountParamTypes) :unsigned-int
308 (FunctionTy LLVMTypeRef))
310 (wrap-defcfun ("LLVMGetParamTypes" %LLVMGetParamTypes) :void
311 (FunctionTy LLVMTypeRef)
312 (Dest :pointer))
314 (wrap-defcfun ("LLVMStructTypeInContext" %LLVMStructTypeInContext) LLVMTypeRef
315 (C LLVMContextRef)
316 (ElementTypes :pointer)
317 (ElementCount :unsigned-int)
318 (Packed :boolean))
320 (wrap-defcfun ("LLVMCountStructElementTypes" LLVMCountStructElementTypes) :unsigned-int
321 (StructTy LLVMTypeRef))
323 (wrap-defcfun ("LLVMGetStructElementTypes" %LLVMGetStructElementTypes) :void
324 (StructTy LLVMTypeRef)
325 (Dest :pointer))
327 (wrap-defcfun ("LLVMIsPackedStruct" LLVMIsPackedStruct) :boolean
328 (StructTy LLVMTypeRef))
330 (wrap-defcfun ("LLVMArrayType" LLVMArrayType) LLVMTypeRef
331 (ElementType LLVMTypeRef)
332 (ElementCount :unsigned-int))
334 (wrap-defcfun ("LLVMPointerType" LLVMPointerType) LLVMTypeRef
335 (ElementType LLVMTypeRef)
336 (AddressSpace :unsigned-int))
338 (wrap-defcfun ("LLVMVectorType" LLVMVectorType) LLVMTypeRef
339 (ElementType LLVMTypeRef)
340 (ElementCount :unsigned-int))
342 (wrap-defcfun ("LLVMGetElementType" LLVMGetElementType) LLVMTypeRef
343 (Ty LLVMTypeRef))
345 (wrap-defcfun ("LLVMGetArrayLength" LLVMGetArrayLength) :unsigned-int
346 (ArrayTy LLVMTypeRef))
348 (wrap-defcfun ("LLVMGetPointerAddressSpace" LLVMGetPointerAddressSpace) :unsigned-int
349 (PointerTy LLVMTypeRef))
351 (wrap-defcfun ("LLVMGetVectorSize" LLVMGetVectorSize) :unsigned-int
352 (VectorTy LLVMTypeRef))
354 (wrap-defcfun ("LLVMVoidTypeInContext" %LLVMVoidTypeInContext) LLVMTypeRef
355 (C LLVMContextRef))
357 (wrap-defcfun ("LLVMLabelTypeInContext" %LLVMLabelTypeInContext) LLVMTypeRef
358 (C LLVMContextRef))
360 (wrap-defcfun ("LLVMOpaqueTypeInContext" %LLVMOpaqueTypeInContext) LLVMTypeRef
361 (C LLVMContextRef))
363 (wrap-defcfun ("LLVMCreateTypeHandle" LLVMCreateTypeHandle) LLVMTypeHandleRef
364 (PotentiallyAbstractTy LLVMTypeRef))
366 (wrap-defcfun ("LLVMRefineType" LLVMRefineType) :void
367 (AbstractTy LLVMTypeRef)
368 (ConcreteTy LLVMTypeRef))
370 (wrap-defcfun ("LLVMResolveTypeHandle" LLVMResolveTypeHandle) LLVMTypeRef
371 (TypeHandle LLVMTypeHandleRef))
373 (wrap-defcfun ("LLVMDisposeTypeHandle" LLVMDisposeTypeHandle) :void
374 (TypeHandle LLVMTypeHandleRef))
376 (wrap-defcfun ("LLVMTypeOf" LLVMTypeOf) LLVMTypeRef
377 (Val LLVMValueRef))
379 (wrap-defcfun ("LLVMGetValueName" LLVMGetValueName) :string
380 (Val LLVMValueRef))
382 (wrap-defcfun ("LLVMSetValueName" LLVMSetValueName) :void
383 (Val LLVMValueRef)
384 (Name :string))
386 (wrap-defcfun ("LLVMDumpValue" LLVMDumpValue) :void
387 (Val LLVMValueRef))
389 (wrap-defcfun ("LLVMReplaceAllUsesWith" LLVMReplaceAllUsesWith) :void
390 (OldVal LLVMValueRef)
391 (NewVal LLVMValueRef))
393 (wrap-defcfun ("LLVMIsAArgument" LLVMIsAArgument) LLVMValueRef
394 (Val LLVMValueRef))
396 (wrap-defcfun ("LLVMIsABasicBlock" LLVMIsABasicBlock) LLVMValueRef
397 (Val LLVMValueRef))
399 (wrap-defcfun ("LLVMIsAInlineAsm" LLVMIsAInlineAsm) LLVMValueRef
400 (Val LLVMValueRef))
402 (wrap-defcfun ("LLVMIsAUser" LLVMIsAUser) LLVMValueRef
403 (Val LLVMValueRef))
405 (wrap-defcfun ("LLVMIsAConstant" LLVMIsAConstant) LLVMValueRef
406 (Val LLVMValueRef))
408 (wrap-defcfun ("LLVMIsAConstantAggregateZero" LLVMIsAConstantAggregateZero) LLVMValueRef
409 (Val LLVMValueRef))
411 (wrap-defcfun ("LLVMIsAConstantArray" LLVMIsAConstantArray) LLVMValueRef
412 (Val LLVMValueRef))
414 (wrap-defcfun ("LLVMIsAConstantExpr" LLVMIsAConstantExpr) LLVMValueRef
415 (Val LLVMValueRef))
417 (wrap-defcfun ("LLVMIsAConstantFP" LLVMIsAConstantFP) LLVMValueRef
418 (Val LLVMValueRef))
420 (wrap-defcfun ("LLVMIsAConstantInt" LLVMIsAConstantInt) LLVMValueRef
421 (Val LLVMValueRef))
423 (wrap-defcfun ("LLVMIsAConstantPointerNull" LLVMIsAConstantPointerNull) LLVMValueRef
424 (Val LLVMValueRef))
426 (wrap-defcfun ("LLVMIsAConstantStruct" LLVMIsAConstantStruct) LLVMValueRef
427 (Val LLVMValueRef))
429 (wrap-defcfun ("LLVMIsAConstantVector" LLVMIsAConstantVector) LLVMValueRef
430 (Val LLVMValueRef))
432 (wrap-defcfun ("LLVMIsAGlobalValue" LLVMIsAGlobalValue) LLVMValueRef
433 (Val LLVMValueRef))
435 (wrap-defcfun ("LLVMIsAFunction" LLVMIsAFunction) LLVMValueRef
436 (Val LLVMValueRef))
438 (wrap-defcfun ("LLVMIsAGlobalAlias" LLVMIsAGlobalAlias) LLVMValueRef
439 (Val LLVMValueRef))
441 (wrap-defcfun ("LLVMIsAGlobalVariable" LLVMIsAGlobalVariable) LLVMValueRef
442 (Val LLVMValueRef))
444 (wrap-defcfun ("LLVMIsAUndefValue" LLVMIsAUndefValue) LLVMValueRef
445 (Val LLVMValueRef))
447 (wrap-defcfun ("LLVMIsAInstruction" LLVMIsAInstruction) LLVMValueRef
448 (Val LLVMValueRef))
450 (wrap-defcfun ("LLVMIsABinaryOperator" LLVMIsABinaryOperator) LLVMValueRef
451 (Val LLVMValueRef))
453 (wrap-defcfun ("LLVMIsACallInst" LLVMIsACallInst) LLVMValueRef
454 (Val LLVMValueRef))
456 (wrap-defcfun ("LLVMIsAIntrinsicInst" LLVMIsAIntrinsicInst) LLVMValueRef
457 (Val LLVMValueRef))
459 (wrap-defcfun ("LLVMIsADbgInfoIntrinsic" LLVMIsADbgInfoIntrinsic) LLVMValueRef
460 (Val LLVMValueRef))
462 (wrap-defcfun ("LLVMIsADbgDeclareInst" LLVMIsADbgDeclareInst) LLVMValueRef
463 (Val LLVMValueRef))
465 (wrap-defcfun ("LLVMIsADbgFuncStartInst" LLVMIsADbgFuncStartInst) LLVMValueRef
466 (Val LLVMValueRef))
468 (wrap-defcfun ("LLVMIsADbgRegionEndInst" LLVMIsADbgRegionEndInst) LLVMValueRef
469 (Val LLVMValueRef))
471 (wrap-defcfun ("LLVMIsADbgRegionStartInst" LLVMIsADbgRegionStartInst) LLVMValueRef
472 (Val LLVMValueRef))
474 (wrap-defcfun ("LLVMIsADbgStopPointInst" LLVMIsADbgStopPointInst) LLVMValueRef
475 (Val LLVMValueRef))
477 (wrap-defcfun ("LLVMIsAEHSelectorInst" LLVMIsAEHSelectorInst) LLVMValueRef
478 (Val LLVMValueRef))
480 (wrap-defcfun ("LLVMIsAMemIntrinsic" LLVMIsAMemIntrinsic) LLVMValueRef
481 (Val LLVMValueRef))
483 (wrap-defcfun ("LLVMIsAMemCpyInst" LLVMIsAMemCpyInst) LLVMValueRef
484 (Val LLVMValueRef))
486 (wrap-defcfun ("LLVMIsAMemMoveInst" LLVMIsAMemMoveInst) LLVMValueRef
487 (Val LLVMValueRef))
489 (wrap-defcfun ("LLVMIsAMemSetInst" LLVMIsAMemSetInst) LLVMValueRef
490 (Val LLVMValueRef))
492 (wrap-defcfun ("LLVMIsACmpInst" LLVMIsACmpInst) LLVMValueRef
493 (Val LLVMValueRef))
495 (wrap-defcfun ("LLVMIsAFCmpInst" LLVMIsAFCmpInst) LLVMValueRef
496 (Val LLVMValueRef))
498 (wrap-defcfun ("LLVMIsAICmpInst" LLVMIsAICmpInst) LLVMValueRef
499 (Val LLVMValueRef))
501 (wrap-defcfun ("LLVMIsAExtractElementInst" LLVMIsAExtractElementInst) LLVMValueRef
502 (Val LLVMValueRef))
504 (wrap-defcfun ("LLVMIsAGetElementPtrInst" LLVMIsAGetElementPtrInst) LLVMValueRef
505 (Val LLVMValueRef))
507 (wrap-defcfun ("LLVMIsAInsertElementInst" LLVMIsAInsertElementInst) LLVMValueRef
508 (Val LLVMValueRef))
510 (wrap-defcfun ("LLVMIsAInsertValueInst" LLVMIsAInsertValueInst) LLVMValueRef
511 (Val LLVMValueRef))
513 (wrap-defcfun ("LLVMIsAPHINode" LLVMIsAPHINode) LLVMValueRef
514 (Val LLVMValueRef))
516 (wrap-defcfun ("LLVMIsASelectInst" LLVMIsASelectInst) LLVMValueRef
517 (Val LLVMValueRef))
519 (wrap-defcfun ("LLVMIsAShuffleVectorInst" LLVMIsAShuffleVectorInst) LLVMValueRef
520 (Val LLVMValueRef))
522 (wrap-defcfun ("LLVMIsAStoreInst" LLVMIsAStoreInst) LLVMValueRef
523 (Val LLVMValueRef))
525 (wrap-defcfun ("LLVMIsATerminatorInst" LLVMIsATerminatorInst) LLVMValueRef
526 (Val LLVMValueRef))
528 (wrap-defcfun ("LLVMIsABranchInst" LLVMIsABranchInst) LLVMValueRef
529 (Val LLVMValueRef))
531 (wrap-defcfun ("LLVMIsAInvokeInst" LLVMIsAInvokeInst) LLVMValueRef
532 (Val LLVMValueRef))
534 (wrap-defcfun ("LLVMIsAReturnInst" LLVMIsAReturnInst) LLVMValueRef
535 (Val LLVMValueRef))
537 (wrap-defcfun ("LLVMIsASwitchInst" LLVMIsASwitchInst) LLVMValueRef
538 (Val LLVMValueRef))
540 (wrap-defcfun ("LLVMIsAUnreachableInst" LLVMIsAUnreachableInst) LLVMValueRef
541 (Val LLVMValueRef))
543 (wrap-defcfun ("LLVMIsAUnwindInst" LLVMIsAUnwindInst) LLVMValueRef
544 (Val LLVMValueRef))
546 (wrap-defcfun ("LLVMIsAUnaryInstruction" LLVMIsAUnaryInstruction) LLVMValueRef
547 (Val LLVMValueRef))
549 (wrap-defcfun ("LLVMIsAAllocaInst" LLVMIsAAllocaInst) LLVMValueRef
550 (Val LLVMValueRef))
552 (wrap-defcfun ("LLVMIsACastInst" LLVMIsACastInst) LLVMValueRef
553 (Val LLVMValueRef))
555 (wrap-defcfun ("LLVMIsABitCastInst" LLVMIsABitCastInst) LLVMValueRef
556 (Val LLVMValueRef))
558 (wrap-defcfun ("LLVMIsAFPExtInst" LLVMIsAFPExtInst) LLVMValueRef
559 (Val LLVMValueRef))
561 (wrap-defcfun ("LLVMIsAFPToSIInst" LLVMIsAFPToSIInst) LLVMValueRef
562 (Val LLVMValueRef))
564 (wrap-defcfun ("LLVMIsAFPToUIInst" LLVMIsAFPToUIInst) LLVMValueRef
565 (Val LLVMValueRef))
567 (wrap-defcfun ("LLVMIsAFPTruncInst" LLVMIsAFPTruncInst) LLVMValueRef
568 (Val LLVMValueRef))
570 (wrap-defcfun ("LLVMIsAIntToPtrInst" LLVMIsAIntToPtrInst) LLVMValueRef
571 (Val LLVMValueRef))
573 (wrap-defcfun ("LLVMIsAPtrToIntInst" LLVMIsAPtrToIntInst) LLVMValueRef
574 (Val LLVMValueRef))
576 (wrap-defcfun ("LLVMIsASExtInst" LLVMIsASExtInst) LLVMValueRef
577 (Val LLVMValueRef))
579 (wrap-defcfun ("LLVMIsASIToFPInst" LLVMIsASIToFPInst) LLVMValueRef
580 (Val LLVMValueRef))
582 (wrap-defcfun ("LLVMIsATruncInst" LLVMIsATruncInst) LLVMValueRef
583 (Val LLVMValueRef))
585 (wrap-defcfun ("LLVMIsAUIToFPInst" LLVMIsAUIToFPInst) LLVMValueRef
586 (Val LLVMValueRef))
588 (wrap-defcfun ("LLVMIsAZExtInst" LLVMIsAZExtInst) LLVMValueRef
589 (Val LLVMValueRef))
591 (wrap-defcfun ("LLVMIsAExtractValueInst" LLVMIsAExtractValueInst) LLVMValueRef
592 (Val LLVMValueRef))
594 (wrap-defcfun ("LLVMIsALoadInst" LLVMIsALoadInst) LLVMValueRef
595 (Val LLVMValueRef))
597 (wrap-defcfun ("LLVMIsAVAArgInst" LLVMIsAVAArgInst) LLVMValueRef
598 (Val LLVMValueRef))
600 (wrap-defcfun ("LLVMGetFirstUse" LLVMGetFirstUse) LLVMUseIteratorRef
601 (Val LLVMValueRef))
603 (wrap-defcfun ("LLVMGetNextUse" LLVMGetNextUse) LLVMUseIteratorRef
604 (U LLVMUseIteratorRef))
606 (wrap-defcfun ("LLVMGetUser" LLVMGetUser) LLVMValueRef
607 (U LLVMUseIteratorRef))
609 (wrap-defcfun ("LLVMGetUsedValue" LLVMGetUsedValue) LLVMValueRef
610 (U LLVMUseIteratorRef))
612 (wrap-defcfun ("LLVMGetOperand" LLVMGetOperand) LLVMValueRef
613 (Val LLVMValueRef)
614 (Index :unsigned-int))
616 (wrap-defcfun ("LLVMConstNull" LLVMConstNull) LLVMValueRef
617 (Ty LLVMTypeRef))
619 (wrap-defcfun ("LLVMConstAllOnes" LLVMConstAllOnes) LLVMValueRef
620 (Ty LLVMTypeRef))
622 (wrap-defcfun ("LLVMGetUndef" LLVMGetUndef) LLVMValueRef
623 (Ty LLVMTypeRef))
625 (wrap-defcfun ("LLVMIsConstant" LLVMIsConstant) :boolean
626 (Val LLVMValueRef))
628 (wrap-defcfun ("LLVMIsNull" LLVMIsNull) :boolean
629 (Val LLVMValueRef))
631 (wrap-defcfun ("LLVMIsUndef" LLVMIsUndef) :boolean
632 (Val LLVMValueRef))
634 (wrap-defcfun ("LLVMConstPointerNull" LLVMConstPointerNull) LLVMValueRef
635 (Ty LLVMTypeRef))
637 (wrap-defcfun ("LLVMConstInt" %LLVMConstInt) LLVMValueRef
638 (IntTy LLVMTypeRef)
639 (N :unsigned-long-long)
640 (SignExtend :boolean))
642 (wrap-defcfun ("LLVMConstIntOfString" LLVMConstIntOfString) LLVMValueRef
643 (IntTy LLVMTypeRef)
644 (Text :string)
645 (Radix :unsigned-char))
647 (wrap-defcfun ("LLVMConstIntOfStringAndSize" LLVMConstIntOfStringAndSize) LLVMValueRef
648 (IntTy LLVMTypeRef)
649 (Text :string)
650 (SLen :unsigned-int)
651 (Radix :unsigned-char))
653 (wrap-defcfun ("LLVMConstReal" LLVMConstReal) LLVMValueRef
654 (RealTy LLVMTypeRef)
655 (N :double))
657 (wrap-defcfun ("LLVMConstRealOfString" LLVMConstRealOfString) LLVMValueRef
658 (RealTy LLVMTypeRef)
659 (Text :string))
661 (wrap-defcfun ("LLVMConstRealOfStringAndSize" LLVMConstRealOfStringAndSize) LLVMValueRef
662 (RealTy LLVMTypeRef)
663 (Text :string)
664 (SLen :unsigned-int))
666 (wrap-defcfun ("LLVMConstIntGetZExtValue" LLVMConstIntGetZExtValue) :unsigned-long-long
667 (ConstantVal LLVMValueRef))
669 (wrap-defcfun ("LLVMConstIntGetSExtValue" LLVMConstIntGetSExtValue) :long-long
670 (ConstantVal LLVMValueRef))
672 (wrap-defcfun ("LLVMConstStringInContext" %LLVMConstStringInContext) LLVMValueRef
673 (C LLVMContextRef)
674 (Str :string)
675 (Length :unsigned-int)
676 (DontNullTerminate :boolean))
678 (wrap-defcfun ("LLVMConstStructInContext" %LLVMConstStructInContext) LLVMValueRef
679 (C LLVMContextRef)
680 (ConstantVals :pointer)
681 (Count :unsigned-int)
682 (Packed :boolean))
684 (wrap-defcfun ("LLVMConstArray" %LLVMConstArray) LLVMValueRef
685 (ElementTy LLVMTypeRef)
686 (ConstantVals :pointer)
687 (Length :unsigned-int))
689 (wrap-defcfun ("LLVMConstVector" %LLVMConstVector) LLVMValueRef
690 (ScalarConstantVals :pointer)
691 (Size :unsigned-int))
693 (wrap-defcfun ("LLVMGetConstOpcode" LLVMGetConstOpcode) LLVMOpcode
694 (ConstantVal LLVMValueRef))
696 (wrap-defcfun ("LLVMAlignOf" LLVMAlignOf) LLVMValueRef
697 (Ty LLVMTypeRef))
699 (wrap-defcfun ("LLVMSizeOf" LLVMSizeOf) LLVMValueRef
700 (Ty LLVMTypeRef))
702 (wrap-defcfun ("LLVMConstNeg" LLVMConstNeg) LLVMValueRef
703 (ConstantVal LLVMValueRef))
705 (wrap-defcfun ("LLVMConstFNeg" LLVMConstFNeg) LLVMValueRef
706 (ConstantVal LLVMValueRef))
708 (wrap-defcfun ("LLVMConstNot" LLVMConstNot) LLVMValueRef
709 (ConstantVal LLVMValueRef))
711 (wrap-defcfun ("LLVMConstAdd" LLVMConstAdd) LLVMValueRef
712 (LHSConstant LLVMValueRef)
713 (RHSConstant LLVMValueRef))
715 (wrap-defcfun ("LLVMConstNSWAdd" LLVMConstNSWAdd) LLVMValueRef
716 (LHSConstant LLVMValueRef)
717 (RHSConstant LLVMValueRef))
719 (wrap-defcfun ("LLVMConstFAdd" LLVMConstFAdd) LLVMValueRef
720 (LHSConstant LLVMValueRef)
721 (RHSConstant LLVMValueRef))
723 (wrap-defcfun ("LLVMConstSub" LLVMConstSub) LLVMValueRef
724 (LHSConstant LLVMValueRef)
725 (RHSConstant LLVMValueRef))
727 (wrap-defcfun ("LLVMConstFSub" LLVMConstFSub) LLVMValueRef
728 (LHSConstant LLVMValueRef)
729 (RHSConstant LLVMValueRef))
731 (wrap-defcfun ("LLVMConstMul" LLVMConstMul) LLVMValueRef
732 (LHSConstant LLVMValueRef)
733 (RHSConstant LLVMValueRef))
735 (wrap-defcfun ("LLVMConstFMul" LLVMConstFMul) LLVMValueRef
736 (LHSConstant LLVMValueRef)
737 (RHSConstant LLVMValueRef))
739 (wrap-defcfun ("LLVMConstUDiv" LLVMConstUDiv) LLVMValueRef
740 (LHSConstant LLVMValueRef)
741 (RHSConstant LLVMValueRef))
743 (wrap-defcfun ("LLVMConstSDiv" LLVMConstSDiv) LLVMValueRef
744 (LHSConstant LLVMValueRef)
745 (RHSConstant LLVMValueRef))
747 (wrap-defcfun ("LLVMConstExactSDiv" LLVMConstExactSDiv) LLVMValueRef
748 (LHSConstant LLVMValueRef)
749 (RHSConstant LLVMValueRef))
751 (wrap-defcfun ("LLVMConstFDiv" LLVMConstFDiv) LLVMValueRef
752 (LHSConstant LLVMValueRef)
753 (RHSConstant LLVMValueRef))
755 (wrap-defcfun ("LLVMConstURem" LLVMConstURem) LLVMValueRef
756 (LHSConstant LLVMValueRef)
757 (RHSConstant LLVMValueRef))
759 (wrap-defcfun ("LLVMConstSRem" LLVMConstSRem) LLVMValueRef
760 (LHSConstant LLVMValueRef)
761 (RHSConstant LLVMValueRef))
763 (wrap-defcfun ("LLVMConstFRem" LLVMConstFRem) LLVMValueRef
764 (LHSConstant LLVMValueRef)
765 (RHSConstant LLVMValueRef))
767 (wrap-defcfun ("LLVMConstAnd" LLVMConstAnd) LLVMValueRef
768 (LHSConstant LLVMValueRef)
769 (RHSConstant LLVMValueRef))
771 (wrap-defcfun ("LLVMConstOr" LLVMConstOr) LLVMValueRef
772 (LHSConstant LLVMValueRef)
773 (RHSConstant LLVMValueRef))
775 (wrap-defcfun ("LLVMConstXor" LLVMConstXor) LLVMValueRef
776 (LHSConstant LLVMValueRef)
777 (RHSConstant LLVMValueRef))
779 (wrap-defcfun ("LLVMConstICmp" LLVMConstICmp) LLVMValueRef
780 (Predicate LLVMIntPredicate)
781 (LHSConstant LLVMValueRef)
782 (RHSConstant LLVMValueRef))
784 (wrap-defcfun ("LLVMConstFCmp" LLVMConstFCmp) LLVMValueRef
785 (Predicate LLVMRealPredicate)
786 (LHSConstant LLVMValueRef)
787 (RHSConstant LLVMValueRef))
789 (wrap-defcfun ("LLVMConstShl" LLVMConstShl) LLVMValueRef
790 (LHSConstant LLVMValueRef)
791 (RHSConstant LLVMValueRef))
793 (wrap-defcfun ("LLVMConstLShr" LLVMConstLShr) LLVMValueRef
794 (LHSConstant LLVMValueRef)
795 (RHSConstant LLVMValueRef))
797 (wrap-defcfun ("LLVMConstAShr" LLVMConstAShr) LLVMValueRef
798 (LHSConstant LLVMValueRef)
799 (RHSConstant LLVMValueRef))
801 (wrap-defcfun ("LLVMConstGEP" %LLVMConstGEP) LLVMValueRef
802 (ConstantVal LLVMValueRef)
803 (ConstantIndices :pointer)
804 (NumIndices :unsigned-int))
806 (wrap-defcfun ("LLVMConstInBoundsGEP" %LLVMConstInBoundsGEP) LLVMValueRef
807 (ConstantVal LLVMValueRef)
808 (ConstantIndices :pointer)
809 (NumIndices :unsigned-int))
811 (wrap-defcfun ("LLVMConstTrunc" LLVMConstTrunc) LLVMValueRef
812 (ConstantVal LLVMValueRef)
813 (ToType LLVMTypeRef))
815 (wrap-defcfun ("LLVMConstSExt" LLVMConstSExt) LLVMValueRef
816 (ConstantVal LLVMValueRef)
817 (ToType LLVMTypeRef))
819 (wrap-defcfun ("LLVMConstZExt" LLVMConstZExt) LLVMValueRef
820 (ConstantVal LLVMValueRef)
821 (ToType LLVMTypeRef))
823 (wrap-defcfun ("LLVMConstFPTrunc" LLVMConstFPTrunc) LLVMValueRef
824 (ConstantVal LLVMValueRef)
825 (ToType LLVMTypeRef))
827 (wrap-defcfun ("LLVMConstFPExt" LLVMConstFPExt) LLVMValueRef
828 (ConstantVal LLVMValueRef)
829 (ToType LLVMTypeRef))
831 (wrap-defcfun ("LLVMConstUIToFP" LLVMConstUIToFP) LLVMValueRef
832 (ConstantVal LLVMValueRef)
833 (ToType LLVMTypeRef))
835 (wrap-defcfun ("LLVMConstSIToFP" LLVMConstSIToFP) LLVMValueRef
836 (ConstantVal LLVMValueRef)
837 (ToType LLVMTypeRef))
839 (wrap-defcfun ("LLVMConstFPToUI" LLVMConstFPToUI) LLVMValueRef
840 (ConstantVal LLVMValueRef)
841 (ToType LLVMTypeRef))
843 (wrap-defcfun ("LLVMConstFPToSI" LLVMConstFPToSI) LLVMValueRef
844 (ConstantVal LLVMValueRef)
845 (ToType LLVMTypeRef))
847 (wrap-defcfun ("LLVMConstPtrToInt" LLVMConstPtrToInt) LLVMValueRef
848 (ConstantVal LLVMValueRef)
849 (ToType LLVMTypeRef))
851 (wrap-defcfun ("LLVMConstIntToPtr" LLVMConstIntToPtr) LLVMValueRef
852 (ConstantVal LLVMValueRef)
853 (ToType LLVMTypeRef))
855 (wrap-defcfun ("LLVMConstBitCast" LLVMConstBitCast) LLVMValueRef
856 (ConstantVal LLVMValueRef)
857 (ToType LLVMTypeRef))
859 (wrap-defcfun ("LLVMConstZExtOrBitCast" LLVMConstZExtOrBitCast) LLVMValueRef
860 (ConstantVal LLVMValueRef)
861 (ToType LLVMTypeRef))
863 (wrap-defcfun ("LLVMConstSExtOrBitCast" LLVMConstSExtOrBitCast) LLVMValueRef
864 (ConstantVal LLVMValueRef)
865 (ToType LLVMTypeRef))
867 (wrap-defcfun ("LLVMConstTruncOrBitCast" LLVMConstTruncOrBitCast) LLVMValueRef
868 (ConstantVal LLVMValueRef)
869 (ToType LLVMTypeRef))
871 (wrap-defcfun ("LLVMConstPointerCast" LLVMConstPointerCast) LLVMValueRef
872 (ConstantVal LLVMValueRef)
873 (ToType LLVMTypeRef))
875 (wrap-defcfun ("LLVMConstIntCast" LLVMConstIntCast) LLVMValueRef
876 (ConstantVal LLVMValueRef)
877 (ToType LLVMTypeRef)
878 (isSigned :boolean))
880 (wrap-defcfun ("LLVMConstFPCast" LLVMConstFPCast) LLVMValueRef
881 (ConstantVal LLVMValueRef)
882 (ToType LLVMTypeRef))
884 (wrap-defcfun ("LLVMConstSelect" LLVMConstSelect) LLVMValueRef
885 (ConstantCondition LLVMValueRef)
886 (ConstantIfTrue LLVMValueRef)
887 (ConstantIfFalse LLVMValueRef))
889 (wrap-defcfun ("LLVMConstExtractElement" LLVMConstExtractElement) LLVMValueRef
890 (VectorConstant LLVMValueRef)
891 (IndexConstant LLVMValueRef))
893 (wrap-defcfun ("LLVMConstInsertElement" LLVMConstInsertElement) LLVMValueRef
894 (VectorConstant LLVMValueRef)
895 (ElementValueConstant LLVMValueRef)
896 (IndexConstant LLVMValueRef))
898 (wrap-defcfun ("LLVMConstShuffleVector" LLVMConstShuffleVector) LLVMValueRef
899 (VectorAConstant LLVMValueRef)
900 (VectorBConstant LLVMValueRef)
901 (MaskConstant LLVMValueRef))
903 (wrap-defcfun ("LLVMConstExtractValue" %LLVMConstExtractValue) LLVMValueRef
904 (AggConstant LLVMValueRef)
905 (IdxList :pointer)
906 (NumIdx :unsigned-int))
908 (wrap-defcfun ("LLVMConstInsertValue" %LLVMConstInsertValue) LLVMValueRef
909 (AggConstant LLVMValueRef)
910 (ElementValueConstant LLVMValueRef)
911 (IdxList :pointer)
912 (NumIdx :unsigned-int))
914 (wrap-defcfun ("LLVMConstInlineAsm" LLVMConstInlineAsm) LLVMValueRef
915 (Ty LLVMTypeRef)
916 (AsmString :string)
917 (Constraints :string)
918 (HasSideEffects :boolean)
919 (IsAlignStack :boolean))
921 (wrap-defcfun ("LLVMGetGlobalParent" LLVMGetGlobalParent) LLVMModuleRef
922 (Global LLVMValueRef))
924 (wrap-defcfun ("LLVMIsDeclaration" LLVMIsDeclaration) :boolean
925 (Global LLVMValueRef))
927 (wrap-defcfun ("LLVMGetLinkage" LLVMGetLinkage) LLVMLinkage
928 (Global LLVMValueRef))
930 (wrap-defcfun ("LLVMSetLinkage" LLVMSetLinkage) :void
931 (Global LLVMValueRef)
932 (Linkage LLVMLinkage))
934 (wrap-defcfun ("LLVMGetSection" LLVMGetSection) :string
935 (Global LLVMValueRef))
937 (wrap-defcfun ("LLVMSetSection" LLVMSetSection) :void
938 (Global LLVMValueRef)
939 (Section :string))
941 (wrap-defcfun ("LLVMGetVisibility" LLVMGetVisibility) LLVMVisibility
942 (Global LLVMValueRef))
944 (wrap-defcfun ("LLVMSetVisibility" LLVMSetVisibility) :void
945 (Global LLVMValueRef)
946 (Viz LLVMVisibility))
948 (wrap-defcfun ("LLVMGetAlignment" LLVMGetAlignment) :unsigned-int
949 (Global LLVMValueRef))
951 (wrap-defcfun ("LLVMSetAlignment" LLVMSetAlignment) :void
952 (Global LLVMValueRef)
953 (Bytes :unsigned-int))
955 (wrap-defcfun ("LLVMAddGlobal" LLVMAddGlobal) LLVMValueRef
956 (M LLVMModuleRef)
957 (Ty LLVMTypeRef)
958 (Name :string))
960 (wrap-defcfun ("LLVMGetNamedGlobal" LLVMGetNamedGlobal) LLVMValueRef
961 (M LLVMModuleRef)
962 (Name :string))
964 (wrap-defcfun ("LLVMGetFirstGlobal" LLVMGetFirstGlobal) LLVMValueRef
965 (M LLVMModuleRef))
967 (wrap-defcfun ("LLVMGetLastGlobal" LLVMGetLastGlobal) LLVMValueRef
968 (M LLVMModuleRef))
970 (wrap-defcfun ("LLVMGetNextGlobal" LLVMGetNextGlobal) LLVMValueRef
971 (GlobalVar LLVMValueRef))
973 (wrap-defcfun ("LLVMGetPreviousGlobal" LLVMGetPreviousGlobal) LLVMValueRef
974 (GlobalVar LLVMValueRef))
976 (wrap-defcfun ("LLVMDeleteGlobal" LLVMDeleteGlobal) :void
977 (GlobalVar LLVMValueRef))
979 (wrap-defcfun ("LLVMGetInitializer" LLVMGetInitializer) LLVMValueRef
980 (GlobalVar LLVMValueRef))
982 (wrap-defcfun ("LLVMSetInitializer" LLVMSetInitializer) :void
983 (GlobalVar LLVMValueRef)
984 (ConstantVal LLVMValueRef))
986 (wrap-defcfun ("LLVMIsThreadLocal" LLVMIsThreadLocal) :boolean
987 (GlobalVar LLVMValueRef))
989 (wrap-defcfun ("LLVMSetThreadLocal" LLVMSetThreadLocal) :void
990 (GlobalVar LLVMValueRef)
991 (IsThreadLocal :boolean))
993 (wrap-defcfun ("LLVMIsGlobalConstant" LLVMIsGlobalConstant) :boolean
994 (GlobalVar LLVMValueRef))
996 (wrap-defcfun ("LLVMSetGlobalConstant" LLVMSetGlobalConstant) :void
997 (GlobalVar LLVMValueRef)
998 (IsConstant :boolean))
1000 (wrap-defcfun ("LLVMAddAlias" LLVMAddAlias) LLVMValueRef
1001 (M LLVMModuleRef)
1002 (Ty LLVMTypeRef)
1003 (Aliasee LLVMValueRef)
1004 (Name :string))
1006 (wrap-defcfun ("LLVMAddFunction" LLVMAddFunction) LLVMValueRef
1007 (M LLVMModuleRef)
1008 (Name :string)
1009 (FunctionTy LLVMTypeRef))
1011 (wrap-defcfun ("LLVMGetNamedFunction" LLVMGetNamedFunction) LLVMValueRef
1012 (M LLVMModuleRef)
1013 (Name :string))
1015 (wrap-defcfun ("LLVMGetFirstFunction" LLVMGetFirstFunction) LLVMValueRef
1016 (M LLVMModuleRef))
1018 (wrap-defcfun ("LLVMGetLastFunction" LLVMGetLastFunction) LLVMValueRef
1019 (M LLVMModuleRef))
1021 (wrap-defcfun ("LLVMGetNextFunction" LLVMGetNextFunction) LLVMValueRef
1022 (Fn LLVMValueRef))
1024 (wrap-defcfun ("LLVMGetPreviousFunction" LLVMGetPreviousFunction) LLVMValueRef
1025 (Fn LLVMValueRef))
1027 (wrap-defcfun ("LLVMDeleteFunction" LLVMDeleteFunction) :void
1028 (Fn LLVMValueRef))
1030 (wrap-defcfun ("LLVMGetIntrinsicID" LLVMGetIntrinsicID) :unsigned-int
1031 (Fn LLVMValueRef))
1033 (wrap-defcfun ("LLVMGetFunctionCallConv" LLVMGetFunctionCallConv) :unsigned-int
1034 (Fn LLVMValueRef))
1036 (wrap-defcfun ("LLVMSetFunctionCallConv" LLVMSetFunctionCallConv) :void
1037 (Fn LLVMValueRef)
1038 (CC :unsigned-int))
1040 (wrap-defcfun ("LLVMGetGC" LLVMGetGC) :string
1041 (Fn LLVMValueRef))
1043 (wrap-defcfun ("LLVMSetGC" LLVMSetGC) :void
1044 (Fn LLVMValueRef)
1045 (Name :string))
1047 (wrap-defcfun ("LLVMGetFunctionAttr" LLVMGetFunctionAttr) LLVMAttribute
1048 (Fn LLVMValueRef))
1050 (wrap-defcfun ("LLVMCountParams" LLVMCountParams) :unsigned-int
1051 (Fn LLVMValueRef))
1053 (wrap-defcfun ("LLVMGetParams" %LLVMGetParams) :void
1054 (Fn LLVMValueRef)
1055 (Params :pointer))
1057 (wrap-defcfun ("LLVMGetParam" LLVMGetParam) LLVMValueRef
1058 (Fn LLVMValueRef)
1059 (Index :unsigned-int))
1061 (wrap-defcfun ("LLVMGetParamParent" LLVMGetParamParent) LLVMValueRef
1062 (Inst LLVMValueRef))
1064 (wrap-defcfun ("LLVMGetFirstParam" LLVMGetFirstParam) LLVMValueRef
1065 (Fn LLVMValueRef))
1067 (wrap-defcfun ("LLVMGetLastParam" LLVMGetLastParam) LLVMValueRef
1068 (Fn LLVMValueRef))
1070 (wrap-defcfun ("LLVMGetNextParam" LLVMGetNextParam) LLVMValueRef
1071 (Arg LLVMValueRef))
1073 (wrap-defcfun ("LLVMGetPreviousParam" LLVMGetPreviousParam) LLVMValueRef
1074 (Arg LLVMValueRef))
1076 (wrap-defcfun ("LLVMAddAttribute" LLVMAddAttribute) :void
1077 (Arg LLVMValueRef)
1078 (PA LLVMAttribute))
1080 (wrap-defcfun ("LLVMRemoveAttribute" LLVMRemoveAttribute) :void
1081 (Arg LLVMValueRef)
1082 (PA LLVMAttribute))
1084 (wrap-defcfun ("LLVMGetAttribute" LLVMGetAttribute) LLVMAttribute
1085 (Arg LLVMValueRef))
1087 (wrap-defcfun ("LLVMSetParamAlignment" LLVMSetParamAlignment) :void
1088 (Arg LLVMValueRef)
1089 (align :unsigned-int))
1091 (wrap-defcfun ("LLVMBasicBlockAsValue" LLVMBasicBlockAsValue) LLVMValueRef
1092 (BB LLVMBasicBlockRef))
1094 (wrap-defcfun ("LLVMValueIsBasicBlock" LLVMValueIsBasicBlock) :boolean
1095 (Val LLVMValueRef))
1097 (wrap-defcfun ("LLVMValueAsBasicBlock" LLVMValueAsBasicBlock) LLVMBasicBlockRef
1098 (Val LLVMValueRef))
1100 (wrap-defcfun ("LLVMGetBasicBlockParent" LLVMGetBasicBlockParent) LLVMValueRef
1101 (BB LLVMBasicBlockRef))
1103 (wrap-defcfun ("LLVMCountBasicBlocks" LLVMCountBasicBlocks) :unsigned-int
1104 (Fn LLVMValueRef))
1106 (wrap-defcfun ("LLVMGetBasicBlocks" LLVMGetBasicBlocks) :void
1107 (Fn LLVMValueRef)
1108 (BasicBlocks :pointer))
1110 (wrap-defcfun ("LLVMGetFirstBasicBlock" LLVMGetFirstBasicBlock) LLVMBasicBlockRef
1111 (Fn LLVMValueRef))
1113 (wrap-defcfun ("LLVMGetLastBasicBlock" LLVMGetLastBasicBlock) LLVMBasicBlockRef
1114 (Fn LLVMValueRef))
1116 (wrap-defcfun ("LLVMGetNextBasicBlock" LLVMGetNextBasicBlock) LLVMBasicBlockRef
1117 (BB LLVMBasicBlockRef))
1119 (wrap-defcfun ("LLVMGetPreviousBasicBlock" LLVMGetPreviousBasicBlock) LLVMBasicBlockRef
1120 (BB LLVMBasicBlockRef))
1122 (wrap-defcfun ("LLVMGetEntryBasicBlock" LLVMGetEntryBasicBlock) LLVMBasicBlockRef
1123 (Fn LLVMValueRef))
1125 (wrap-defcfun ("LLVMAppendBasicBlockInContext" %LLVMAppendBasicBlockInContext) LLVMBasicBlockRef
1126 (C LLVMContextRef)
1127 (Fn LLVMValueRef)
1128 (Name :string))
1130 (wrap-defcfun ("LLVMInsertBasicBlockInContext" %LLVMInsertBasicBlockInContext) LLVMBasicBlockRef
1131 (C LLVMContextRef)
1132 (BB LLVMBasicBlockRef)
1133 (Name :string))
1135 (wrap-defcfun ("LLVMDeleteBasicBlock" LLVMDeleteBasicBlock) :void
1136 (BB LLVMBasicBlockRef))
1138 (wrap-defcfun ("LLVMGetInstructionParent" LLVMGetInstructionParent) LLVMBasicBlockRef
1139 (Inst LLVMValueRef))
1141 (wrap-defcfun ("LLVMGetFirstInstruction" LLVMGetFirstInstruction) LLVMValueRef
1142 (BB LLVMBasicBlockRef))
1144 (wrap-defcfun ("LLVMGetLastInstruction" LLVMGetLastInstruction) LLVMValueRef
1145 (BB LLVMBasicBlockRef))
1147 (wrap-defcfun ("LLVMGetNextInstruction" LLVMGetNextInstruction) LLVMValueRef
1148 (Inst LLVMValueRef))
1150 (wrap-defcfun ("LLVMGetPreviousInstruction" LLVMGetPreviousInstruction) LLVMValueRef
1151 (Inst LLVMValueRef))
1153 (wrap-defcfun ("LLVMSetInstructionCallConv" LLVMSetInstructionCallConv) :void
1154 (Instr LLVMValueRef)
1155 (CC :unsigned-int))
1157 (wrap-defcfun ("LLVMGetInstructionCallConv" LLVMGetInstructionCallConv) :unsigned-int
1158 (Instr LLVMValueRef))
1160 (wrap-defcfun ("LLVMAddInstrAttribute" LLVMAddInstrAttribute) :void
1161 (Instr LLVMValueRef)
1162 (index :unsigned-int)
1163 (arg2 LLVMAttribute))
1165 (wrap-defcfun ("LLVMRemoveInstrAttribute" LLVMRemoveInstrAttribute) :void
1166 (Instr LLVMValueRef)
1167 (index :unsigned-int)
1168 (arg2 LLVMAttribute))
1170 (wrap-defcfun ("LLVMSetInstrParamAlignment" LLVMSetInstrParamAlignment) :void
1171 (Instr LLVMValueRef)
1172 (index :unsigned-int)
1173 (align :unsigned-int))
1175 (wrap-defcfun ("LLVMIsTailCall" LLVMIsTailCall) :boolean
1176 (CallInst LLVMValueRef))
1178 (wrap-defcfun ("LLVMSetTailCall" LLVMSetTailCall) :void
1179 (CallInst LLVMValueRef)
1180 (IsTailCall :boolean))
1182 (wrap-defcfun ("LLVMAddIncoming" %LLVMAddIncoming) :void
1183 (PhiNode LLVMValueRef)
1184 (IncomingValues :pointer)
1185 (IncomingBlocks :pointer)
1186 (Count :unsigned-int))
1188 (wrap-defcfun ("LLVMCountIncoming" LLVMCountIncoming) :unsigned-int
1189 (PhiNode LLVMValueRef))
1191 (wrap-defcfun ("LLVMGetIncomingValue" LLVMGetIncomingValue) LLVMValueRef
1192 (PhiNode LLVMValueRef)
1193 (Index :unsigned-int))
1195 (wrap-defcfun ("LLVMGetIncomingBlock" LLVMGetIncomingBlock) LLVMBasicBlockRef
1196 (PhiNode LLVMValueRef)
1197 (Index :unsigned-int))
1199 (wrap-defcfun ("LLVMCreateBuilderInContext" %LLVMCreateBuilderInContext) LLVMBuilderRef
1200 (C LLVMContextRef))
1202 (wrap-defcfun ("LLVMPositionBuilder" LLVMPositionBuilder) :void
1203 (Builder LLVMBuilderRef)
1204 (Block LLVMBasicBlockRef)
1205 (Instr LLVMValueRef))
1207 (wrap-defcfun ("LLVMPositionBuilderBefore" LLVMPositionBuilderBefore) :void
1208 (Builder LLVMBuilderRef)
1209 (Instr LLVMValueRef))
1211 (wrap-defcfun ("LLVMPositionBuilderAtEnd" LLVMPositionBuilderAtEnd) :void
1212 (Builder LLVMBuilderRef)
1213 (Block LLVMBasicBlockRef))
1215 (wrap-defcfun ("LLVMGetInsertBlock" LLVMGetInsertBlock) LLVMBasicBlockRef
1216 (Builder LLVMBuilderRef))
1218 (wrap-defcfun ("LLVMClearInsertionPosition" LLVMClearInsertionPosition) :void
1219 (Builder LLVMBuilderRef))
1221 (wrap-defcfun ("LLVMInsertIntoBuilder" LLVMInsertIntoBuilder) :void
1222 (Builder LLVMBuilderRef)
1223 (Instr LLVMValueRef))
1225 (wrap-defcfun ("LLVMInsertIntoBuilderWithName" LLVMInsertIntoBuilderWithName) :void
1226 (Builder LLVMBuilderRef)
1227 (Instr LLVMValueRef)
1228 (Name :string))
1230 (wrap-defcfun ("LLVMDisposeBuilder" LLVMDisposeBuilder) :void
1231 (Builder LLVMBuilderRef))
1233 (wrap-defcfun ("LLVMBuildRetVoid" LLVMBuildRetVoid) LLVMValueRef
1234 (arg0 LLVMBuilderRef))
1236 (wrap-defcfun ("LLVMBuildRet" LLVMBuildRet) LLVMValueRef
1237 (arg0 LLVMBuilderRef)
1238 (V LLVMValueRef))
1240 (wrap-defcfun ("LLVMBuildAggregateRet" %LLVMBuildAggregateRet) LLVMValueRef
1241 (arg0 LLVMBuilderRef)
1242 (RetVals :pointer)
1243 (N :unsigned-int))
1245 (wrap-defcfun ("LLVMBuildBr" LLVMBuildBr) LLVMValueRef
1246 (arg0 LLVMBuilderRef)
1247 (Dest LLVMBasicBlockRef))
1249 (wrap-defcfun ("LLVMBuildCondBr" LLVMBuildCondBr) LLVMValueRef
1250 (arg0 LLVMBuilderRef)
1251 (If LLVMValueRef)
1252 (Then LLVMBasicBlockRef)
1253 (Else LLVMBasicBlockRef))
1255 (wrap-defcfun ("LLVMBuildSwitch" LLVMBuildSwitch) LLVMValueRef
1256 (arg0 LLVMBuilderRef)
1257 (V LLVMValueRef)
1258 (Else LLVMBasicBlockRef)
1259 (NumCases :unsigned-int))
1261 (wrap-defcfun ("LLVMBuildInvoke" %LLVMBuildInvoke) LLVMValueRef
1262 (arg0 LLVMBuilderRef)
1263 (Fn LLVMValueRef)
1264 (Args :pointer)
1265 (NumArgs :unsigned-int)
1266 (Then LLVMBasicBlockRef)
1267 (Catch LLVMBasicBlockRef)
1268 (Name :string))
1270 (wrap-defcfun ("LLVMBuildUnwind" LLVMBuildUnwind) LLVMValueRef
1271 (arg0 LLVMBuilderRef))
1273 (wrap-defcfun ("LLVMBuildUnreachable" LLVMBuildUnreachable) LLVMValueRef
1274 (arg0 LLVMBuilderRef))
1276 (wrap-defcfun ("LLVMAddCase" LLVMAddCase) :void
1277 (Switch LLVMValueRef)
1278 (OnVal LLVMValueRef)
1279 (Dest LLVMBasicBlockRef))
1281 (wrap-defcfun ("LLVMBuildAdd" LLVMBuildAdd) LLVMValueRef
1282 (arg0 LLVMBuilderRef)
1283 (LHS LLVMValueRef)
1284 (RHS LLVMValueRef)
1285 (Name :string))
1287 (wrap-defcfun ("LLVMBuildNSWAdd" LLVMBuildNSWAdd) LLVMValueRef
1288 (arg0 LLVMBuilderRef)
1289 (LHS LLVMValueRef)
1290 (RHS LLVMValueRef)
1291 (Name :string))
1293 (wrap-defcfun ("LLVMBuildFAdd" LLVMBuildFAdd) LLVMValueRef
1294 (arg0 LLVMBuilderRef)
1295 (LHS LLVMValueRef)
1296 (RHS LLVMValueRef)
1297 (Name :string))
1299 (wrap-defcfun ("LLVMBuildSub" LLVMBuildSub) LLVMValueRef
1300 (arg0 LLVMBuilderRef)
1301 (LHS LLVMValueRef)
1302 (RHS LLVMValueRef)
1303 (Name :string))
1305 (wrap-defcfun ("LLVMBuildFSub" LLVMBuildFSub) LLVMValueRef
1306 (arg0 LLVMBuilderRef)
1307 (LHS LLVMValueRef)
1308 (RHS LLVMValueRef)
1309 (Name :string))
1311 (wrap-defcfun ("LLVMBuildMul" LLVMBuildMul) LLVMValueRef
1312 (arg0 LLVMBuilderRef)
1313 (LHS LLVMValueRef)
1314 (RHS LLVMValueRef)
1315 (Name :string))
1317 (wrap-defcfun ("LLVMBuildFMul" LLVMBuildFMul) LLVMValueRef
1318 (arg0 LLVMBuilderRef)
1319 (LHS LLVMValueRef)
1320 (RHS LLVMValueRef)
1321 (Name :string))
1323 (wrap-defcfun ("LLVMBuildUDiv" LLVMBuildUDiv) LLVMValueRef
1324 (arg0 LLVMBuilderRef)
1325 (LHS LLVMValueRef)
1326 (RHS LLVMValueRef)
1327 (Name :string))
1329 (wrap-defcfun ("LLVMBuildSDiv" LLVMBuildSDiv) LLVMValueRef
1330 (arg0 LLVMBuilderRef)
1331 (LHS LLVMValueRef)
1332 (RHS LLVMValueRef)
1333 (Name :string))
1335 (wrap-defcfun ("LLVMBuildExactSDiv" LLVMBuildExactSDiv) LLVMValueRef
1336 (arg0 LLVMBuilderRef)
1337 (LHS LLVMValueRef)
1338 (RHS LLVMValueRef)
1339 (Name :string))
1341 (wrap-defcfun ("LLVMBuildFDiv" LLVMBuildFDiv) LLVMValueRef
1342 (arg0 LLVMBuilderRef)
1343 (LHS LLVMValueRef)
1344 (RHS LLVMValueRef)
1345 (Name :string))
1347 (wrap-defcfun ("LLVMBuildURem" LLVMBuildURem) LLVMValueRef
1348 (arg0 LLVMBuilderRef)
1349 (LHS LLVMValueRef)
1350 (RHS LLVMValueRef)
1351 (Name :string))
1353 (wrap-defcfun ("LLVMBuildSRem" LLVMBuildSRem) LLVMValueRef
1354 (arg0 LLVMBuilderRef)
1355 (LHS LLVMValueRef)
1356 (RHS LLVMValueRef)
1357 (Name :string))
1359 (wrap-defcfun ("LLVMBuildFRem" LLVMBuildFRem) LLVMValueRef
1360 (arg0 LLVMBuilderRef)
1361 (LHS LLVMValueRef)
1362 (RHS LLVMValueRef)
1363 (Name :string))
1365 (wrap-defcfun ("LLVMBuildShl" LLVMBuildShl) LLVMValueRef
1366 (arg0 LLVMBuilderRef)
1367 (LHS LLVMValueRef)
1368 (RHS LLVMValueRef)
1369 (Name :string))
1371 (wrap-defcfun ("LLVMBuildLShr" LLVMBuildLShr) LLVMValueRef
1372 (arg0 LLVMBuilderRef)
1373 (LHS LLVMValueRef)
1374 (RHS LLVMValueRef)
1375 (Name :string))
1377 (wrap-defcfun ("LLVMBuildAShr" LLVMBuildAShr) LLVMValueRef
1378 (arg0 LLVMBuilderRef)
1379 (LHS LLVMValueRef)
1380 (RHS LLVMValueRef)
1381 (Name :string))
1383 (wrap-defcfun ("LLVMBuildAnd" LLVMBuildAnd) LLVMValueRef
1384 (arg0 LLVMBuilderRef)
1385 (LHS LLVMValueRef)
1386 (RHS LLVMValueRef)
1387 (Name :string))
1389 (wrap-defcfun ("LLVMBuildOr" LLVMBuildOr) LLVMValueRef
1390 (arg0 LLVMBuilderRef)
1391 (LHS LLVMValueRef)
1392 (RHS LLVMValueRef)
1393 (Name :string))
1395 (wrap-defcfun ("LLVMBuildXor" LLVMBuildXor) LLVMValueRef
1396 (arg0 LLVMBuilderRef)
1397 (LHS LLVMValueRef)
1398 (RHS LLVMValueRef)
1399 (Name :string))
1401 (wrap-defcfun ("LLVMBuildNeg" LLVMBuildNeg) LLVMValueRef
1402 (arg0 LLVMBuilderRef)
1403 (V LLVMValueRef)
1404 (Name :string))
1406 (wrap-defcfun ("LLVMBuildFNeg" LLVMBuildFNeg) LLVMValueRef
1407 (arg0 LLVMBuilderRef)
1408 (V LLVMValueRef)
1409 (Name :string))
1411 (wrap-defcfun ("LLVMBuildNot" LLVMBuildNot) LLVMValueRef
1412 (arg0 LLVMBuilderRef)
1413 (V LLVMValueRef)
1414 (Name :string))
1416 (wrap-defcfun ("LLVMBuildMalloc" LLVMBuildMalloc) LLVMValueRef
1417 (arg0 LLVMBuilderRef)
1418 (Ty LLVMTypeRef)
1419 (Name :string))
1421 (wrap-defcfun ("LLVMBuildArrayMalloc" LLVMBuildArrayMalloc) LLVMValueRef
1422 (arg0 LLVMBuilderRef)
1423 (Ty LLVMTypeRef)
1424 (Val LLVMValueRef)
1425 (Name :string))
1427 (wrap-defcfun ("LLVMBuildAlloca" LLVMBuildAlloca) LLVMValueRef
1428 (arg0 LLVMBuilderRef)
1429 (Ty LLVMTypeRef)
1430 (Name :string))
1432 (wrap-defcfun ("LLVMBuildArrayAlloca" LLVMBuildArrayAlloca) LLVMValueRef
1433 (arg0 LLVMBuilderRef)
1434 (Ty LLVMTypeRef)
1435 (Val LLVMValueRef)
1436 (Name :string))
1438 (wrap-defcfun ("LLVMBuildFree" LLVMBuildFree) LLVMValueRef
1439 (arg0 LLVMBuilderRef)
1440 (PointerVal LLVMValueRef))
1442 (wrap-defcfun ("LLVMBuildLoad" LLVMBuildLoad) LLVMValueRef
1443 (arg0 LLVMBuilderRef)
1444 (PointerVal LLVMValueRef)
1445 (Name :string))
1447 (wrap-defcfun ("LLVMBuildStore" LLVMBuildStore) LLVMValueRef
1448 (arg0 LLVMBuilderRef)
1449 (Val LLVMValueRef)
1450 (Ptr LLVMValueRef))
1452 (wrap-defcfun ("LLVMBuildGEP" %LLVMBuildGEP) LLVMValueRef
1453 (B LLVMBuilderRef)
1454 (Pointer LLVMValueRef)
1455 (Indices :pointer)
1456 (NumIndices :unsigned-int)
1457 (Name :string))
1459 (wrap-defcfun ("LLVMBuildInBoundsGEP" %LLVMBuildInBoundsGEP) LLVMValueRef
1460 (B LLVMBuilderRef)
1461 (Pointer LLVMValueRef)
1462 (Indices :pointer)
1463 (NumIndices :unsigned-int)
1464 (Name :string))
1466 (wrap-defcfun ("LLVMBuildStructGEP" LLVMBuildStructGEP) LLVMValueRef
1467 (B LLVMBuilderRef)
1468 (Pointer LLVMValueRef)
1469 (Idx :unsigned-int)
1470 (Name :string))
1472 (wrap-defcfun ("LLVMBuildGlobalString" LLVMBuildGlobalString) LLVMValueRef
1473 (B LLVMBuilderRef)
1474 (Str :string)
1475 (Name :string))
1477 (wrap-defcfun ("LLVMBuildGlobalStringPtr" LLVMBuildGlobalStringPtr) LLVMValueRef
1478 (B LLVMBuilderRef)
1479 (Str :string)
1480 (Name :string))
1482 (wrap-defcfun ("LLVMBuildTrunc" LLVMBuildTrunc) LLVMValueRef
1483 (arg0 LLVMBuilderRef)
1484 (Val LLVMValueRef)
1485 (DestTy LLVMTypeRef)
1486 (Name :string))
1488 (wrap-defcfun ("LLVMBuildZExt" LLVMBuildZExt) LLVMValueRef
1489 (arg0 LLVMBuilderRef)
1490 (Val LLVMValueRef)
1491 (DestTy LLVMTypeRef)
1492 (Name :string))
1494 (wrap-defcfun ("LLVMBuildSExt" LLVMBuildSExt) LLVMValueRef
1495 (arg0 LLVMBuilderRef)
1496 (Val LLVMValueRef)
1497 (DestTy LLVMTypeRef)
1498 (Name :string))
1500 (wrap-defcfun ("LLVMBuildFPToUI" LLVMBuildFPToUI) LLVMValueRef
1501 (arg0 LLVMBuilderRef)
1502 (Val LLVMValueRef)
1503 (DestTy LLVMTypeRef)
1504 (Name :string))
1506 (wrap-defcfun ("LLVMBuildFPToSI" LLVMBuildFPToSI) LLVMValueRef
1507 (arg0 LLVMBuilderRef)
1508 (Val LLVMValueRef)
1509 (DestTy LLVMTypeRef)
1510 (Name :string))
1512 (wrap-defcfun ("LLVMBuildUIToFP" LLVMBuildUIToFP) LLVMValueRef
1513 (arg0 LLVMBuilderRef)
1514 (Val LLVMValueRef)
1515 (DestTy LLVMTypeRef)
1516 (Name :string))
1518 (wrap-defcfun ("LLVMBuildSIToFP" LLVMBuildSIToFP) LLVMValueRef
1519 (arg0 LLVMBuilderRef)
1520 (Val LLVMValueRef)
1521 (DestTy LLVMTypeRef)
1522 (Name :string))
1524 (wrap-defcfun ("LLVMBuildFPTrunc" LLVMBuildFPTrunc) LLVMValueRef
1525 (arg0 LLVMBuilderRef)
1526 (Val LLVMValueRef)
1527 (DestTy LLVMTypeRef)
1528 (Name :string))
1530 (wrap-defcfun ("LLVMBuildFPExt" LLVMBuildFPExt) LLVMValueRef
1531 (arg0 LLVMBuilderRef)
1532 (Val LLVMValueRef)
1533 (DestTy LLVMTypeRef)
1534 (Name :string))
1536 (wrap-defcfun ("LLVMBuildPtrToInt" LLVMBuildPtrToInt) LLVMValueRef
1537 (arg0 LLVMBuilderRef)
1538 (Val LLVMValueRef)
1539 (DestTy LLVMTypeRef)
1540 (Name :string))
1542 (wrap-defcfun ("LLVMBuildIntToPtr" LLVMBuildIntToPtr) LLVMValueRef
1543 (arg0 LLVMBuilderRef)
1544 (Val LLVMValueRef)
1545 (DestTy LLVMTypeRef)
1546 (Name :string))
1548 (wrap-defcfun ("LLVMBuildBitCast" LLVMBuildBitCast) LLVMValueRef
1549 (arg0 LLVMBuilderRef)
1550 (Val LLVMValueRef)
1551 (DestTy LLVMTypeRef)
1552 (Name :string))
1554 (wrap-defcfun ("LLVMBuildZExtOrBitCast" LLVMBuildZExtOrBitCast) LLVMValueRef
1555 (arg0 LLVMBuilderRef)
1556 (Val LLVMValueRef)
1557 (DestTy LLVMTypeRef)
1558 (Name :string))
1560 (wrap-defcfun ("LLVMBuildSExtOrBitCast" LLVMBuildSExtOrBitCast) LLVMValueRef
1561 (arg0 LLVMBuilderRef)
1562 (Val LLVMValueRef)
1563 (DestTy LLVMTypeRef)
1564 (Name :string))
1566 (wrap-defcfun ("LLVMBuildTruncOrBitCast" LLVMBuildTruncOrBitCast) LLVMValueRef
1567 (arg0 LLVMBuilderRef)
1568 (Val LLVMValueRef)
1569 (DestTy LLVMTypeRef)
1570 (Name :string))
1572 (wrap-defcfun ("LLVMBuildPointerCast" LLVMBuildPointerCast) LLVMValueRef
1573 (arg0 LLVMBuilderRef)
1574 (Val LLVMValueRef)
1575 (DestTy LLVMTypeRef)
1576 (Name :string))
1578 (wrap-defcfun ("LLVMBuildIntCast" LLVMBuildIntCast) LLVMValueRef
1579 (arg0 LLVMBuilderRef)
1580 (Val LLVMValueRef)
1581 (DestTy LLVMTypeRef)
1582 (Name :string))
1584 (wrap-defcfun ("LLVMBuildFPCast" LLVMBuildFPCast) LLVMValueRef
1585 (arg0 LLVMBuilderRef)
1586 (Val LLVMValueRef)
1587 (DestTy LLVMTypeRef)
1588 (Name :string))
1590 (wrap-defcfun ("LLVMBuildICmp" LLVMBuildICmp) LLVMValueRef
1591 (arg0 LLVMBuilderRef)
1592 (Op LLVMIntPredicate)
1593 (LHS LLVMValueRef)
1594 (RHS LLVMValueRef)
1595 (Name :string))
1597 (wrap-defcfun ("LLVMBuildFCmp" LLVMBuildFCmp) LLVMValueRef
1598 (arg0 LLVMBuilderRef)
1599 (Op LLVMRealPredicate)
1600 (LHS LLVMValueRef)
1601 (RHS LLVMValueRef)
1602 (Name :string))
1604 (wrap-defcfun ("LLVMBuildPhi" LLVMBuildPhi) LLVMValueRef
1605 (arg0 LLVMBuilderRef)
1606 (Ty LLVMTypeRef)
1607 (Name :string))
1609 (wrap-defcfun ("LLVMBuildCall" %LLVMBuildCall) LLVMValueRef
1610 (arg0 LLVMBuilderRef)
1611 (Fn LLVMValueRef)
1612 (Args :pointer)
1613 (NumArgs :unsigned-int)
1614 (Name :string))
1616 (wrap-defcfun ("LLVMBuildSelect" LLVMBuildSelect) LLVMValueRef
1617 (arg0 LLVMBuilderRef)
1618 (If LLVMValueRef)
1619 (Then LLVMValueRef)
1620 (Else LLVMValueRef)
1621 (Name :string))
1623 (wrap-defcfun ("LLVMBuildVAArg" LLVMBuildVAArg) LLVMValueRef
1624 (arg0 LLVMBuilderRef)
1625 (List LLVMValueRef)
1626 (Ty LLVMTypeRef)
1627 (Name :string))
1629 (wrap-defcfun ("LLVMBuildExtractElement" LLVMBuildExtractElement) LLVMValueRef
1630 (arg0 LLVMBuilderRef)
1631 (VecVal LLVMValueRef)
1632 (Index LLVMValueRef)
1633 (Name :string))
1635 (wrap-defcfun ("LLVMBuildInsertElement" LLVMBuildInsertElement) LLVMValueRef
1636 (arg0 LLVMBuilderRef)
1637 (VecVal LLVMValueRef)
1638 (EltVal LLVMValueRef)
1639 (Index LLVMValueRef)
1640 (Name :string))
1642 (wrap-defcfun ("LLVMBuildShuffleVector" LLVMBuildShuffleVector) LLVMValueRef
1643 (arg0 LLVMBuilderRef)
1644 (V1 LLVMValueRef)
1645 (V2 LLVMValueRef)
1646 (Mask LLVMValueRef)
1647 (Name :string))
1649 (wrap-defcfun ("LLVMBuildExtractValue" LLVMBuildExtractValue) LLVMValueRef
1650 (arg0 LLVMBuilderRef)
1651 (AggVal LLVMValueRef)
1652 (Index :unsigned-int)
1653 (Name :string))
1655 (wrap-defcfun ("LLVMBuildInsertValue" LLVMBuildInsertValue) LLVMValueRef
1656 (arg0 LLVMBuilderRef)
1657 (AggVal LLVMValueRef)
1658 (EltVal LLVMValueRef)
1659 (Index :unsigned-int)
1660 (Name :string))
1662 (wrap-defcfun ("LLVMBuildIsNull" LLVMBuildIsNull) LLVMValueRef
1663 (arg0 LLVMBuilderRef)
1664 (Val LLVMValueRef)
1665 (Name :string))
1667 (wrap-defcfun ("LLVMBuildIsNotNull" LLVMBuildIsNotNull) LLVMValueRef
1668 (arg0 LLVMBuilderRef)
1669 (Val LLVMValueRef)
1670 (Name :string))
1672 (wrap-defcfun ("LLVMBuildPtrDiff" LLVMBuildPtrDiff) LLVMValueRef
1673 (arg0 LLVMBuilderRef)
1674 (LHS LLVMValueRef)
1675 (RHS LLVMValueRef)
1676 (Name :string))
1678 (wrap-defcfun ("LLVMCreateModuleProviderForExistingModule" LLVMCreateModuleProviderForExistingModule) LLVMModuleProviderRef
1679 (M LLVMModuleRef))
1681 (wrap-defcfun ("LLVMDisposeModuleProvider" LLVMDisposeModuleProvider) :void
1682 (MP LLVMModuleProviderRef))
1684 (wrap-defcfun ("LLVMCreateMemoryBufferWithContentsOfFile" LLVMCreateMemoryBufferWithContentsOfFile) :boolean
1685 (Path :string)
1686 (OutMemBuf :pointer)
1687 (OutMessage :pointer))
1689 (wrap-defcfun ("LLVMCreateMemoryBufferWithSTDIN" LLVMCreateMemoryBufferWithSTDIN) :boolean
1690 (OutMemBuf :pointer)
1691 (OutMessage :pointer))
1693 (wrap-defcfun ("LLVMDisposeMemoryBuffer" LLVMDisposeMemoryBuffer) :void
1694 (MemBuf LLVMMemoryBufferRef))
1696 (wrap-defcfun ("LLVMCreatePassManager" LLVMCreatePassManager) LLVMPassManagerRef)
1698 (wrap-defcfun ("LLVMCreateFunctionPassManager" LLVMCreateFunctionPassManager) LLVMPassManagerRef
1699 (MP LLVMModuleProviderRef))
1701 (wrap-defcfun ("LLVMRunPassManager" LLVMRunPassManager) :boolean
1702 (PM LLVMPassManagerRef)
1703 (M LLVMModuleRef))
1705 (wrap-defcfun ("LLVMInitializeFunctionPassManager" LLVMInitializeFunctionPassManager) :boolean
1706 (FPM LLVMPassManagerRef))
1708 (wrap-defcfun ("LLVMRunFunctionPassManager" LLVMRunFunctionPassManager) :boolean
1709 (FPM LLVMPassManagerRef)
1710 (F LLVMValueRef))
1712 (wrap-defcfun ("LLVMFinalizeFunctionPassManager" LLVMFinalizeFunctionPassManager) :boolean
1713 (FPM LLVMPassManagerRef))
1715 (wrap-defcfun ("LLVMDisposePassManager" LLVMDisposePassManager) :void
1716 (PM LLVMPassManagerRef))
1718 ;;; The wrappers to expose the "InContext" versions of the functions
1719 ;;; in a more lispy way.
1720 (declaim (special *llvm-context*))
1722 (defun LLVMModuleCreateWithName (ModuleId &optional (context *llvm-context*))
1723 (%LLVMModuleCreateWithNameInContext ModuleId context))
1725 (defun LLVMInt1Type (&optional (context *llvm-context*))
1726 (%LLVMInt1TypeInContext context))
1728 (defun LLVMInt8Type (&optional (context *llvm-context*))
1729 (%LLVMInt8TypeInContext context))
1731 (defun LLVMInt16Type (&optional (context *llvm-context*))
1732 (%LLVMInt16TypeInContext context))
1734 (defun LLVMInt32Type (&optional (context *llvm-context*))
1735 (%LLVMInt32TypeInContext context))
1737 (defun LLVMInt64Type (&optional (context *llvm-context*))
1738 (%LLVMInt64TypeInContext context))
1740 (defun LLVMIntType (NumBits &optional (context *llvm-context*))
1741 (%LLVMIntTypeInContext context NumBits))
1743 (defun LLVMFloatType (&optional (context *llvm-context*))
1744 (%LLVMFloatTypeInContext context))
1746 (defun LLVMDoubleType (&optional (context *llvm-context*))
1747 (%LLVMDoubleTypeInContext context))
1749 (defun LLVMX86FP80Type (&optional (context *llvm-context*))
1750 (%LLVMX86FP80TypeInContext context))
1752 (defun LLVMFP128Type (&optional (context *llvm-context*))
1753 (%LLVMFP128TypeInContext context))
1755 (defun LLVMPPCFP128Type (&optional (context *llvm-context*))
1756 (%LLVMPPCFP128TypeInContext context))
1758 ;; LLVMStructTypeInContext handled below.
1760 (defun LLVMVoidType (&optional (context *llvm-context*))
1761 (%LLVMVoidTypeInContext context))
1763 (defun LLVMLabelType (&optional (context *llvm-context*))
1764 (%LLVMLabelTypeInContext context))
1766 (defun LLVMOpaqueType (&optional (context *llvm-context*))
1767 (%LLVMOpaqueTypeInContext context))
1769 ;; LLVMConstStringInContext handled below
1770 ;; LLVMConstStructInContext handled below
1772 (defun LLVMAppendBasicBlock (Fn Name &optional (context *llvm-context*))
1773 (%LLVMAppendBasicBlockInContext context Fn Name))
1775 (defun LLVMInsertBasicBlock (BB Name &optional (context *llvm-context*))
1776 (%LLVMInsertBasicBlockInContext context BB Name))
1778 (defun LLVMCreateBuilder (&optional (context *llvm-context*))
1779 (%LLVMCreateBuilderInContext context))
1782 ;; More complex wrappers for dealing with pointers.
1784 (defmacro with-array-and-length ((array len list) &body body)
1785 (let ((list-v (gensym "list")))
1786 `(let* ((,list-v ,list)
1787 (,len (length ,list-v)))
1788 (cffi:with-foreign-object (,array :pointer ,len)
1789 (loop for l in ,list-v
1790 for i from 0
1792 (setf (cffi:mem-aref ,array :pointer i) l))
1793 (progn ,@body)))))
1795 (defun LLVMFunctionType (ret params is-var-arg)
1796 "Combines the C API's ParamTypes array and ParamCount arguments into
1797 a single list PARAMS."
1798 (with-array-and-length (array len params)
1799 (%LLVMFunctionType ret array len is-var-arg)))
1801 (defun LLVMGetParamTypes (function-type)
1802 "Returns a list of param types rather than filling out a Dest pointer argument"
1803 (let ((len (LLVMCountParamTypes function-type)))
1804 (cffi:with-foreign-object (array :pointer len)
1805 (%LLVMGetParamTypes function-type array)
1806 (loop for i from 0 below len
1807 collect
1808 (cffi:mem-aref array :pointer i)))))
1810 (defun LLVMStructType (element-types is-packed &optional (context *llvm-context*))
1811 (with-array-and-length (array len element-types)
1812 (%LLVMStructTypeInContext context array len is-packed)))
1814 (defun LLVMGetStructElementTypes (struct-type)
1815 "Returns a list of param types rather than filling out a Dest pointer argument"
1816 (let ((len (LLVMCountStructElementTypes struct-type)))
1817 (cffi:with-foreign-object (array :pointer len)
1818 (%LLVMGetStructElementTypes struct-type array)
1819 (loop for i from 0 below len
1820 collect
1821 (cffi:mem-aref array :pointer i)))))
1823 (defun LLVMConstString (str dont-null-terminate &optional (context *llvm-context*))
1824 (cffi:with-foreign-string ((foreign-string num-bytes) str)
1825 (%LLVMConstStringInContext context foreign-string num-bytes dont-null-terminate)))
1827 (defun LLVMConstStruct (vals packed-p &optional (context *llvm-context*))
1828 (with-array-and-length (array len vals)
1829 (%LLVMConstStructInContext context array len packed-p)))
1831 (defun LLVMConstArray (type vals)
1832 (with-array-and-length (array len vals)
1833 (%LLVMConstArray type array len)))
1835 (defun LLVMConstVector (vals)
1836 (with-array-and-length (array len vals)
1837 (%LLVMConstVector array len)))
1839 (defun LLVMConstGEP (ptr indices)
1840 (with-array-and-length (array len indices)
1841 (%LLVMConstGEP ptr array len)))
1843 (defun LLVMConstInBoundsGEP (ptr indices)
1844 (with-array-and-length (array len indices)
1845 (%LLVMConstInBoundsGEP ptr array len)))
1847 (defun LLVMConstExtractValue (AggConstant indices)
1848 (with-array-and-length (array len indices)
1849 (%LLVMConstExtractValue AggConstant array len)))
1851 (defun LLVMConstInsertValue (AggConstant ValConstant indices)
1852 (with-array-and-length (array len indices)
1853 (%LLVMConstInsertValue AggConstant ValConstant array len)))
1855 (defun LLVMGetParams (fn)
1856 "Returns a list of params rather than filling out a Dest pointer argument."
1857 (let ((len (LLVMCountParams fn)))
1858 (cffi:with-foreign-object (array :pointer len)
1859 (%LLVMGetParams fn array)
1860 (loop for i from 0 below len
1861 collect
1862 (cffi:mem-aref array :pointer i)))))
1864 (defun LLVMAddIncoming (phi-node incoming-val incoming-block)
1865 "Unlike the C API (but like the C++ API...), takes only a single
1866 incoming val and incoming block. Call multiple times if you want to
1867 add multiple incoming values."
1868 (cffi:with-foreign-objects ((incoming-vals :pointer)
1869 (incoming-blocks :pointer))
1870 (setf (cffi:mem-aref incoming-vals :pointer 0) incoming-val)
1871 (setf (cffi:mem-aref incoming-blocks :pointer 0) incoming-block)
1872 (%LLVMAddIncoming phi-node incoming-vals incoming-blocks 1)))
1874 (defun LLVMBuildAggregateRet (builder vals)
1875 (with-array-and-length (array len vals)
1876 (%LLVMBuildAggregateRet builder array len)))
1878 (defun LLVMBuildInvoke (builder fn args then catch &optional (name ""))
1879 (with-array-and-length (array len args)
1880 (%LLVMBuildInvoke builder fn array len then catch name)))
1882 (defun LLVMBuildGEP (builder ptr indices &optional (name ""))
1883 (with-array-and-length (array len indices)
1884 (%LLVMBuildGEP builder ptr array len name)))
1886 (defun LLVMBuildInBoundsGEP (builder ptr indices &optional (name ""))
1887 (with-array-and-length (array len indices)
1888 (%LLVMBuildInBoundsGEP builder ptr array len name)))
1890 (defun LLVMBuildCall (builder fn args &optional (name ""))
1891 "Combines the C API's Args array and NumArgs arguments into a single
1892 list ARGS."
1893 (with-array-and-length (array len args)
1894 (%LLVMBuildCall builder fn array len name)))
1896 ;; TODO:
1897 ;; LLVMCreateMemoryBufferWithContentsOfFile has OutMemBuf, OutMessage
1898 ;; LLVMCreateMemoryBufferWithSTDIN has OutMemBuf, OutMessage