From 61fb1da43763707ce29905263209559edeee297e Mon Sep 17 00:00:00 2001 From: James Y Knight Date: Fri, 1 Jan 2010 22:06:45 -0500 Subject: [PATCH] Make the "name" argument of LLVMBuild* an optional argument, defaulting to "". It'd be nice if CFFI's defcfun supported &optional itself. --- README | 10 +- src/Makefile | 6 +- src/core.i | 23 +- src/generated/core.lisp | 785 +++++++++++++++++++++-------------------- src/generated/llvm-extras.lisp | 4 + src/llvm-extras.cpp | 6 + src/stuff.lisp | 6 + 7 files changed, 448 insertions(+), 392 deletions(-) diff --git a/README b/README index 9f66de8..fd21e58 100644 --- a/README +++ b/README @@ -65,8 +65,14 @@ There are a few things which I have adjusted in the wrapper: take one at a time: call it multiple times to add multiple incoming values. -4) Where the C API uses an output array argument, such as +4) In LLVMBuild*, where the last argument is a "char *Name", I have + arranged to make that an optional argument, defaulting to the empty + string. The name is only used to give a human-understandable name + to the LHS of the assignment in the LLVM IR. If it is omitted, LLVM + has the sane default of an auto-incrementing integer. + +5) Where the C API uses an output array argument, such as LLVMGetStructElementTypes, I instead return a list. -5) Where the C API takes a pointer to a char *ErrorMsg, ...FIXME +6) Where the C API takes a pointer to a char *ErrorMsg, ...FIXME something... diff --git a/src/Makefile b/src/Makefile index 5bf54b7..ba06f9d 100644 --- a/src/Makefile +++ b/src/Makefile @@ -6,7 +6,7 @@ CFLAGS=$(shell llvm-config --cflags) CXXFLAGS=$(CFLAGS) LDFLAGS=$(shell llvm-config --ldflags) LINKER=g++ -LLVM_LIBS=-Wl,--whole-archive $(shell llvm-config --libs core jit interpreter native asmparser) -Wl,--no-whole-archive +LLVM_LIBS=-Wl,--whole-archive $(shell llvm-config --libs core jit interpreter native asmparser ipo) -Wl,--no-whole-archive BINDINGS_FILES=$(addprefix generated/,\ core.lisp \ @@ -25,6 +25,10 @@ bindings: $(BINDINGS_FILES) generated/%.lisp: %.i $(SWIG) $(SWIGFLAGS) -o $@ -module $* $< +generated/core.lisp: core.i + $(SWIG) $(SWIGFLAGS) -o $@ -module core $< + sed 's/(cffi:defcfun/(wrap-defcfun/' -i generated/core.lisp + llvm-extras.o: llvm-extras.cpp cl-llvm.so: llvm-extras.o diff --git a/src/core.i b/src/core.i index fec951d..169af63 100644 --- a/src/core.i +++ b/src/core.i @@ -77,6 +77,21 @@ typedef unsigned char uint8_t; %ignore LLVMAddFunctionAttr; %ignore LLVMRemoveFunctionAttr; +%insert("swiglisp") %{ +;; A little hack make the Name argument for LLVMBuild* be optional and +;; default to the empty string. +(defmacro wrap-defcfun ((c-name lisp-name &rest options) return-type &body args) + (if (and (eql (mismatch "LLVMBuild" c-name) 9) + (equal (last args) '((Name :string)))) + (let ((real-lisp-name (intern (concatenate 'string "%" (symbol-name lisp-name)) + (symbol-package lisp-name))) + (mod-args (map 'list #'car (butlast args)))) + `(progn + ( cffi:defcfun (,c-name ,real-lisp-name ,@options) ,return-type ,@args) + (defmacro ,lisp-name (,@mod-args &optional (name "")) + `(,',real-lisp-name ,,@mod-args ,name)))) + `( cffi:defcfun (,c-name ,lisp-name ,@options) ,return-type ,@args))) +%} %include "llvm-c/Core.h" @@ -241,19 +256,19 @@ add multiple incoming values." (with-array-and-length (array len vals) (%LLVMBuildAggregateRet builder array len))) -(defun LLVMBuildInvoke (builder fn args then catch name) +(defun LLVMBuildInvoke (builder fn args then catch &optional (name "")) (with-array-and-length (array len args) (%LLVMBuildInvoke builder fn array len then catch name))) -(defun LLVMBuildGEP (builder ptr indices name) +(defun LLVMBuildGEP (builder ptr indices &optional (name "")) (with-array-and-length (array len indices) (%LLVMBuildGEP builder ptr array len name))) -(defun LLVMBuildInBoundsGEP (builder ptr indices name) +(defun LLVMBuildInBoundsGEP (builder ptr indices &optional (name "")) (with-array-and-length (array len indices) (%LLVMBuildInBoundsGEP builder ptr array len name))) -(defun LLVMBuildCall (builder fn args name) +(defun LLVMBuildCall (builder fn args &optional (name "")) "Combines the C API's Args array and NumArgs arguments into a single list ARGS." (with-array-and-length (array len args) diff --git a/src/generated/core.lisp b/src/generated/core.lisp index 17fb9a8..d078792 100644 --- a/src/generated/core.lisp +++ b/src/generated/core.lisp @@ -9,6 +9,21 @@ (cffi:defctype uint8_t :unsigned-char) +;; A little hack make the Name argument for LLVMBuild* be optional and +;; default to the empty string. +(defmacro wrap-defcfun ((c-name lisp-name &rest options) return-type &body args) + (if (and (eql (mismatch "LLVMBuild" c-name) 9) + (equal (last args) '((Name :string)))) + (let ((real-lisp-name (intern (concatenate 'string "%" (symbol-name lisp-name)) + (symbol-package lisp-name))) + (mod-args (map 'list #'car (butlast args)))) + `(progn + ( cffi:defcfun (,c-name ,real-lisp-name ,@options) ,return-type ,@args) + (defmacro ,lisp-name (,@mod-args &optional (name "")) + `(,',real-lisp-name ,,@mod-args ,name)))) + `( cffi:defcfun (,c-name ,lisp-name ,@options) ,return-type ,@args))) + + (cffi:defctype LLVMBool :int) (cffi:defctype LLVMContextRef :pointer) @@ -187,1063 +202,1063 @@ :LLVMRealUNE :LLVMRealPredicateTrue) -(cffi:defcfun ("LLVMDisposeMessage" LLVMDisposeMessage) :void +(wrap-defcfun ("LLVMDisposeMessage" LLVMDisposeMessage) :void (Message :string)) -(cffi:defcfun ("LLVMContextCreate" LLVMContextCreate) LLVMContextRef) +(wrap-defcfun ("LLVMContextCreate" LLVMContextCreate) LLVMContextRef) -(cffi:defcfun ("LLVMGetGlobalContext" LLVMGetGlobalContext) LLVMContextRef) +(wrap-defcfun ("LLVMGetGlobalContext" LLVMGetGlobalContext) LLVMContextRef) -(cffi:defcfun ("LLVMContextDispose" LLVMContextDispose) :void +(wrap-defcfun ("LLVMContextDispose" LLVMContextDispose) :void (C LLVMContextRef)) -(cffi:defcfun ("LLVMModuleCreateWithNameInContext" %LLVMModuleCreateWithNameInContext) LLVMModuleRef +(wrap-defcfun ("LLVMModuleCreateWithNameInContext" %LLVMModuleCreateWithNameInContext) LLVMModuleRef (ModuleID :string) (C LLVMContextRef)) -(cffi:defcfun ("LLVMDisposeModule" LLVMDisposeModule) :void +(wrap-defcfun ("LLVMDisposeModule" LLVMDisposeModule) :void (M LLVMModuleRef)) -(cffi:defcfun ("LLVMGetDataLayout" LLVMGetDataLayout) :string +(wrap-defcfun ("LLVMGetDataLayout" LLVMGetDataLayout) :string (M LLVMModuleRef)) -(cffi:defcfun ("LLVMSetDataLayout" LLVMSetDataLayout) :void +(wrap-defcfun ("LLVMSetDataLayout" LLVMSetDataLayout) :void (M LLVMModuleRef) (Triple :string)) -(cffi:defcfun ("LLVMGetTarget" LLVMGetTarget) :string +(wrap-defcfun ("LLVMGetTarget" LLVMGetTarget) :string (M LLVMModuleRef)) -(cffi:defcfun ("LLVMSetTarget" LLVMSetTarget) :void +(wrap-defcfun ("LLVMSetTarget" LLVMSetTarget) :void (M LLVMModuleRef) (Triple :string)) -(cffi:defcfun ("LLVMAddTypeName" LLVMAddTypeName) :boolean +(wrap-defcfun ("LLVMAddTypeName" LLVMAddTypeName) :boolean (M LLVMModuleRef) (Name :string) (Ty LLVMTypeRef)) -(cffi:defcfun ("LLVMDeleteTypeName" LLVMDeleteTypeName) :void +(wrap-defcfun ("LLVMDeleteTypeName" LLVMDeleteTypeName) :void (M LLVMModuleRef) (Name :string)) -(cffi:defcfun ("LLVMGetTypeByName" LLVMGetTypeByName) LLVMTypeRef +(wrap-defcfun ("LLVMGetTypeByName" LLVMGetTypeByName) LLVMTypeRef (M LLVMModuleRef) (Name :string)) -(cffi:defcfun ("LLVMDumpModule" LLVMDumpModule) :void +(wrap-defcfun ("LLVMDumpModule" LLVMDumpModule) :void (M LLVMModuleRef)) -(cffi:defcfun ("LLVMGetTypeKind" LLVMGetTypeKind) LLVMTypeKind +(wrap-defcfun ("LLVMGetTypeKind" LLVMGetTypeKind) LLVMTypeKind (Ty LLVMTypeRef)) -(cffi:defcfun ("LLVMGetTypeContext" LLVMGetTypeContext) LLVMContextRef +(wrap-defcfun ("LLVMGetTypeContext" LLVMGetTypeContext) LLVMContextRef (Ty LLVMTypeRef)) -(cffi:defcfun ("LLVMInt1TypeInContext" %LLVMInt1TypeInContext) LLVMTypeRef +(wrap-defcfun ("LLVMInt1TypeInContext" %LLVMInt1TypeInContext) LLVMTypeRef (C LLVMContextRef)) -(cffi:defcfun ("LLVMInt8TypeInContext" %LLVMInt8TypeInContext) LLVMTypeRef +(wrap-defcfun ("LLVMInt8TypeInContext" %LLVMInt8TypeInContext) LLVMTypeRef (C LLVMContextRef)) -(cffi:defcfun ("LLVMInt16TypeInContext" %LLVMInt16TypeInContext) LLVMTypeRef +(wrap-defcfun ("LLVMInt16TypeInContext" %LLVMInt16TypeInContext) LLVMTypeRef (C LLVMContextRef)) -(cffi:defcfun ("LLVMInt32TypeInContext" %LLVMInt32TypeInContext) LLVMTypeRef +(wrap-defcfun ("LLVMInt32TypeInContext" %LLVMInt32TypeInContext) LLVMTypeRef (C LLVMContextRef)) -(cffi:defcfun ("LLVMInt64TypeInContext" %LLVMInt64TypeInContext) LLVMTypeRef +(wrap-defcfun ("LLVMInt64TypeInContext" %LLVMInt64TypeInContext) LLVMTypeRef (C LLVMContextRef)) -(cffi:defcfun ("LLVMIntTypeInContext" %LLVMIntTypeInContext) LLVMTypeRef +(wrap-defcfun ("LLVMIntTypeInContext" %LLVMIntTypeInContext) LLVMTypeRef (C LLVMContextRef) (NumBits :unsigned-int)) -(cffi:defcfun ("LLVMGetIntTypeWidth" LLVMGetIntTypeWidth) :unsigned-int +(wrap-defcfun ("LLVMGetIntTypeWidth" LLVMGetIntTypeWidth) :unsigned-int (IntegerTy LLVMTypeRef)) -(cffi:defcfun ("LLVMFloatTypeInContext" %LLVMFloatTypeInContext) LLVMTypeRef +(wrap-defcfun ("LLVMFloatTypeInContext" %LLVMFloatTypeInContext) LLVMTypeRef (C LLVMContextRef)) -(cffi:defcfun ("LLVMDoubleTypeInContext" %LLVMDoubleTypeInContext) LLVMTypeRef +(wrap-defcfun ("LLVMDoubleTypeInContext" %LLVMDoubleTypeInContext) LLVMTypeRef (C LLVMContextRef)) -(cffi:defcfun ("LLVMX86FP80TypeInContext" %LLVMX86FP80TypeInContext) LLVMTypeRef +(wrap-defcfun ("LLVMX86FP80TypeInContext" %LLVMX86FP80TypeInContext) LLVMTypeRef (C LLVMContextRef)) -(cffi:defcfun ("LLVMFP128TypeInContext" %LLVMFP128TypeInContext) LLVMTypeRef +(wrap-defcfun ("LLVMFP128TypeInContext" %LLVMFP128TypeInContext) LLVMTypeRef (C LLVMContextRef)) -(cffi:defcfun ("LLVMPPCFP128TypeInContext" %LLVMPPCFP128TypeInContext) LLVMTypeRef +(wrap-defcfun ("LLVMPPCFP128TypeInContext" %LLVMPPCFP128TypeInContext) LLVMTypeRef (C LLVMContextRef)) -(cffi:defcfun ("LLVMFunctionType" %LLVMFunctionType) LLVMTypeRef +(wrap-defcfun ("LLVMFunctionType" %LLVMFunctionType) LLVMTypeRef (ReturnType LLVMTypeRef) (ParamTypes :pointer) (ParamCount :unsigned-int) (IsVarArg :boolean)) -(cffi:defcfun ("LLVMIsFunctionVarArg" LLVMIsFunctionVarArg) :boolean +(wrap-defcfun ("LLVMIsFunctionVarArg" LLVMIsFunctionVarArg) :boolean (FunctionTy LLVMTypeRef)) -(cffi:defcfun ("LLVMGetReturnType" LLVMGetReturnType) LLVMTypeRef +(wrap-defcfun ("LLVMGetReturnType" LLVMGetReturnType) LLVMTypeRef (FunctionTy LLVMTypeRef)) -(cffi:defcfun ("LLVMCountParamTypes" LLVMCountParamTypes) :unsigned-int +(wrap-defcfun ("LLVMCountParamTypes" LLVMCountParamTypes) :unsigned-int (FunctionTy LLVMTypeRef)) -(cffi:defcfun ("LLVMGetParamTypes" %LLVMGetParamTypes) :void +(wrap-defcfun ("LLVMGetParamTypes" %LLVMGetParamTypes) :void (FunctionTy LLVMTypeRef) (Dest :pointer)) -(cffi:defcfun ("LLVMStructTypeInContext" %LLVMStructTypeInContext) LLVMTypeRef +(wrap-defcfun ("LLVMStructTypeInContext" %LLVMStructTypeInContext) LLVMTypeRef (C LLVMContextRef) (ElementTypes :pointer) (ElementCount :unsigned-int) (Packed :boolean)) -(cffi:defcfun ("LLVMCountStructElementTypes" LLVMCountStructElementTypes) :unsigned-int +(wrap-defcfun ("LLVMCountStructElementTypes" LLVMCountStructElementTypes) :unsigned-int (StructTy LLVMTypeRef)) -(cffi:defcfun ("LLVMGetStructElementTypes" %LLVMGetStructElementTypes) :void +(wrap-defcfun ("LLVMGetStructElementTypes" %LLVMGetStructElementTypes) :void (StructTy LLVMTypeRef) (Dest :pointer)) -(cffi:defcfun ("LLVMIsPackedStruct" LLVMIsPackedStruct) :boolean +(wrap-defcfun ("LLVMIsPackedStruct" LLVMIsPackedStruct) :boolean (StructTy LLVMTypeRef)) -(cffi:defcfun ("LLVMArrayType" LLVMArrayType) LLVMTypeRef +(wrap-defcfun ("LLVMArrayType" LLVMArrayType) LLVMTypeRef (ElementType LLVMTypeRef) (ElementCount :unsigned-int)) -(cffi:defcfun ("LLVMPointerType" LLVMPointerType) LLVMTypeRef +(wrap-defcfun ("LLVMPointerType" LLVMPointerType) LLVMTypeRef (ElementType LLVMTypeRef) (AddressSpace :unsigned-int)) -(cffi:defcfun ("LLVMVectorType" LLVMVectorType) LLVMTypeRef +(wrap-defcfun ("LLVMVectorType" LLVMVectorType) LLVMTypeRef (ElementType LLVMTypeRef) (ElementCount :unsigned-int)) -(cffi:defcfun ("LLVMGetElementType" LLVMGetElementType) LLVMTypeRef +(wrap-defcfun ("LLVMGetElementType" LLVMGetElementType) LLVMTypeRef (Ty LLVMTypeRef)) -(cffi:defcfun ("LLVMGetArrayLength" LLVMGetArrayLength) :unsigned-int +(wrap-defcfun ("LLVMGetArrayLength" LLVMGetArrayLength) :unsigned-int (ArrayTy LLVMTypeRef)) -(cffi:defcfun ("LLVMGetPointerAddressSpace" LLVMGetPointerAddressSpace) :unsigned-int +(wrap-defcfun ("LLVMGetPointerAddressSpace" LLVMGetPointerAddressSpace) :unsigned-int (PointerTy LLVMTypeRef)) -(cffi:defcfun ("LLVMGetVectorSize" LLVMGetVectorSize) :unsigned-int +(wrap-defcfun ("LLVMGetVectorSize" LLVMGetVectorSize) :unsigned-int (VectorTy LLVMTypeRef)) -(cffi:defcfun ("LLVMVoidTypeInContext" %LLVMVoidTypeInContext) LLVMTypeRef +(wrap-defcfun ("LLVMVoidTypeInContext" %LLVMVoidTypeInContext) LLVMTypeRef (C LLVMContextRef)) -(cffi:defcfun ("LLVMLabelTypeInContext" %LLVMLabelTypeInContext) LLVMTypeRef +(wrap-defcfun ("LLVMLabelTypeInContext" %LLVMLabelTypeInContext) LLVMTypeRef (C LLVMContextRef)) -(cffi:defcfun ("LLVMOpaqueTypeInContext" %LLVMOpaqueTypeInContext) LLVMTypeRef +(wrap-defcfun ("LLVMOpaqueTypeInContext" %LLVMOpaqueTypeInContext) LLVMTypeRef (C LLVMContextRef)) -(cffi:defcfun ("LLVMCreateTypeHandle" LLVMCreateTypeHandle) LLVMTypeHandleRef +(wrap-defcfun ("LLVMCreateTypeHandle" LLVMCreateTypeHandle) LLVMTypeHandleRef (PotentiallyAbstractTy LLVMTypeRef)) -(cffi:defcfun ("LLVMRefineType" LLVMRefineType) :void +(wrap-defcfun ("LLVMRefineType" LLVMRefineType) :void (AbstractTy LLVMTypeRef) (ConcreteTy LLVMTypeRef)) -(cffi:defcfun ("LLVMResolveTypeHandle" LLVMResolveTypeHandle) LLVMTypeRef +(wrap-defcfun ("LLVMResolveTypeHandle" LLVMResolveTypeHandle) LLVMTypeRef (TypeHandle LLVMTypeHandleRef)) -(cffi:defcfun ("LLVMDisposeTypeHandle" LLVMDisposeTypeHandle) :void +(wrap-defcfun ("LLVMDisposeTypeHandle" LLVMDisposeTypeHandle) :void (TypeHandle LLVMTypeHandleRef)) -(cffi:defcfun ("LLVMTypeOf" LLVMTypeOf) LLVMTypeRef +(wrap-defcfun ("LLVMTypeOf" LLVMTypeOf) LLVMTypeRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMGetValueName" LLVMGetValueName) :string +(wrap-defcfun ("LLVMGetValueName" LLVMGetValueName) :string (Val LLVMValueRef)) -(cffi:defcfun ("LLVMSetValueName" LLVMSetValueName) :void +(wrap-defcfun ("LLVMSetValueName" LLVMSetValueName) :void (Val LLVMValueRef) (Name :string)) -(cffi:defcfun ("LLVMDumpValue" LLVMDumpValue) :void +(wrap-defcfun ("LLVMDumpValue" LLVMDumpValue) :void (Val LLVMValueRef)) -(cffi:defcfun ("LLVMReplaceAllUsesWith" LLVMReplaceAllUsesWith) :void +(wrap-defcfun ("LLVMReplaceAllUsesWith" LLVMReplaceAllUsesWith) :void (OldVal LLVMValueRef) (NewVal LLVMValueRef)) -(cffi:defcfun ("LLVMIsAArgument" LLVMIsAArgument) LLVMValueRef +(wrap-defcfun ("LLVMIsAArgument" LLVMIsAArgument) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsABasicBlock" LLVMIsABasicBlock) LLVMValueRef +(wrap-defcfun ("LLVMIsABasicBlock" LLVMIsABasicBlock) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsAInlineAsm" LLVMIsAInlineAsm) LLVMValueRef +(wrap-defcfun ("LLVMIsAInlineAsm" LLVMIsAInlineAsm) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsAUser" LLVMIsAUser) LLVMValueRef +(wrap-defcfun ("LLVMIsAUser" LLVMIsAUser) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsAConstant" LLVMIsAConstant) LLVMValueRef +(wrap-defcfun ("LLVMIsAConstant" LLVMIsAConstant) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsAConstantAggregateZero" LLVMIsAConstantAggregateZero) LLVMValueRef +(wrap-defcfun ("LLVMIsAConstantAggregateZero" LLVMIsAConstantAggregateZero) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsAConstantArray" LLVMIsAConstantArray) LLVMValueRef +(wrap-defcfun ("LLVMIsAConstantArray" LLVMIsAConstantArray) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsAConstantExpr" LLVMIsAConstantExpr) LLVMValueRef +(wrap-defcfun ("LLVMIsAConstantExpr" LLVMIsAConstantExpr) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsAConstantFP" LLVMIsAConstantFP) LLVMValueRef +(wrap-defcfun ("LLVMIsAConstantFP" LLVMIsAConstantFP) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsAConstantInt" LLVMIsAConstantInt) LLVMValueRef +(wrap-defcfun ("LLVMIsAConstantInt" LLVMIsAConstantInt) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsAConstantPointerNull" LLVMIsAConstantPointerNull) LLVMValueRef +(wrap-defcfun ("LLVMIsAConstantPointerNull" LLVMIsAConstantPointerNull) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsAConstantStruct" LLVMIsAConstantStruct) LLVMValueRef +(wrap-defcfun ("LLVMIsAConstantStruct" LLVMIsAConstantStruct) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsAConstantVector" LLVMIsAConstantVector) LLVMValueRef +(wrap-defcfun ("LLVMIsAConstantVector" LLVMIsAConstantVector) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsAGlobalValue" LLVMIsAGlobalValue) LLVMValueRef +(wrap-defcfun ("LLVMIsAGlobalValue" LLVMIsAGlobalValue) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsAFunction" LLVMIsAFunction) LLVMValueRef +(wrap-defcfun ("LLVMIsAFunction" LLVMIsAFunction) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsAGlobalAlias" LLVMIsAGlobalAlias) LLVMValueRef +(wrap-defcfun ("LLVMIsAGlobalAlias" LLVMIsAGlobalAlias) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsAGlobalVariable" LLVMIsAGlobalVariable) LLVMValueRef +(wrap-defcfun ("LLVMIsAGlobalVariable" LLVMIsAGlobalVariable) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsAUndefValue" LLVMIsAUndefValue) LLVMValueRef +(wrap-defcfun ("LLVMIsAUndefValue" LLVMIsAUndefValue) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsAInstruction" LLVMIsAInstruction) LLVMValueRef +(wrap-defcfun ("LLVMIsAInstruction" LLVMIsAInstruction) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsABinaryOperator" LLVMIsABinaryOperator) LLVMValueRef +(wrap-defcfun ("LLVMIsABinaryOperator" LLVMIsABinaryOperator) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsACallInst" LLVMIsACallInst) LLVMValueRef +(wrap-defcfun ("LLVMIsACallInst" LLVMIsACallInst) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsAIntrinsicInst" LLVMIsAIntrinsicInst) LLVMValueRef +(wrap-defcfun ("LLVMIsAIntrinsicInst" LLVMIsAIntrinsicInst) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsADbgInfoIntrinsic" LLVMIsADbgInfoIntrinsic) LLVMValueRef +(wrap-defcfun ("LLVMIsADbgInfoIntrinsic" LLVMIsADbgInfoIntrinsic) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsADbgDeclareInst" LLVMIsADbgDeclareInst) LLVMValueRef +(wrap-defcfun ("LLVMIsADbgDeclareInst" LLVMIsADbgDeclareInst) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsADbgFuncStartInst" LLVMIsADbgFuncStartInst) LLVMValueRef +(wrap-defcfun ("LLVMIsADbgFuncStartInst" LLVMIsADbgFuncStartInst) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsADbgRegionEndInst" LLVMIsADbgRegionEndInst) LLVMValueRef +(wrap-defcfun ("LLVMIsADbgRegionEndInst" LLVMIsADbgRegionEndInst) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsADbgRegionStartInst" LLVMIsADbgRegionStartInst) LLVMValueRef +(wrap-defcfun ("LLVMIsADbgRegionStartInst" LLVMIsADbgRegionStartInst) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsADbgStopPointInst" LLVMIsADbgStopPointInst) LLVMValueRef +(wrap-defcfun ("LLVMIsADbgStopPointInst" LLVMIsADbgStopPointInst) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsAEHSelectorInst" LLVMIsAEHSelectorInst) LLVMValueRef +(wrap-defcfun ("LLVMIsAEHSelectorInst" LLVMIsAEHSelectorInst) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsAMemIntrinsic" LLVMIsAMemIntrinsic) LLVMValueRef +(wrap-defcfun ("LLVMIsAMemIntrinsic" LLVMIsAMemIntrinsic) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsAMemCpyInst" LLVMIsAMemCpyInst) LLVMValueRef +(wrap-defcfun ("LLVMIsAMemCpyInst" LLVMIsAMemCpyInst) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsAMemMoveInst" LLVMIsAMemMoveInst) LLVMValueRef +(wrap-defcfun ("LLVMIsAMemMoveInst" LLVMIsAMemMoveInst) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsAMemSetInst" LLVMIsAMemSetInst) LLVMValueRef +(wrap-defcfun ("LLVMIsAMemSetInst" LLVMIsAMemSetInst) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsACmpInst" LLVMIsACmpInst) LLVMValueRef +(wrap-defcfun ("LLVMIsACmpInst" LLVMIsACmpInst) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsAFCmpInst" LLVMIsAFCmpInst) LLVMValueRef +(wrap-defcfun ("LLVMIsAFCmpInst" LLVMIsAFCmpInst) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsAICmpInst" LLVMIsAICmpInst) LLVMValueRef +(wrap-defcfun ("LLVMIsAICmpInst" LLVMIsAICmpInst) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsAExtractElementInst" LLVMIsAExtractElementInst) LLVMValueRef +(wrap-defcfun ("LLVMIsAExtractElementInst" LLVMIsAExtractElementInst) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsAGetElementPtrInst" LLVMIsAGetElementPtrInst) LLVMValueRef +(wrap-defcfun ("LLVMIsAGetElementPtrInst" LLVMIsAGetElementPtrInst) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsAInsertElementInst" LLVMIsAInsertElementInst) LLVMValueRef +(wrap-defcfun ("LLVMIsAInsertElementInst" LLVMIsAInsertElementInst) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsAInsertValueInst" LLVMIsAInsertValueInst) LLVMValueRef +(wrap-defcfun ("LLVMIsAInsertValueInst" LLVMIsAInsertValueInst) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsAPHINode" LLVMIsAPHINode) LLVMValueRef +(wrap-defcfun ("LLVMIsAPHINode" LLVMIsAPHINode) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsASelectInst" LLVMIsASelectInst) LLVMValueRef +(wrap-defcfun ("LLVMIsASelectInst" LLVMIsASelectInst) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsAShuffleVectorInst" LLVMIsAShuffleVectorInst) LLVMValueRef +(wrap-defcfun ("LLVMIsAShuffleVectorInst" LLVMIsAShuffleVectorInst) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsAStoreInst" LLVMIsAStoreInst) LLVMValueRef +(wrap-defcfun ("LLVMIsAStoreInst" LLVMIsAStoreInst) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsATerminatorInst" LLVMIsATerminatorInst) LLVMValueRef +(wrap-defcfun ("LLVMIsATerminatorInst" LLVMIsATerminatorInst) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsABranchInst" LLVMIsABranchInst) LLVMValueRef +(wrap-defcfun ("LLVMIsABranchInst" LLVMIsABranchInst) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsAInvokeInst" LLVMIsAInvokeInst) LLVMValueRef +(wrap-defcfun ("LLVMIsAInvokeInst" LLVMIsAInvokeInst) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsAReturnInst" LLVMIsAReturnInst) LLVMValueRef +(wrap-defcfun ("LLVMIsAReturnInst" LLVMIsAReturnInst) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsASwitchInst" LLVMIsASwitchInst) LLVMValueRef +(wrap-defcfun ("LLVMIsASwitchInst" LLVMIsASwitchInst) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsAUnreachableInst" LLVMIsAUnreachableInst) LLVMValueRef +(wrap-defcfun ("LLVMIsAUnreachableInst" LLVMIsAUnreachableInst) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsAUnwindInst" LLVMIsAUnwindInst) LLVMValueRef +(wrap-defcfun ("LLVMIsAUnwindInst" LLVMIsAUnwindInst) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsAUnaryInstruction" LLVMIsAUnaryInstruction) LLVMValueRef +(wrap-defcfun ("LLVMIsAUnaryInstruction" LLVMIsAUnaryInstruction) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsAAllocaInst" LLVMIsAAllocaInst) LLVMValueRef +(wrap-defcfun ("LLVMIsAAllocaInst" LLVMIsAAllocaInst) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsACastInst" LLVMIsACastInst) LLVMValueRef +(wrap-defcfun ("LLVMIsACastInst" LLVMIsACastInst) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsABitCastInst" LLVMIsABitCastInst) LLVMValueRef +(wrap-defcfun ("LLVMIsABitCastInst" LLVMIsABitCastInst) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsAFPExtInst" LLVMIsAFPExtInst) LLVMValueRef +(wrap-defcfun ("LLVMIsAFPExtInst" LLVMIsAFPExtInst) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsAFPToSIInst" LLVMIsAFPToSIInst) LLVMValueRef +(wrap-defcfun ("LLVMIsAFPToSIInst" LLVMIsAFPToSIInst) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsAFPToUIInst" LLVMIsAFPToUIInst) LLVMValueRef +(wrap-defcfun ("LLVMIsAFPToUIInst" LLVMIsAFPToUIInst) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsAFPTruncInst" LLVMIsAFPTruncInst) LLVMValueRef +(wrap-defcfun ("LLVMIsAFPTruncInst" LLVMIsAFPTruncInst) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsAIntToPtrInst" LLVMIsAIntToPtrInst) LLVMValueRef +(wrap-defcfun ("LLVMIsAIntToPtrInst" LLVMIsAIntToPtrInst) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsAPtrToIntInst" LLVMIsAPtrToIntInst) LLVMValueRef +(wrap-defcfun ("LLVMIsAPtrToIntInst" LLVMIsAPtrToIntInst) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsASExtInst" LLVMIsASExtInst) LLVMValueRef +(wrap-defcfun ("LLVMIsASExtInst" LLVMIsASExtInst) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsASIToFPInst" LLVMIsASIToFPInst) LLVMValueRef +(wrap-defcfun ("LLVMIsASIToFPInst" LLVMIsASIToFPInst) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsATruncInst" LLVMIsATruncInst) LLVMValueRef +(wrap-defcfun ("LLVMIsATruncInst" LLVMIsATruncInst) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsAUIToFPInst" LLVMIsAUIToFPInst) LLVMValueRef +(wrap-defcfun ("LLVMIsAUIToFPInst" LLVMIsAUIToFPInst) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsAZExtInst" LLVMIsAZExtInst) LLVMValueRef +(wrap-defcfun ("LLVMIsAZExtInst" LLVMIsAZExtInst) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsAExtractValueInst" LLVMIsAExtractValueInst) LLVMValueRef +(wrap-defcfun ("LLVMIsAExtractValueInst" LLVMIsAExtractValueInst) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsALoadInst" LLVMIsALoadInst) LLVMValueRef +(wrap-defcfun ("LLVMIsALoadInst" LLVMIsALoadInst) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsAVAArgInst" LLVMIsAVAArgInst) LLVMValueRef +(wrap-defcfun ("LLVMIsAVAArgInst" LLVMIsAVAArgInst) LLVMValueRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMGetFirstUse" LLVMGetFirstUse) LLVMUseIteratorRef +(wrap-defcfun ("LLVMGetFirstUse" LLVMGetFirstUse) LLVMUseIteratorRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMGetNextUse" LLVMGetNextUse) LLVMUseIteratorRef +(wrap-defcfun ("LLVMGetNextUse" LLVMGetNextUse) LLVMUseIteratorRef (U LLVMUseIteratorRef)) -(cffi:defcfun ("LLVMGetUser" LLVMGetUser) LLVMValueRef +(wrap-defcfun ("LLVMGetUser" LLVMGetUser) LLVMValueRef (U LLVMUseIteratorRef)) -(cffi:defcfun ("LLVMGetUsedValue" LLVMGetUsedValue) LLVMValueRef +(wrap-defcfun ("LLVMGetUsedValue" LLVMGetUsedValue) LLVMValueRef (U LLVMUseIteratorRef)) -(cffi:defcfun ("LLVMGetOperand" LLVMGetOperand) LLVMValueRef +(wrap-defcfun ("LLVMGetOperand" LLVMGetOperand) LLVMValueRef (Val LLVMValueRef) (Index :unsigned-int)) -(cffi:defcfun ("LLVMConstNull" LLVMConstNull) LLVMValueRef +(wrap-defcfun ("LLVMConstNull" LLVMConstNull) LLVMValueRef (Ty LLVMTypeRef)) -(cffi:defcfun ("LLVMConstAllOnes" LLVMConstAllOnes) LLVMValueRef +(wrap-defcfun ("LLVMConstAllOnes" LLVMConstAllOnes) LLVMValueRef (Ty LLVMTypeRef)) -(cffi:defcfun ("LLVMGetUndef" LLVMGetUndef) LLVMValueRef +(wrap-defcfun ("LLVMGetUndef" LLVMGetUndef) LLVMValueRef (Ty LLVMTypeRef)) -(cffi:defcfun ("LLVMIsConstant" LLVMIsConstant) :boolean +(wrap-defcfun ("LLVMIsConstant" LLVMIsConstant) :boolean (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsNull" LLVMIsNull) :boolean +(wrap-defcfun ("LLVMIsNull" LLVMIsNull) :boolean (Val LLVMValueRef)) -(cffi:defcfun ("LLVMIsUndef" LLVMIsUndef) :boolean +(wrap-defcfun ("LLVMIsUndef" LLVMIsUndef) :boolean (Val LLVMValueRef)) -(cffi:defcfun ("LLVMConstPointerNull" LLVMConstPointerNull) LLVMValueRef +(wrap-defcfun ("LLVMConstPointerNull" LLVMConstPointerNull) LLVMValueRef (Ty LLVMTypeRef)) -(cffi:defcfun ("LLVMConstInt" LLVMConstInt) LLVMValueRef +(wrap-defcfun ("LLVMConstInt" LLVMConstInt) LLVMValueRef (IntTy LLVMTypeRef) (N :unsigned-long-long) (SignExtend :boolean)) -(cffi:defcfun ("LLVMConstIntOfString" LLVMConstIntOfString) LLVMValueRef +(wrap-defcfun ("LLVMConstIntOfString" LLVMConstIntOfString) LLVMValueRef (IntTy LLVMTypeRef) (Text :string) (Radix :unsigned-char)) -(cffi:defcfun ("LLVMConstIntOfStringAndSize" LLVMConstIntOfStringAndSize) LLVMValueRef +(wrap-defcfun ("LLVMConstIntOfStringAndSize" LLVMConstIntOfStringAndSize) LLVMValueRef (IntTy LLVMTypeRef) (Text :string) (SLen :unsigned-int) (Radix :unsigned-char)) -(cffi:defcfun ("LLVMConstReal" LLVMConstReal) LLVMValueRef +(wrap-defcfun ("LLVMConstReal" LLVMConstReal) LLVMValueRef (RealTy LLVMTypeRef) (N :double)) -(cffi:defcfun ("LLVMConstRealOfString" LLVMConstRealOfString) LLVMValueRef +(wrap-defcfun ("LLVMConstRealOfString" LLVMConstRealOfString) LLVMValueRef (RealTy LLVMTypeRef) (Text :string)) -(cffi:defcfun ("LLVMConstRealOfStringAndSize" LLVMConstRealOfStringAndSize) LLVMValueRef +(wrap-defcfun ("LLVMConstRealOfStringAndSize" LLVMConstRealOfStringAndSize) LLVMValueRef (RealTy LLVMTypeRef) (Text :string) (SLen :unsigned-int)) -(cffi:defcfun ("LLVMConstIntGetZExtValue" LLVMConstIntGetZExtValue) :unsigned-long-long +(wrap-defcfun ("LLVMConstIntGetZExtValue" LLVMConstIntGetZExtValue) :unsigned-long-long (ConstantVal LLVMValueRef)) -(cffi:defcfun ("LLVMConstIntGetSExtValue" LLVMConstIntGetSExtValue) :long-long +(wrap-defcfun ("LLVMConstIntGetSExtValue" LLVMConstIntGetSExtValue) :long-long (ConstantVal LLVMValueRef)) -(cffi:defcfun ("LLVMConstStringInContext" %LLVMConstStringInContext) LLVMValueRef +(wrap-defcfun ("LLVMConstStringInContext" %LLVMConstStringInContext) LLVMValueRef (C LLVMContextRef) (Str :string) (Length :unsigned-int) (DontNullTerminate :boolean)) -(cffi:defcfun ("LLVMConstStructInContext" %LLVMConstStructInContext) LLVMValueRef +(wrap-defcfun ("LLVMConstStructInContext" %LLVMConstStructInContext) LLVMValueRef (C LLVMContextRef) (ConstantVals :pointer) (Count :unsigned-int) (Packed :boolean)) -(cffi:defcfun ("LLVMConstArray" %LLVMConstArray) LLVMValueRef +(wrap-defcfun ("LLVMConstArray" %LLVMConstArray) LLVMValueRef (ElementTy LLVMTypeRef) (ConstantVals :pointer) (Length :unsigned-int)) -(cffi:defcfun ("LLVMConstVector" %LLVMConstVector) LLVMValueRef +(wrap-defcfun ("LLVMConstVector" %LLVMConstVector) LLVMValueRef (ScalarConstantVals :pointer) (Size :unsigned-int)) -(cffi:defcfun ("LLVMGetConstOpcode" LLVMGetConstOpcode) LLVMOpcode +(wrap-defcfun ("LLVMGetConstOpcode" LLVMGetConstOpcode) LLVMOpcode (ConstantVal LLVMValueRef)) -(cffi:defcfun ("LLVMAlignOf" LLVMAlignOf) LLVMValueRef +(wrap-defcfun ("LLVMAlignOf" LLVMAlignOf) LLVMValueRef (Ty LLVMTypeRef)) -(cffi:defcfun ("LLVMSizeOf" LLVMSizeOf) LLVMValueRef +(wrap-defcfun ("LLVMSizeOf" LLVMSizeOf) LLVMValueRef (Ty LLVMTypeRef)) -(cffi:defcfun ("LLVMConstNeg" LLVMConstNeg) LLVMValueRef +(wrap-defcfun ("LLVMConstNeg" LLVMConstNeg) LLVMValueRef (ConstantVal LLVMValueRef)) -(cffi:defcfun ("LLVMConstFNeg" LLVMConstFNeg) LLVMValueRef +(wrap-defcfun ("LLVMConstFNeg" LLVMConstFNeg) LLVMValueRef (ConstantVal LLVMValueRef)) -(cffi:defcfun ("LLVMConstNot" LLVMConstNot) LLVMValueRef +(wrap-defcfun ("LLVMConstNot" LLVMConstNot) LLVMValueRef (ConstantVal LLVMValueRef)) -(cffi:defcfun ("LLVMConstAdd" LLVMConstAdd) LLVMValueRef +(wrap-defcfun ("LLVMConstAdd" LLVMConstAdd) LLVMValueRef (LHSConstant LLVMValueRef) (RHSConstant LLVMValueRef)) -(cffi:defcfun ("LLVMConstNSWAdd" LLVMConstNSWAdd) LLVMValueRef +(wrap-defcfun ("LLVMConstNSWAdd" LLVMConstNSWAdd) LLVMValueRef (LHSConstant LLVMValueRef) (RHSConstant LLVMValueRef)) -(cffi:defcfun ("LLVMConstFAdd" LLVMConstFAdd) LLVMValueRef +(wrap-defcfun ("LLVMConstFAdd" LLVMConstFAdd) LLVMValueRef (LHSConstant LLVMValueRef) (RHSConstant LLVMValueRef)) -(cffi:defcfun ("LLVMConstSub" LLVMConstSub) LLVMValueRef +(wrap-defcfun ("LLVMConstSub" LLVMConstSub) LLVMValueRef (LHSConstant LLVMValueRef) (RHSConstant LLVMValueRef)) -(cffi:defcfun ("LLVMConstFSub" LLVMConstFSub) LLVMValueRef +(wrap-defcfun ("LLVMConstFSub" LLVMConstFSub) LLVMValueRef (LHSConstant LLVMValueRef) (RHSConstant LLVMValueRef)) -(cffi:defcfun ("LLVMConstMul" LLVMConstMul) LLVMValueRef +(wrap-defcfun ("LLVMConstMul" LLVMConstMul) LLVMValueRef (LHSConstant LLVMValueRef) (RHSConstant LLVMValueRef)) -(cffi:defcfun ("LLVMConstFMul" LLVMConstFMul) LLVMValueRef +(wrap-defcfun ("LLVMConstFMul" LLVMConstFMul) LLVMValueRef (LHSConstant LLVMValueRef) (RHSConstant LLVMValueRef)) -(cffi:defcfun ("LLVMConstUDiv" LLVMConstUDiv) LLVMValueRef +(wrap-defcfun ("LLVMConstUDiv" LLVMConstUDiv) LLVMValueRef (LHSConstant LLVMValueRef) (RHSConstant LLVMValueRef)) -(cffi:defcfun ("LLVMConstSDiv" LLVMConstSDiv) LLVMValueRef +(wrap-defcfun ("LLVMConstSDiv" LLVMConstSDiv) LLVMValueRef (LHSConstant LLVMValueRef) (RHSConstant LLVMValueRef)) -(cffi:defcfun ("LLVMConstExactSDiv" LLVMConstExactSDiv) LLVMValueRef +(wrap-defcfun ("LLVMConstExactSDiv" LLVMConstExactSDiv) LLVMValueRef (LHSConstant LLVMValueRef) (RHSConstant LLVMValueRef)) -(cffi:defcfun ("LLVMConstFDiv" LLVMConstFDiv) LLVMValueRef +(wrap-defcfun ("LLVMConstFDiv" LLVMConstFDiv) LLVMValueRef (LHSConstant LLVMValueRef) (RHSConstant LLVMValueRef)) -(cffi:defcfun ("LLVMConstURem" LLVMConstURem) LLVMValueRef +(wrap-defcfun ("LLVMConstURem" LLVMConstURem) LLVMValueRef (LHSConstant LLVMValueRef) (RHSConstant LLVMValueRef)) -(cffi:defcfun ("LLVMConstSRem" LLVMConstSRem) LLVMValueRef +(wrap-defcfun ("LLVMConstSRem" LLVMConstSRem) LLVMValueRef (LHSConstant LLVMValueRef) (RHSConstant LLVMValueRef)) -(cffi:defcfun ("LLVMConstFRem" LLVMConstFRem) LLVMValueRef +(wrap-defcfun ("LLVMConstFRem" LLVMConstFRem) LLVMValueRef (LHSConstant LLVMValueRef) (RHSConstant LLVMValueRef)) -(cffi:defcfun ("LLVMConstAnd" LLVMConstAnd) LLVMValueRef +(wrap-defcfun ("LLVMConstAnd" LLVMConstAnd) LLVMValueRef (LHSConstant LLVMValueRef) (RHSConstant LLVMValueRef)) -(cffi:defcfun ("LLVMConstOr" LLVMConstOr) LLVMValueRef +(wrap-defcfun ("LLVMConstOr" LLVMConstOr) LLVMValueRef (LHSConstant LLVMValueRef) (RHSConstant LLVMValueRef)) -(cffi:defcfun ("LLVMConstXor" LLVMConstXor) LLVMValueRef +(wrap-defcfun ("LLVMConstXor" LLVMConstXor) LLVMValueRef (LHSConstant LLVMValueRef) (RHSConstant LLVMValueRef)) -(cffi:defcfun ("LLVMConstICmp" LLVMConstICmp) LLVMValueRef +(wrap-defcfun ("LLVMConstICmp" LLVMConstICmp) LLVMValueRef (Predicate LLVMIntPredicate) (LHSConstant LLVMValueRef) (RHSConstant LLVMValueRef)) -(cffi:defcfun ("LLVMConstFCmp" LLVMConstFCmp) LLVMValueRef +(wrap-defcfun ("LLVMConstFCmp" LLVMConstFCmp) LLVMValueRef (Predicate LLVMRealPredicate) (LHSConstant LLVMValueRef) (RHSConstant LLVMValueRef)) -(cffi:defcfun ("LLVMConstShl" LLVMConstShl) LLVMValueRef +(wrap-defcfun ("LLVMConstShl" LLVMConstShl) LLVMValueRef (LHSConstant LLVMValueRef) (RHSConstant LLVMValueRef)) -(cffi:defcfun ("LLVMConstLShr" LLVMConstLShr) LLVMValueRef +(wrap-defcfun ("LLVMConstLShr" LLVMConstLShr) LLVMValueRef (LHSConstant LLVMValueRef) (RHSConstant LLVMValueRef)) -(cffi:defcfun ("LLVMConstAShr" LLVMConstAShr) LLVMValueRef +(wrap-defcfun ("LLVMConstAShr" LLVMConstAShr) LLVMValueRef (LHSConstant LLVMValueRef) (RHSConstant LLVMValueRef)) -(cffi:defcfun ("LLVMConstGEP" %LLVMConstGEP) LLVMValueRef +(wrap-defcfun ("LLVMConstGEP" %LLVMConstGEP) LLVMValueRef (ConstantVal LLVMValueRef) (ConstantIndices :pointer) (NumIndices :unsigned-int)) -(cffi:defcfun ("LLVMConstInBoundsGEP" %LLVMConstInBoundsGEP) LLVMValueRef +(wrap-defcfun ("LLVMConstInBoundsGEP" %LLVMConstInBoundsGEP) LLVMValueRef (ConstantVal LLVMValueRef) (ConstantIndices :pointer) (NumIndices :unsigned-int)) -(cffi:defcfun ("LLVMConstTrunc" LLVMConstTrunc) LLVMValueRef +(wrap-defcfun ("LLVMConstTrunc" LLVMConstTrunc) LLVMValueRef (ConstantVal LLVMValueRef) (ToType LLVMTypeRef)) -(cffi:defcfun ("LLVMConstSExt" LLVMConstSExt) LLVMValueRef +(wrap-defcfun ("LLVMConstSExt" LLVMConstSExt) LLVMValueRef (ConstantVal LLVMValueRef) (ToType LLVMTypeRef)) -(cffi:defcfun ("LLVMConstZExt" LLVMConstZExt) LLVMValueRef +(wrap-defcfun ("LLVMConstZExt" LLVMConstZExt) LLVMValueRef (ConstantVal LLVMValueRef) (ToType LLVMTypeRef)) -(cffi:defcfun ("LLVMConstFPTrunc" LLVMConstFPTrunc) LLVMValueRef +(wrap-defcfun ("LLVMConstFPTrunc" LLVMConstFPTrunc) LLVMValueRef (ConstantVal LLVMValueRef) (ToType LLVMTypeRef)) -(cffi:defcfun ("LLVMConstFPExt" LLVMConstFPExt) LLVMValueRef +(wrap-defcfun ("LLVMConstFPExt" LLVMConstFPExt) LLVMValueRef (ConstantVal LLVMValueRef) (ToType LLVMTypeRef)) -(cffi:defcfun ("LLVMConstUIToFP" LLVMConstUIToFP) LLVMValueRef +(wrap-defcfun ("LLVMConstUIToFP" LLVMConstUIToFP) LLVMValueRef (ConstantVal LLVMValueRef) (ToType LLVMTypeRef)) -(cffi:defcfun ("LLVMConstSIToFP" LLVMConstSIToFP) LLVMValueRef +(wrap-defcfun ("LLVMConstSIToFP" LLVMConstSIToFP) LLVMValueRef (ConstantVal LLVMValueRef) (ToType LLVMTypeRef)) -(cffi:defcfun ("LLVMConstFPToUI" LLVMConstFPToUI) LLVMValueRef +(wrap-defcfun ("LLVMConstFPToUI" LLVMConstFPToUI) LLVMValueRef (ConstantVal LLVMValueRef) (ToType LLVMTypeRef)) -(cffi:defcfun ("LLVMConstFPToSI" LLVMConstFPToSI) LLVMValueRef +(wrap-defcfun ("LLVMConstFPToSI" LLVMConstFPToSI) LLVMValueRef (ConstantVal LLVMValueRef) (ToType LLVMTypeRef)) -(cffi:defcfun ("LLVMConstPtrToInt" LLVMConstPtrToInt) LLVMValueRef +(wrap-defcfun ("LLVMConstPtrToInt" LLVMConstPtrToInt) LLVMValueRef (ConstantVal LLVMValueRef) (ToType LLVMTypeRef)) -(cffi:defcfun ("LLVMConstIntToPtr" LLVMConstIntToPtr) LLVMValueRef +(wrap-defcfun ("LLVMConstIntToPtr" LLVMConstIntToPtr) LLVMValueRef (ConstantVal LLVMValueRef) (ToType LLVMTypeRef)) -(cffi:defcfun ("LLVMConstBitCast" LLVMConstBitCast) LLVMValueRef +(wrap-defcfun ("LLVMConstBitCast" LLVMConstBitCast) LLVMValueRef (ConstantVal LLVMValueRef) (ToType LLVMTypeRef)) -(cffi:defcfun ("LLVMConstZExtOrBitCast" LLVMConstZExtOrBitCast) LLVMValueRef +(wrap-defcfun ("LLVMConstZExtOrBitCast" LLVMConstZExtOrBitCast) LLVMValueRef (ConstantVal LLVMValueRef) (ToType LLVMTypeRef)) -(cffi:defcfun ("LLVMConstSExtOrBitCast" LLVMConstSExtOrBitCast) LLVMValueRef +(wrap-defcfun ("LLVMConstSExtOrBitCast" LLVMConstSExtOrBitCast) LLVMValueRef (ConstantVal LLVMValueRef) (ToType LLVMTypeRef)) -(cffi:defcfun ("LLVMConstTruncOrBitCast" LLVMConstTruncOrBitCast) LLVMValueRef +(wrap-defcfun ("LLVMConstTruncOrBitCast" LLVMConstTruncOrBitCast) LLVMValueRef (ConstantVal LLVMValueRef) (ToType LLVMTypeRef)) -(cffi:defcfun ("LLVMConstPointerCast" LLVMConstPointerCast) LLVMValueRef +(wrap-defcfun ("LLVMConstPointerCast" LLVMConstPointerCast) LLVMValueRef (ConstantVal LLVMValueRef) (ToType LLVMTypeRef)) -(cffi:defcfun ("LLVMConstIntCast" LLVMConstIntCast) LLVMValueRef +(wrap-defcfun ("LLVMConstIntCast" LLVMConstIntCast) LLVMValueRef (ConstantVal LLVMValueRef) (ToType LLVMTypeRef) (isSigned :boolean)) -(cffi:defcfun ("LLVMConstFPCast" LLVMConstFPCast) LLVMValueRef +(wrap-defcfun ("LLVMConstFPCast" LLVMConstFPCast) LLVMValueRef (ConstantVal LLVMValueRef) (ToType LLVMTypeRef)) -(cffi:defcfun ("LLVMConstSelect" LLVMConstSelect) LLVMValueRef +(wrap-defcfun ("LLVMConstSelect" LLVMConstSelect) LLVMValueRef (ConstantCondition LLVMValueRef) (ConstantIfTrue LLVMValueRef) (ConstantIfFalse LLVMValueRef)) -(cffi:defcfun ("LLVMConstExtractElement" LLVMConstExtractElement) LLVMValueRef +(wrap-defcfun ("LLVMConstExtractElement" LLVMConstExtractElement) LLVMValueRef (VectorConstant LLVMValueRef) (IndexConstant LLVMValueRef)) -(cffi:defcfun ("LLVMConstInsertElement" LLVMConstInsertElement) LLVMValueRef +(wrap-defcfun ("LLVMConstInsertElement" LLVMConstInsertElement) LLVMValueRef (VectorConstant LLVMValueRef) (ElementValueConstant LLVMValueRef) (IndexConstant LLVMValueRef)) -(cffi:defcfun ("LLVMConstShuffleVector" LLVMConstShuffleVector) LLVMValueRef +(wrap-defcfun ("LLVMConstShuffleVector" LLVMConstShuffleVector) LLVMValueRef (VectorAConstant LLVMValueRef) (VectorBConstant LLVMValueRef) (MaskConstant LLVMValueRef)) -(cffi:defcfun ("LLVMConstExtractValue" %LLVMConstExtractValue) LLVMValueRef +(wrap-defcfun ("LLVMConstExtractValue" %LLVMConstExtractValue) LLVMValueRef (AggConstant LLVMValueRef) (IdxList :pointer) (NumIdx :unsigned-int)) -(cffi:defcfun ("LLVMConstInsertValue" %LLVMConstInsertValue) LLVMValueRef +(wrap-defcfun ("LLVMConstInsertValue" %LLVMConstInsertValue) LLVMValueRef (AggConstant LLVMValueRef) (ElementValueConstant LLVMValueRef) (IdxList :pointer) (NumIdx :unsigned-int)) -(cffi:defcfun ("LLVMConstInlineAsm" LLVMConstInlineAsm) LLVMValueRef +(wrap-defcfun ("LLVMConstInlineAsm" LLVMConstInlineAsm) LLVMValueRef (Ty LLVMTypeRef) (AsmString :string) (Constraints :string) (HasSideEffects :boolean) (IsAlignStack :boolean)) -(cffi:defcfun ("LLVMGetGlobalParent" LLVMGetGlobalParent) LLVMModuleRef +(wrap-defcfun ("LLVMGetGlobalParent" LLVMGetGlobalParent) LLVMModuleRef (Global LLVMValueRef)) -(cffi:defcfun ("LLVMIsDeclaration" LLVMIsDeclaration) :boolean +(wrap-defcfun ("LLVMIsDeclaration" LLVMIsDeclaration) :boolean (Global LLVMValueRef)) -(cffi:defcfun ("LLVMGetLinkage" LLVMGetLinkage) LLVMLinkage +(wrap-defcfun ("LLVMGetLinkage" LLVMGetLinkage) LLVMLinkage (Global LLVMValueRef)) -(cffi:defcfun ("LLVMSetLinkage" LLVMSetLinkage) :void +(wrap-defcfun ("LLVMSetLinkage" LLVMSetLinkage) :void (Global LLVMValueRef) (Linkage LLVMLinkage)) -(cffi:defcfun ("LLVMGetSection" LLVMGetSection) :string +(wrap-defcfun ("LLVMGetSection" LLVMGetSection) :string (Global LLVMValueRef)) -(cffi:defcfun ("LLVMSetSection" LLVMSetSection) :void +(wrap-defcfun ("LLVMSetSection" LLVMSetSection) :void (Global LLVMValueRef) (Section :string)) -(cffi:defcfun ("LLVMGetVisibility" LLVMGetVisibility) LLVMVisibility +(wrap-defcfun ("LLVMGetVisibility" LLVMGetVisibility) LLVMVisibility (Global LLVMValueRef)) -(cffi:defcfun ("LLVMSetVisibility" LLVMSetVisibility) :void +(wrap-defcfun ("LLVMSetVisibility" LLVMSetVisibility) :void (Global LLVMValueRef) (Viz LLVMVisibility)) -(cffi:defcfun ("LLVMGetAlignment" LLVMGetAlignment) :unsigned-int +(wrap-defcfun ("LLVMGetAlignment" LLVMGetAlignment) :unsigned-int (Global LLVMValueRef)) -(cffi:defcfun ("LLVMSetAlignment" LLVMSetAlignment) :void +(wrap-defcfun ("LLVMSetAlignment" LLVMSetAlignment) :void (Global LLVMValueRef) (Bytes :unsigned-int)) -(cffi:defcfun ("LLVMAddGlobal" LLVMAddGlobal) LLVMValueRef +(wrap-defcfun ("LLVMAddGlobal" LLVMAddGlobal) LLVMValueRef (M LLVMModuleRef) (Ty LLVMTypeRef) (Name :string)) -(cffi:defcfun ("LLVMGetNamedGlobal" LLVMGetNamedGlobal) LLVMValueRef +(wrap-defcfun ("LLVMGetNamedGlobal" LLVMGetNamedGlobal) LLVMValueRef (M LLVMModuleRef) (Name :string)) -(cffi:defcfun ("LLVMGetFirstGlobal" LLVMGetFirstGlobal) LLVMValueRef +(wrap-defcfun ("LLVMGetFirstGlobal" LLVMGetFirstGlobal) LLVMValueRef (M LLVMModuleRef)) -(cffi:defcfun ("LLVMGetLastGlobal" LLVMGetLastGlobal) LLVMValueRef +(wrap-defcfun ("LLVMGetLastGlobal" LLVMGetLastGlobal) LLVMValueRef (M LLVMModuleRef)) -(cffi:defcfun ("LLVMGetNextGlobal" LLVMGetNextGlobal) LLVMValueRef +(wrap-defcfun ("LLVMGetNextGlobal" LLVMGetNextGlobal) LLVMValueRef (GlobalVar LLVMValueRef)) -(cffi:defcfun ("LLVMGetPreviousGlobal" LLVMGetPreviousGlobal) LLVMValueRef +(wrap-defcfun ("LLVMGetPreviousGlobal" LLVMGetPreviousGlobal) LLVMValueRef (GlobalVar LLVMValueRef)) -(cffi:defcfun ("LLVMDeleteGlobal" LLVMDeleteGlobal) :void +(wrap-defcfun ("LLVMDeleteGlobal" LLVMDeleteGlobal) :void (GlobalVar LLVMValueRef)) -(cffi:defcfun ("LLVMGetInitializer" LLVMGetInitializer) LLVMValueRef +(wrap-defcfun ("LLVMGetInitializer" LLVMGetInitializer) LLVMValueRef (GlobalVar LLVMValueRef)) -(cffi:defcfun ("LLVMSetInitializer" LLVMSetInitializer) :void +(wrap-defcfun ("LLVMSetInitializer" LLVMSetInitializer) :void (GlobalVar LLVMValueRef) (ConstantVal LLVMValueRef)) -(cffi:defcfun ("LLVMIsThreadLocal" LLVMIsThreadLocal) :boolean +(wrap-defcfun ("LLVMIsThreadLocal" LLVMIsThreadLocal) :boolean (GlobalVar LLVMValueRef)) -(cffi:defcfun ("LLVMSetThreadLocal" LLVMSetThreadLocal) :void +(wrap-defcfun ("LLVMSetThreadLocal" LLVMSetThreadLocal) :void (GlobalVar LLVMValueRef) (IsThreadLocal :boolean)) -(cffi:defcfun ("LLVMIsGlobalConstant" LLVMIsGlobalConstant) :boolean +(wrap-defcfun ("LLVMIsGlobalConstant" LLVMIsGlobalConstant) :boolean (GlobalVar LLVMValueRef)) -(cffi:defcfun ("LLVMSetGlobalConstant" LLVMSetGlobalConstant) :void +(wrap-defcfun ("LLVMSetGlobalConstant" LLVMSetGlobalConstant) :void (GlobalVar LLVMValueRef) (IsConstant :boolean)) -(cffi:defcfun ("LLVMAddAlias" LLVMAddAlias) LLVMValueRef +(wrap-defcfun ("LLVMAddAlias" LLVMAddAlias) LLVMValueRef (M LLVMModuleRef) (Ty LLVMTypeRef) (Aliasee LLVMValueRef) (Name :string)) -(cffi:defcfun ("LLVMAddFunction" LLVMAddFunction) LLVMValueRef +(wrap-defcfun ("LLVMAddFunction" LLVMAddFunction) LLVMValueRef (M LLVMModuleRef) (Name :string) (FunctionTy LLVMTypeRef)) -(cffi:defcfun ("LLVMGetNamedFunction" LLVMGetNamedFunction) LLVMValueRef +(wrap-defcfun ("LLVMGetNamedFunction" LLVMGetNamedFunction) LLVMValueRef (M LLVMModuleRef) (Name :string)) -(cffi:defcfun ("LLVMGetFirstFunction" LLVMGetFirstFunction) LLVMValueRef +(wrap-defcfun ("LLVMGetFirstFunction" LLVMGetFirstFunction) LLVMValueRef (M LLVMModuleRef)) -(cffi:defcfun ("LLVMGetLastFunction" LLVMGetLastFunction) LLVMValueRef +(wrap-defcfun ("LLVMGetLastFunction" LLVMGetLastFunction) LLVMValueRef (M LLVMModuleRef)) -(cffi:defcfun ("LLVMGetNextFunction" LLVMGetNextFunction) LLVMValueRef +(wrap-defcfun ("LLVMGetNextFunction" LLVMGetNextFunction) LLVMValueRef (Fn LLVMValueRef)) -(cffi:defcfun ("LLVMGetPreviousFunction" LLVMGetPreviousFunction) LLVMValueRef +(wrap-defcfun ("LLVMGetPreviousFunction" LLVMGetPreviousFunction) LLVMValueRef (Fn LLVMValueRef)) -(cffi:defcfun ("LLVMDeleteFunction" LLVMDeleteFunction) :void +(wrap-defcfun ("LLVMDeleteFunction" LLVMDeleteFunction) :void (Fn LLVMValueRef)) -(cffi:defcfun ("LLVMGetIntrinsicID" LLVMGetIntrinsicID) :unsigned-int +(wrap-defcfun ("LLVMGetIntrinsicID" LLVMGetIntrinsicID) :unsigned-int (Fn LLVMValueRef)) -(cffi:defcfun ("LLVMGetFunctionCallConv" LLVMGetFunctionCallConv) :unsigned-int +(wrap-defcfun ("LLVMGetFunctionCallConv" LLVMGetFunctionCallConv) :unsigned-int (Fn LLVMValueRef)) -(cffi:defcfun ("LLVMSetFunctionCallConv" LLVMSetFunctionCallConv) :void +(wrap-defcfun ("LLVMSetFunctionCallConv" LLVMSetFunctionCallConv) :void (Fn LLVMValueRef) (CC :unsigned-int)) -(cffi:defcfun ("LLVMGetGC" LLVMGetGC) :string +(wrap-defcfun ("LLVMGetGC" LLVMGetGC) :string (Fn LLVMValueRef)) -(cffi:defcfun ("LLVMSetGC" LLVMSetGC) :void +(wrap-defcfun ("LLVMSetGC" LLVMSetGC) :void (Fn LLVMValueRef) (Name :string)) -(cffi:defcfun ("LLVMGetFunctionAttr" LLVMGetFunctionAttr) LLVMAttribute +(wrap-defcfun ("LLVMGetFunctionAttr" LLVMGetFunctionAttr) LLVMAttribute (Fn LLVMValueRef)) -(cffi:defcfun ("LLVMCountParams" LLVMCountParams) :unsigned-int +(wrap-defcfun ("LLVMCountParams" LLVMCountParams) :unsigned-int (Fn LLVMValueRef)) -(cffi:defcfun ("LLVMGetParams" %LLVMGetParams) :void +(wrap-defcfun ("LLVMGetParams" %LLVMGetParams) :void (Fn LLVMValueRef) (Params :pointer)) -(cffi:defcfun ("LLVMGetParam" LLVMGetParam) LLVMValueRef +(wrap-defcfun ("LLVMGetParam" LLVMGetParam) LLVMValueRef (Fn LLVMValueRef) (Index :unsigned-int)) -(cffi:defcfun ("LLVMGetParamParent" LLVMGetParamParent) LLVMValueRef +(wrap-defcfun ("LLVMGetParamParent" LLVMGetParamParent) LLVMValueRef (Inst LLVMValueRef)) -(cffi:defcfun ("LLVMGetFirstParam" LLVMGetFirstParam) LLVMValueRef +(wrap-defcfun ("LLVMGetFirstParam" LLVMGetFirstParam) LLVMValueRef (Fn LLVMValueRef)) -(cffi:defcfun ("LLVMGetLastParam" LLVMGetLastParam) LLVMValueRef +(wrap-defcfun ("LLVMGetLastParam" LLVMGetLastParam) LLVMValueRef (Fn LLVMValueRef)) -(cffi:defcfun ("LLVMGetNextParam" LLVMGetNextParam) LLVMValueRef +(wrap-defcfun ("LLVMGetNextParam" LLVMGetNextParam) LLVMValueRef (Arg LLVMValueRef)) -(cffi:defcfun ("LLVMGetPreviousParam" LLVMGetPreviousParam) LLVMValueRef +(wrap-defcfun ("LLVMGetPreviousParam" LLVMGetPreviousParam) LLVMValueRef (Arg LLVMValueRef)) -(cffi:defcfun ("LLVMAddAttribute" LLVMAddAttribute) :void +(wrap-defcfun ("LLVMAddAttribute" LLVMAddAttribute) :void (Arg LLVMValueRef) (PA LLVMAttribute)) -(cffi:defcfun ("LLVMRemoveAttribute" LLVMRemoveAttribute) :void +(wrap-defcfun ("LLVMRemoveAttribute" LLVMRemoveAttribute) :void (Arg LLVMValueRef) (PA LLVMAttribute)) -(cffi:defcfun ("LLVMGetAttribute" LLVMGetAttribute) LLVMAttribute +(wrap-defcfun ("LLVMGetAttribute" LLVMGetAttribute) LLVMAttribute (Arg LLVMValueRef)) -(cffi:defcfun ("LLVMSetParamAlignment" LLVMSetParamAlignment) :void +(wrap-defcfun ("LLVMSetParamAlignment" LLVMSetParamAlignment) :void (Arg LLVMValueRef) (align :unsigned-int)) -(cffi:defcfun ("LLVMBasicBlockAsValue" LLVMBasicBlockAsValue) LLVMValueRef +(wrap-defcfun ("LLVMBasicBlockAsValue" LLVMBasicBlockAsValue) LLVMValueRef (BB LLVMBasicBlockRef)) -(cffi:defcfun ("LLVMValueIsBasicBlock" LLVMValueIsBasicBlock) :boolean +(wrap-defcfun ("LLVMValueIsBasicBlock" LLVMValueIsBasicBlock) :boolean (Val LLVMValueRef)) -(cffi:defcfun ("LLVMValueAsBasicBlock" LLVMValueAsBasicBlock) LLVMBasicBlockRef +(wrap-defcfun ("LLVMValueAsBasicBlock" LLVMValueAsBasicBlock) LLVMBasicBlockRef (Val LLVMValueRef)) -(cffi:defcfun ("LLVMGetBasicBlockParent" LLVMGetBasicBlockParent) LLVMValueRef +(wrap-defcfun ("LLVMGetBasicBlockParent" LLVMGetBasicBlockParent) LLVMValueRef (BB LLVMBasicBlockRef)) -(cffi:defcfun ("LLVMCountBasicBlocks" LLVMCountBasicBlocks) :unsigned-int +(wrap-defcfun ("LLVMCountBasicBlocks" LLVMCountBasicBlocks) :unsigned-int (Fn LLVMValueRef)) -(cffi:defcfun ("LLVMGetBasicBlocks" LLVMGetBasicBlocks) :void +(wrap-defcfun ("LLVMGetBasicBlocks" LLVMGetBasicBlocks) :void (Fn LLVMValueRef) (BasicBlocks :pointer)) -(cffi:defcfun ("LLVMGetFirstBasicBlock" LLVMGetFirstBasicBlock) LLVMBasicBlockRef +(wrap-defcfun ("LLVMGetFirstBasicBlock" LLVMGetFirstBasicBlock) LLVMBasicBlockRef (Fn LLVMValueRef)) -(cffi:defcfun ("LLVMGetLastBasicBlock" LLVMGetLastBasicBlock) LLVMBasicBlockRef +(wrap-defcfun ("LLVMGetLastBasicBlock" LLVMGetLastBasicBlock) LLVMBasicBlockRef (Fn LLVMValueRef)) -(cffi:defcfun ("LLVMGetNextBasicBlock" LLVMGetNextBasicBlock) LLVMBasicBlockRef +(wrap-defcfun ("LLVMGetNextBasicBlock" LLVMGetNextBasicBlock) LLVMBasicBlockRef (BB LLVMBasicBlockRef)) -(cffi:defcfun ("LLVMGetPreviousBasicBlock" LLVMGetPreviousBasicBlock) LLVMBasicBlockRef +(wrap-defcfun ("LLVMGetPreviousBasicBlock" LLVMGetPreviousBasicBlock) LLVMBasicBlockRef (BB LLVMBasicBlockRef)) -(cffi:defcfun ("LLVMGetEntryBasicBlock" LLVMGetEntryBasicBlock) LLVMBasicBlockRef +(wrap-defcfun ("LLVMGetEntryBasicBlock" LLVMGetEntryBasicBlock) LLVMBasicBlockRef (Fn LLVMValueRef)) -(cffi:defcfun ("LLVMAppendBasicBlockInContext" %LLVMAppendBasicBlockInContext) LLVMBasicBlockRef +(wrap-defcfun ("LLVMAppendBasicBlockInContext" %LLVMAppendBasicBlockInContext) LLVMBasicBlockRef (C LLVMContextRef) (Fn LLVMValueRef) (Name :string)) -(cffi:defcfun ("LLVMInsertBasicBlockInContext" %LLVMInsertBasicBlockInContext) LLVMBasicBlockRef +(wrap-defcfun ("LLVMInsertBasicBlockInContext" %LLVMInsertBasicBlockInContext) LLVMBasicBlockRef (C LLVMContextRef) (BB LLVMBasicBlockRef) (Name :string)) -(cffi:defcfun ("LLVMDeleteBasicBlock" LLVMDeleteBasicBlock) :void +(wrap-defcfun ("LLVMDeleteBasicBlock" LLVMDeleteBasicBlock) :void (BB LLVMBasicBlockRef)) -(cffi:defcfun ("LLVMGetInstructionParent" LLVMGetInstructionParent) LLVMBasicBlockRef +(wrap-defcfun ("LLVMGetInstructionParent" LLVMGetInstructionParent) LLVMBasicBlockRef (Inst LLVMValueRef)) -(cffi:defcfun ("LLVMGetFirstInstruction" LLVMGetFirstInstruction) LLVMValueRef +(wrap-defcfun ("LLVMGetFirstInstruction" LLVMGetFirstInstruction) LLVMValueRef (BB LLVMBasicBlockRef)) -(cffi:defcfun ("LLVMGetLastInstruction" LLVMGetLastInstruction) LLVMValueRef +(wrap-defcfun ("LLVMGetLastInstruction" LLVMGetLastInstruction) LLVMValueRef (BB LLVMBasicBlockRef)) -(cffi:defcfun ("LLVMGetNextInstruction" LLVMGetNextInstruction) LLVMValueRef +(wrap-defcfun ("LLVMGetNextInstruction" LLVMGetNextInstruction) LLVMValueRef (Inst LLVMValueRef)) -(cffi:defcfun ("LLVMGetPreviousInstruction" LLVMGetPreviousInstruction) LLVMValueRef +(wrap-defcfun ("LLVMGetPreviousInstruction" LLVMGetPreviousInstruction) LLVMValueRef (Inst LLVMValueRef)) -(cffi:defcfun ("LLVMSetInstructionCallConv" LLVMSetInstructionCallConv) :void +(wrap-defcfun ("LLVMSetInstructionCallConv" LLVMSetInstructionCallConv) :void (Instr LLVMValueRef) (CC :unsigned-int)) -(cffi:defcfun ("LLVMGetInstructionCallConv" LLVMGetInstructionCallConv) :unsigned-int +(wrap-defcfun ("LLVMGetInstructionCallConv" LLVMGetInstructionCallConv) :unsigned-int (Instr LLVMValueRef)) -(cffi:defcfun ("LLVMAddInstrAttribute" LLVMAddInstrAttribute) :void +(wrap-defcfun ("LLVMAddInstrAttribute" LLVMAddInstrAttribute) :void (Instr LLVMValueRef) (index :unsigned-int) (arg2 LLVMAttribute)) -(cffi:defcfun ("LLVMRemoveInstrAttribute" LLVMRemoveInstrAttribute) :void +(wrap-defcfun ("LLVMRemoveInstrAttribute" LLVMRemoveInstrAttribute) :void (Instr LLVMValueRef) (index :unsigned-int) (arg2 LLVMAttribute)) -(cffi:defcfun ("LLVMSetInstrParamAlignment" LLVMSetInstrParamAlignment) :void +(wrap-defcfun ("LLVMSetInstrParamAlignment" LLVMSetInstrParamAlignment) :void (Instr LLVMValueRef) (index :unsigned-int) (align :unsigned-int)) -(cffi:defcfun ("LLVMIsTailCall" LLVMIsTailCall) :boolean +(wrap-defcfun ("LLVMIsTailCall" LLVMIsTailCall) :boolean (CallInst LLVMValueRef)) -(cffi:defcfun ("LLVMSetTailCall" LLVMSetTailCall) :void +(wrap-defcfun ("LLVMSetTailCall" LLVMSetTailCall) :void (CallInst LLVMValueRef) (IsTailCall :boolean)) -(cffi:defcfun ("LLVMAddIncoming" %LLVMAddIncoming) :void +(wrap-defcfun ("LLVMAddIncoming" %LLVMAddIncoming) :void (PhiNode LLVMValueRef) (IncomingValues :pointer) (IncomingBlocks :pointer) (Count :unsigned-int)) -(cffi:defcfun ("LLVMCountIncoming" LLVMCountIncoming) :unsigned-int +(wrap-defcfun ("LLVMCountIncoming" LLVMCountIncoming) :unsigned-int (PhiNode LLVMValueRef)) -(cffi:defcfun ("LLVMGetIncomingValue" LLVMGetIncomingValue) LLVMValueRef +(wrap-defcfun ("LLVMGetIncomingValue" LLVMGetIncomingValue) LLVMValueRef (PhiNode LLVMValueRef) (Index :unsigned-int)) -(cffi:defcfun ("LLVMGetIncomingBlock" LLVMGetIncomingBlock) LLVMBasicBlockRef +(wrap-defcfun ("LLVMGetIncomingBlock" LLVMGetIncomingBlock) LLVMBasicBlockRef (PhiNode LLVMValueRef) (Index :unsigned-int)) -(cffi:defcfun ("LLVMCreateBuilderInContext" %LLVMCreateBuilderInContext) LLVMBuilderRef +(wrap-defcfun ("LLVMCreateBuilderInContext" %LLVMCreateBuilderInContext) LLVMBuilderRef (C LLVMContextRef)) -(cffi:defcfun ("LLVMPositionBuilder" LLVMPositionBuilder) :void +(wrap-defcfun ("LLVMPositionBuilder" LLVMPositionBuilder) :void (Builder LLVMBuilderRef) (Block LLVMBasicBlockRef) (Instr LLVMValueRef)) -(cffi:defcfun ("LLVMPositionBuilderBefore" LLVMPositionBuilderBefore) :void +(wrap-defcfun ("LLVMPositionBuilderBefore" LLVMPositionBuilderBefore) :void (Builder LLVMBuilderRef) (Instr LLVMValueRef)) -(cffi:defcfun ("LLVMPositionBuilderAtEnd" LLVMPositionBuilderAtEnd) :void +(wrap-defcfun ("LLVMPositionBuilderAtEnd" LLVMPositionBuilderAtEnd) :void (Builder LLVMBuilderRef) (Block LLVMBasicBlockRef)) -(cffi:defcfun ("LLVMGetInsertBlock" LLVMGetInsertBlock) LLVMBasicBlockRef +(wrap-defcfun ("LLVMGetInsertBlock" LLVMGetInsertBlock) LLVMBasicBlockRef (Builder LLVMBuilderRef)) -(cffi:defcfun ("LLVMClearInsertionPosition" LLVMClearInsertionPosition) :void +(wrap-defcfun ("LLVMClearInsertionPosition" LLVMClearInsertionPosition) :void (Builder LLVMBuilderRef)) -(cffi:defcfun ("LLVMInsertIntoBuilder" LLVMInsertIntoBuilder) :void +(wrap-defcfun ("LLVMInsertIntoBuilder" LLVMInsertIntoBuilder) :void (Builder LLVMBuilderRef) (Instr LLVMValueRef)) -(cffi:defcfun ("LLVMInsertIntoBuilderWithName" LLVMInsertIntoBuilderWithName) :void +(wrap-defcfun ("LLVMInsertIntoBuilderWithName" LLVMInsertIntoBuilderWithName) :void (Builder LLVMBuilderRef) (Instr LLVMValueRef) (Name :string)) -(cffi:defcfun ("LLVMDisposeBuilder" LLVMDisposeBuilder) :void +(wrap-defcfun ("LLVMDisposeBuilder" LLVMDisposeBuilder) :void (Builder LLVMBuilderRef)) -(cffi:defcfun ("LLVMBuildRetVoid" LLVMBuildRetVoid) LLVMValueRef +(wrap-defcfun ("LLVMBuildRetVoid" LLVMBuildRetVoid) LLVMValueRef (arg0 LLVMBuilderRef)) -(cffi:defcfun ("LLVMBuildRet" LLVMBuildRet) LLVMValueRef +(wrap-defcfun ("LLVMBuildRet" LLVMBuildRet) LLVMValueRef (arg0 LLVMBuilderRef) (V LLVMValueRef)) -(cffi:defcfun ("LLVMBuildAggregateRet" %LLVMBuildAggregateRet) LLVMValueRef +(wrap-defcfun ("LLVMBuildAggregateRet" %LLVMBuildAggregateRet) LLVMValueRef (arg0 LLVMBuilderRef) (RetVals :pointer) (N :unsigned-int)) -(cffi:defcfun ("LLVMBuildBr" LLVMBuildBr) LLVMValueRef +(wrap-defcfun ("LLVMBuildBr" LLVMBuildBr) LLVMValueRef (arg0 LLVMBuilderRef) (Dest LLVMBasicBlockRef)) -(cffi:defcfun ("LLVMBuildCondBr" LLVMBuildCondBr) LLVMValueRef +(wrap-defcfun ("LLVMBuildCondBr" LLVMBuildCondBr) LLVMValueRef (arg0 LLVMBuilderRef) (If LLVMValueRef) (Then LLVMBasicBlockRef) (Else LLVMBasicBlockRef)) -(cffi:defcfun ("LLVMBuildSwitch" LLVMBuildSwitch) LLVMValueRef +(wrap-defcfun ("LLVMBuildSwitch" LLVMBuildSwitch) LLVMValueRef (arg0 LLVMBuilderRef) (V LLVMValueRef) (Else LLVMBasicBlockRef) (NumCases :unsigned-int)) -(cffi:defcfun ("LLVMBuildInvoke" %LLVMBuildInvoke) LLVMValueRef +(wrap-defcfun ("LLVMBuildInvoke" %LLVMBuildInvoke) LLVMValueRef (arg0 LLVMBuilderRef) (Fn LLVMValueRef) (Args :pointer) @@ -1252,452 +1267,452 @@ (Catch LLVMBasicBlockRef) (Name :string)) -(cffi:defcfun ("LLVMBuildUnwind" LLVMBuildUnwind) LLVMValueRef +(wrap-defcfun ("LLVMBuildUnwind" LLVMBuildUnwind) LLVMValueRef (arg0 LLVMBuilderRef)) -(cffi:defcfun ("LLVMBuildUnreachable" LLVMBuildUnreachable) LLVMValueRef +(wrap-defcfun ("LLVMBuildUnreachable" LLVMBuildUnreachable) LLVMValueRef (arg0 LLVMBuilderRef)) -(cffi:defcfun ("LLVMAddCase" LLVMAddCase) :void +(wrap-defcfun ("LLVMAddCase" LLVMAddCase) :void (Switch LLVMValueRef) (OnVal LLVMValueRef) (Dest LLVMBasicBlockRef)) -(cffi:defcfun ("LLVMBuildAdd" LLVMBuildAdd) LLVMValueRef +(wrap-defcfun ("LLVMBuildAdd" LLVMBuildAdd) LLVMValueRef (arg0 LLVMBuilderRef) (LHS LLVMValueRef) (RHS LLVMValueRef) (Name :string)) -(cffi:defcfun ("LLVMBuildNSWAdd" LLVMBuildNSWAdd) LLVMValueRef +(wrap-defcfun ("LLVMBuildNSWAdd" LLVMBuildNSWAdd) LLVMValueRef (arg0 LLVMBuilderRef) (LHS LLVMValueRef) (RHS LLVMValueRef) (Name :string)) -(cffi:defcfun ("LLVMBuildFAdd" LLVMBuildFAdd) LLVMValueRef +(wrap-defcfun ("LLVMBuildFAdd" LLVMBuildFAdd) LLVMValueRef (arg0 LLVMBuilderRef) (LHS LLVMValueRef) (RHS LLVMValueRef) (Name :string)) -(cffi:defcfun ("LLVMBuildSub" LLVMBuildSub) LLVMValueRef +(wrap-defcfun ("LLVMBuildSub" LLVMBuildSub) LLVMValueRef (arg0 LLVMBuilderRef) (LHS LLVMValueRef) (RHS LLVMValueRef) (Name :string)) -(cffi:defcfun ("LLVMBuildFSub" LLVMBuildFSub) LLVMValueRef +(wrap-defcfun ("LLVMBuildFSub" LLVMBuildFSub) LLVMValueRef (arg0 LLVMBuilderRef) (LHS LLVMValueRef) (RHS LLVMValueRef) (Name :string)) -(cffi:defcfun ("LLVMBuildMul" LLVMBuildMul) LLVMValueRef +(wrap-defcfun ("LLVMBuildMul" LLVMBuildMul) LLVMValueRef (arg0 LLVMBuilderRef) (LHS LLVMValueRef) (RHS LLVMValueRef) (Name :string)) -(cffi:defcfun ("LLVMBuildFMul" LLVMBuildFMul) LLVMValueRef +(wrap-defcfun ("LLVMBuildFMul" LLVMBuildFMul) LLVMValueRef (arg0 LLVMBuilderRef) (LHS LLVMValueRef) (RHS LLVMValueRef) (Name :string)) -(cffi:defcfun ("LLVMBuildUDiv" LLVMBuildUDiv) LLVMValueRef +(wrap-defcfun ("LLVMBuildUDiv" LLVMBuildUDiv) LLVMValueRef (arg0 LLVMBuilderRef) (LHS LLVMValueRef) (RHS LLVMValueRef) (Name :string)) -(cffi:defcfun ("LLVMBuildSDiv" LLVMBuildSDiv) LLVMValueRef +(wrap-defcfun ("LLVMBuildSDiv" LLVMBuildSDiv) LLVMValueRef (arg0 LLVMBuilderRef) (LHS LLVMValueRef) (RHS LLVMValueRef) (Name :string)) -(cffi:defcfun ("LLVMBuildExactSDiv" LLVMBuildExactSDiv) LLVMValueRef +(wrap-defcfun ("LLVMBuildExactSDiv" LLVMBuildExactSDiv) LLVMValueRef (arg0 LLVMBuilderRef) (LHS LLVMValueRef) (RHS LLVMValueRef) (Name :string)) -(cffi:defcfun ("LLVMBuildFDiv" LLVMBuildFDiv) LLVMValueRef +(wrap-defcfun ("LLVMBuildFDiv" LLVMBuildFDiv) LLVMValueRef (arg0 LLVMBuilderRef) (LHS LLVMValueRef) (RHS LLVMValueRef) (Name :string)) -(cffi:defcfun ("LLVMBuildURem" LLVMBuildURem) LLVMValueRef +(wrap-defcfun ("LLVMBuildURem" LLVMBuildURem) LLVMValueRef (arg0 LLVMBuilderRef) (LHS LLVMValueRef) (RHS LLVMValueRef) (Name :string)) -(cffi:defcfun ("LLVMBuildSRem" LLVMBuildSRem) LLVMValueRef +(wrap-defcfun ("LLVMBuildSRem" LLVMBuildSRem) LLVMValueRef (arg0 LLVMBuilderRef) (LHS LLVMValueRef) (RHS LLVMValueRef) (Name :string)) -(cffi:defcfun ("LLVMBuildFRem" LLVMBuildFRem) LLVMValueRef +(wrap-defcfun ("LLVMBuildFRem" LLVMBuildFRem) LLVMValueRef (arg0 LLVMBuilderRef) (LHS LLVMValueRef) (RHS LLVMValueRef) (Name :string)) -(cffi:defcfun ("LLVMBuildShl" LLVMBuildShl) LLVMValueRef +(wrap-defcfun ("LLVMBuildShl" LLVMBuildShl) LLVMValueRef (arg0 LLVMBuilderRef) (LHS LLVMValueRef) (RHS LLVMValueRef) (Name :string)) -(cffi:defcfun ("LLVMBuildLShr" LLVMBuildLShr) LLVMValueRef +(wrap-defcfun ("LLVMBuildLShr" LLVMBuildLShr) LLVMValueRef (arg0 LLVMBuilderRef) (LHS LLVMValueRef) (RHS LLVMValueRef) (Name :string)) -(cffi:defcfun ("LLVMBuildAShr" LLVMBuildAShr) LLVMValueRef +(wrap-defcfun ("LLVMBuildAShr" LLVMBuildAShr) LLVMValueRef (arg0 LLVMBuilderRef) (LHS LLVMValueRef) (RHS LLVMValueRef) (Name :string)) -(cffi:defcfun ("LLVMBuildAnd" LLVMBuildAnd) LLVMValueRef +(wrap-defcfun ("LLVMBuildAnd" LLVMBuildAnd) LLVMValueRef (arg0 LLVMBuilderRef) (LHS LLVMValueRef) (RHS LLVMValueRef) (Name :string)) -(cffi:defcfun ("LLVMBuildOr" LLVMBuildOr) LLVMValueRef +(wrap-defcfun ("LLVMBuildOr" LLVMBuildOr) LLVMValueRef (arg0 LLVMBuilderRef) (LHS LLVMValueRef) (RHS LLVMValueRef) (Name :string)) -(cffi:defcfun ("LLVMBuildXor" LLVMBuildXor) LLVMValueRef +(wrap-defcfun ("LLVMBuildXor" LLVMBuildXor) LLVMValueRef (arg0 LLVMBuilderRef) (LHS LLVMValueRef) (RHS LLVMValueRef) (Name :string)) -(cffi:defcfun ("LLVMBuildNeg" LLVMBuildNeg) LLVMValueRef +(wrap-defcfun ("LLVMBuildNeg" LLVMBuildNeg) LLVMValueRef (arg0 LLVMBuilderRef) (V LLVMValueRef) (Name :string)) -(cffi:defcfun ("LLVMBuildFNeg" LLVMBuildFNeg) LLVMValueRef +(wrap-defcfun ("LLVMBuildFNeg" LLVMBuildFNeg) LLVMValueRef (arg0 LLVMBuilderRef) (V LLVMValueRef) (Name :string)) -(cffi:defcfun ("LLVMBuildNot" LLVMBuildNot) LLVMValueRef +(wrap-defcfun ("LLVMBuildNot" LLVMBuildNot) LLVMValueRef (arg0 LLVMBuilderRef) (V LLVMValueRef) (Name :string)) -(cffi:defcfun ("LLVMBuildMalloc" LLVMBuildMalloc) LLVMValueRef +(wrap-defcfun ("LLVMBuildMalloc" LLVMBuildMalloc) LLVMValueRef (arg0 LLVMBuilderRef) (Ty LLVMTypeRef) (Name :string)) -(cffi:defcfun ("LLVMBuildArrayMalloc" LLVMBuildArrayMalloc) LLVMValueRef +(wrap-defcfun ("LLVMBuildArrayMalloc" LLVMBuildArrayMalloc) LLVMValueRef (arg0 LLVMBuilderRef) (Ty LLVMTypeRef) (Val LLVMValueRef) (Name :string)) -(cffi:defcfun ("LLVMBuildAlloca" LLVMBuildAlloca) LLVMValueRef +(wrap-defcfun ("LLVMBuildAlloca" LLVMBuildAlloca) LLVMValueRef (arg0 LLVMBuilderRef) (Ty LLVMTypeRef) (Name :string)) -(cffi:defcfun ("LLVMBuildArrayAlloca" LLVMBuildArrayAlloca) LLVMValueRef +(wrap-defcfun ("LLVMBuildArrayAlloca" LLVMBuildArrayAlloca) LLVMValueRef (arg0 LLVMBuilderRef) (Ty LLVMTypeRef) (Val LLVMValueRef) (Name :string)) -(cffi:defcfun ("LLVMBuildFree" LLVMBuildFree) LLVMValueRef +(wrap-defcfun ("LLVMBuildFree" LLVMBuildFree) LLVMValueRef (arg0 LLVMBuilderRef) (PointerVal LLVMValueRef)) -(cffi:defcfun ("LLVMBuildLoad" LLVMBuildLoad) LLVMValueRef +(wrap-defcfun ("LLVMBuildLoad" LLVMBuildLoad) LLVMValueRef (arg0 LLVMBuilderRef) (PointerVal LLVMValueRef) (Name :string)) -(cffi:defcfun ("LLVMBuildStore" LLVMBuildStore) LLVMValueRef +(wrap-defcfun ("LLVMBuildStore" LLVMBuildStore) LLVMValueRef (arg0 LLVMBuilderRef) (Val LLVMValueRef) (Ptr LLVMValueRef)) -(cffi:defcfun ("LLVMBuildGEP" %LLVMBuildGEP) LLVMValueRef +(wrap-defcfun ("LLVMBuildGEP" %LLVMBuildGEP) LLVMValueRef (B LLVMBuilderRef) (Pointer LLVMValueRef) (Indices :pointer) (NumIndices :unsigned-int) (Name :string)) -(cffi:defcfun ("LLVMBuildInBoundsGEP" %LLVMBuildInBoundsGEP) LLVMValueRef +(wrap-defcfun ("LLVMBuildInBoundsGEP" %LLVMBuildInBoundsGEP) LLVMValueRef (B LLVMBuilderRef) (Pointer LLVMValueRef) (Indices :pointer) (NumIndices :unsigned-int) (Name :string)) -(cffi:defcfun ("LLVMBuildStructGEP" LLVMBuildStructGEP) LLVMValueRef +(wrap-defcfun ("LLVMBuildStructGEP" LLVMBuildStructGEP) LLVMValueRef (B LLVMBuilderRef) (Pointer LLVMValueRef) (Idx :unsigned-int) (Name :string)) -(cffi:defcfun ("LLVMBuildGlobalString" LLVMBuildGlobalString) LLVMValueRef +(wrap-defcfun ("LLVMBuildGlobalString" LLVMBuildGlobalString) LLVMValueRef (B LLVMBuilderRef) (Str :string) (Name :string)) -(cffi:defcfun ("LLVMBuildGlobalStringPtr" LLVMBuildGlobalStringPtr) LLVMValueRef +(wrap-defcfun ("LLVMBuildGlobalStringPtr" LLVMBuildGlobalStringPtr) LLVMValueRef (B LLVMBuilderRef) (Str :string) (Name :string)) -(cffi:defcfun ("LLVMBuildTrunc" LLVMBuildTrunc) LLVMValueRef +(wrap-defcfun ("LLVMBuildTrunc" LLVMBuildTrunc) LLVMValueRef (arg0 LLVMBuilderRef) (Val LLVMValueRef) (DestTy LLVMTypeRef) (Name :string)) -(cffi:defcfun ("LLVMBuildZExt" LLVMBuildZExt) LLVMValueRef +(wrap-defcfun ("LLVMBuildZExt" LLVMBuildZExt) LLVMValueRef (arg0 LLVMBuilderRef) (Val LLVMValueRef) (DestTy LLVMTypeRef) (Name :string)) -(cffi:defcfun ("LLVMBuildSExt" LLVMBuildSExt) LLVMValueRef +(wrap-defcfun ("LLVMBuildSExt" LLVMBuildSExt) LLVMValueRef (arg0 LLVMBuilderRef) (Val LLVMValueRef) (DestTy LLVMTypeRef) (Name :string)) -(cffi:defcfun ("LLVMBuildFPToUI" LLVMBuildFPToUI) LLVMValueRef +(wrap-defcfun ("LLVMBuildFPToUI" LLVMBuildFPToUI) LLVMValueRef (arg0 LLVMBuilderRef) (Val LLVMValueRef) (DestTy LLVMTypeRef) (Name :string)) -(cffi:defcfun ("LLVMBuildFPToSI" LLVMBuildFPToSI) LLVMValueRef +(wrap-defcfun ("LLVMBuildFPToSI" LLVMBuildFPToSI) LLVMValueRef (arg0 LLVMBuilderRef) (Val LLVMValueRef) (DestTy LLVMTypeRef) (Name :string)) -(cffi:defcfun ("LLVMBuildUIToFP" LLVMBuildUIToFP) LLVMValueRef +(wrap-defcfun ("LLVMBuildUIToFP" LLVMBuildUIToFP) LLVMValueRef (arg0 LLVMBuilderRef) (Val LLVMValueRef) (DestTy LLVMTypeRef) (Name :string)) -(cffi:defcfun ("LLVMBuildSIToFP" LLVMBuildSIToFP) LLVMValueRef +(wrap-defcfun ("LLVMBuildSIToFP" LLVMBuildSIToFP) LLVMValueRef (arg0 LLVMBuilderRef) (Val LLVMValueRef) (DestTy LLVMTypeRef) (Name :string)) -(cffi:defcfun ("LLVMBuildFPTrunc" LLVMBuildFPTrunc) LLVMValueRef +(wrap-defcfun ("LLVMBuildFPTrunc" LLVMBuildFPTrunc) LLVMValueRef (arg0 LLVMBuilderRef) (Val LLVMValueRef) (DestTy LLVMTypeRef) (Name :string)) -(cffi:defcfun ("LLVMBuildFPExt" LLVMBuildFPExt) LLVMValueRef +(wrap-defcfun ("LLVMBuildFPExt" LLVMBuildFPExt) LLVMValueRef (arg0 LLVMBuilderRef) (Val LLVMValueRef) (DestTy LLVMTypeRef) (Name :string)) -(cffi:defcfun ("LLVMBuildPtrToInt" LLVMBuildPtrToInt) LLVMValueRef +(wrap-defcfun ("LLVMBuildPtrToInt" LLVMBuildPtrToInt) LLVMValueRef (arg0 LLVMBuilderRef) (Val LLVMValueRef) (DestTy LLVMTypeRef) (Name :string)) -(cffi:defcfun ("LLVMBuildIntToPtr" LLVMBuildIntToPtr) LLVMValueRef +(wrap-defcfun ("LLVMBuildIntToPtr" LLVMBuildIntToPtr) LLVMValueRef (arg0 LLVMBuilderRef) (Val LLVMValueRef) (DestTy LLVMTypeRef) (Name :string)) -(cffi:defcfun ("LLVMBuildBitCast" LLVMBuildBitCast) LLVMValueRef +(wrap-defcfun ("LLVMBuildBitCast" LLVMBuildBitCast) LLVMValueRef (arg0 LLVMBuilderRef) (Val LLVMValueRef) (DestTy LLVMTypeRef) (Name :string)) -(cffi:defcfun ("LLVMBuildZExtOrBitCast" LLVMBuildZExtOrBitCast) LLVMValueRef +(wrap-defcfun ("LLVMBuildZExtOrBitCast" LLVMBuildZExtOrBitCast) LLVMValueRef (arg0 LLVMBuilderRef) (Val LLVMValueRef) (DestTy LLVMTypeRef) (Name :string)) -(cffi:defcfun ("LLVMBuildSExtOrBitCast" LLVMBuildSExtOrBitCast) LLVMValueRef +(wrap-defcfun ("LLVMBuildSExtOrBitCast" LLVMBuildSExtOrBitCast) LLVMValueRef (arg0 LLVMBuilderRef) (Val LLVMValueRef) (DestTy LLVMTypeRef) (Name :string)) -(cffi:defcfun ("LLVMBuildTruncOrBitCast" LLVMBuildTruncOrBitCast) LLVMValueRef +(wrap-defcfun ("LLVMBuildTruncOrBitCast" LLVMBuildTruncOrBitCast) LLVMValueRef (arg0 LLVMBuilderRef) (Val LLVMValueRef) (DestTy LLVMTypeRef) (Name :string)) -(cffi:defcfun ("LLVMBuildPointerCast" LLVMBuildPointerCast) LLVMValueRef +(wrap-defcfun ("LLVMBuildPointerCast" LLVMBuildPointerCast) LLVMValueRef (arg0 LLVMBuilderRef) (Val LLVMValueRef) (DestTy LLVMTypeRef) (Name :string)) -(cffi:defcfun ("LLVMBuildIntCast" LLVMBuildIntCast) LLVMValueRef +(wrap-defcfun ("LLVMBuildIntCast" LLVMBuildIntCast) LLVMValueRef (arg0 LLVMBuilderRef) (Val LLVMValueRef) (DestTy LLVMTypeRef) (Name :string)) -(cffi:defcfun ("LLVMBuildFPCast" LLVMBuildFPCast) LLVMValueRef +(wrap-defcfun ("LLVMBuildFPCast" LLVMBuildFPCast) LLVMValueRef (arg0 LLVMBuilderRef) (Val LLVMValueRef) (DestTy LLVMTypeRef) (Name :string)) -(cffi:defcfun ("LLVMBuildICmp" LLVMBuildICmp) LLVMValueRef +(wrap-defcfun ("LLVMBuildICmp" LLVMBuildICmp) LLVMValueRef (arg0 LLVMBuilderRef) (Op LLVMIntPredicate) (LHS LLVMValueRef) (RHS LLVMValueRef) (Name :string)) -(cffi:defcfun ("LLVMBuildFCmp" LLVMBuildFCmp) LLVMValueRef +(wrap-defcfun ("LLVMBuildFCmp" LLVMBuildFCmp) LLVMValueRef (arg0 LLVMBuilderRef) (Op LLVMRealPredicate) (LHS LLVMValueRef) (RHS LLVMValueRef) (Name :string)) -(cffi:defcfun ("LLVMBuildPhi" LLVMBuildPhi) LLVMValueRef +(wrap-defcfun ("LLVMBuildPhi" LLVMBuildPhi) LLVMValueRef (arg0 LLVMBuilderRef) (Ty LLVMTypeRef) (Name :string)) -(cffi:defcfun ("LLVMBuildCall" %LLVMBuildCall) LLVMValueRef +(wrap-defcfun ("LLVMBuildCall" %LLVMBuildCall) LLVMValueRef (arg0 LLVMBuilderRef) (Fn LLVMValueRef) (Args :pointer) (NumArgs :unsigned-int) (Name :string)) -(cffi:defcfun ("LLVMBuildSelect" LLVMBuildSelect) LLVMValueRef +(wrap-defcfun ("LLVMBuildSelect" LLVMBuildSelect) LLVMValueRef (arg0 LLVMBuilderRef) (If LLVMValueRef) (Then LLVMValueRef) (Else LLVMValueRef) (Name :string)) -(cffi:defcfun ("LLVMBuildVAArg" LLVMBuildVAArg) LLVMValueRef +(wrap-defcfun ("LLVMBuildVAArg" LLVMBuildVAArg) LLVMValueRef (arg0 LLVMBuilderRef) (List LLVMValueRef) (Ty LLVMTypeRef) (Name :string)) -(cffi:defcfun ("LLVMBuildExtractElement" LLVMBuildExtractElement) LLVMValueRef +(wrap-defcfun ("LLVMBuildExtractElement" LLVMBuildExtractElement) LLVMValueRef (arg0 LLVMBuilderRef) (VecVal LLVMValueRef) (Index LLVMValueRef) (Name :string)) -(cffi:defcfun ("LLVMBuildInsertElement" LLVMBuildInsertElement) LLVMValueRef +(wrap-defcfun ("LLVMBuildInsertElement" LLVMBuildInsertElement) LLVMValueRef (arg0 LLVMBuilderRef) (VecVal LLVMValueRef) (EltVal LLVMValueRef) (Index LLVMValueRef) (Name :string)) -(cffi:defcfun ("LLVMBuildShuffleVector" LLVMBuildShuffleVector) LLVMValueRef +(wrap-defcfun ("LLVMBuildShuffleVector" LLVMBuildShuffleVector) LLVMValueRef (arg0 LLVMBuilderRef) (V1 LLVMValueRef) (V2 LLVMValueRef) (Mask LLVMValueRef) (Name :string)) -(cffi:defcfun ("LLVMBuildExtractValue" LLVMBuildExtractValue) LLVMValueRef +(wrap-defcfun ("LLVMBuildExtractValue" LLVMBuildExtractValue) LLVMValueRef (arg0 LLVMBuilderRef) (AggVal LLVMValueRef) (Index :unsigned-int) (Name :string)) -(cffi:defcfun ("LLVMBuildInsertValue" LLVMBuildInsertValue) LLVMValueRef +(wrap-defcfun ("LLVMBuildInsertValue" LLVMBuildInsertValue) LLVMValueRef (arg0 LLVMBuilderRef) (AggVal LLVMValueRef) (EltVal LLVMValueRef) (Index :unsigned-int) (Name :string)) -(cffi:defcfun ("LLVMBuildIsNull" LLVMBuildIsNull) LLVMValueRef +(wrap-defcfun ("LLVMBuildIsNull" LLVMBuildIsNull) LLVMValueRef (arg0 LLVMBuilderRef) (Val LLVMValueRef) (Name :string)) -(cffi:defcfun ("LLVMBuildIsNotNull" LLVMBuildIsNotNull) LLVMValueRef +(wrap-defcfun ("LLVMBuildIsNotNull" LLVMBuildIsNotNull) LLVMValueRef (arg0 LLVMBuilderRef) (Val LLVMValueRef) (Name :string)) -(cffi:defcfun ("LLVMBuildPtrDiff" LLVMBuildPtrDiff) LLVMValueRef +(wrap-defcfun ("LLVMBuildPtrDiff" LLVMBuildPtrDiff) LLVMValueRef (arg0 LLVMBuilderRef) (LHS LLVMValueRef) (RHS LLVMValueRef) (Name :string)) -(cffi:defcfun ("LLVMCreateModuleProviderForExistingModule" LLVMCreateModuleProviderForExistingModule) LLVMModuleProviderRef +(wrap-defcfun ("LLVMCreateModuleProviderForExistingModule" LLVMCreateModuleProviderForExistingModule) LLVMModuleProviderRef (M LLVMModuleRef)) -(cffi:defcfun ("LLVMDisposeModuleProvider" LLVMDisposeModuleProvider) :void +(wrap-defcfun ("LLVMDisposeModuleProvider" LLVMDisposeModuleProvider) :void (MP LLVMModuleProviderRef)) -(cffi:defcfun ("LLVMCreateMemoryBufferWithContentsOfFile" LLVMCreateMemoryBufferWithContentsOfFile) :boolean +(wrap-defcfun ("LLVMCreateMemoryBufferWithContentsOfFile" LLVMCreateMemoryBufferWithContentsOfFile) :boolean (Path :string) (OutMemBuf :pointer) (OutMessage :pointer)) -(cffi:defcfun ("LLVMCreateMemoryBufferWithSTDIN" LLVMCreateMemoryBufferWithSTDIN) :boolean +(wrap-defcfun ("LLVMCreateMemoryBufferWithSTDIN" LLVMCreateMemoryBufferWithSTDIN) :boolean (OutMemBuf :pointer) (OutMessage :pointer)) -(cffi:defcfun ("LLVMDisposeMemoryBuffer" LLVMDisposeMemoryBuffer) :void +(wrap-defcfun ("LLVMDisposeMemoryBuffer" LLVMDisposeMemoryBuffer) :void (MemBuf LLVMMemoryBufferRef)) -(cffi:defcfun ("LLVMCreatePassManager" LLVMCreatePassManager) LLVMPassManagerRef) +(wrap-defcfun ("LLVMCreatePassManager" LLVMCreatePassManager) LLVMPassManagerRef) -(cffi:defcfun ("LLVMCreateFunctionPassManager" LLVMCreateFunctionPassManager) LLVMPassManagerRef +(wrap-defcfun ("LLVMCreateFunctionPassManager" LLVMCreateFunctionPassManager) LLVMPassManagerRef (MP LLVMModuleProviderRef)) -(cffi:defcfun ("LLVMRunPassManager" LLVMRunPassManager) :boolean +(wrap-defcfun ("LLVMRunPassManager" LLVMRunPassManager) :boolean (PM LLVMPassManagerRef) (M LLVMModuleRef)) -(cffi:defcfun ("LLVMInitializeFunctionPassManager" LLVMInitializeFunctionPassManager) :boolean +(wrap-defcfun ("LLVMInitializeFunctionPassManager" LLVMInitializeFunctionPassManager) :boolean (FPM LLVMPassManagerRef)) -(cffi:defcfun ("LLVMRunFunctionPassManager" LLVMRunFunctionPassManager) :boolean +(wrap-defcfun ("LLVMRunFunctionPassManager" LLVMRunFunctionPassManager) :boolean (FPM LLVMPassManagerRef) (F LLVMValueRef)) -(cffi:defcfun ("LLVMFinalizeFunctionPassManager" LLVMFinalizeFunctionPassManager) :boolean +(wrap-defcfun ("LLVMFinalizeFunctionPassManager" LLVMFinalizeFunctionPassManager) :boolean (FPM LLVMPassManagerRef)) -(cffi:defcfun ("LLVMDisposePassManager" LLVMDisposePassManager) :void +(wrap-defcfun ("LLVMDisposePassManager" LLVMDisposePassManager) :void (PM LLVMPassManagerRef)) ;;; The wrappers to expose the "InContext" versions of the functions @@ -1860,19 +1875,19 @@ add multiple incoming values." (with-array-and-length (array len vals) (%LLVMBuildAggregateRet builder array len))) -(defun LLVMBuildInvoke (builder fn args then catch name) +(defun LLVMBuildInvoke (builder fn args then catch &optional (name "")) (with-array-and-length (array len args) (%LLVMBuildInvoke builder fn array len then catch name))) -(defun LLVMBuildGEP (builder ptr indices name) +(defun LLVMBuildGEP (builder ptr indices &optional (name "")) (with-array-and-length (array len indices) (%LLVMBuildGEP builder ptr array len name))) -(defun LLVMBuildInBoundsGEP (builder ptr indices name) +(defun LLVMBuildInBoundsGEP (builder ptr indices &optional (name "")) (with-array-and-length (array len indices) (%LLVMBuildInBoundsGEP builder ptr array len name))) -(defun LLVMBuildCall (builder fn args name) +(defun LLVMBuildCall (builder fn args &optional (name "")) "Combines the C API's Args array and NumArgs arguments into a single list ARGS." (with-array-and-length (array len args) diff --git a/src/generated/llvm-extras.lisp b/src/generated/llvm-extras.lisp index 30d484c..dff0b5e 100644 --- a/src/generated/llvm-extras.lisp +++ b/src/generated/llvm-extras.lisp @@ -49,4 +49,8 @@ (cffi:defcfun ("CLLLVM_LLVMGetRetAttr" LLVMGetRetAttr) LLVMAttribute (Fn LLVMValueRef)) +(cffi:defcfun ("CLLLVM_AddPrintAsmPass" CLLLVM_AddPrintAsmPass) :void + (PM LLVMPassManagerRef) + (Banner :string)) + diff --git a/src/llvm-extras.cpp b/src/llvm-extras.cpp index 2348bb6..79edf56 100644 --- a/src/llvm-extras.cpp +++ b/src/llvm-extras.cpp @@ -4,6 +4,8 @@ #include #include #include +#include +#include #ifndef SWIG using namespace llvm; @@ -98,4 +100,8 @@ LLVMAttribute CLLLVM_LLVMGetRetAttr(LLVMValueRef Fn) { return (LLVMAttribute)attr; } +void CLLLVM_AddPrintAsmPass(LLVMPassManagerRef PM, char *Banner) { + unwrap(PM)->add(createMachineFunctionPrinterPass(errs(), Banner)); +} + } diff --git a/src/stuff.lisp b/src/stuff.lisp index 266deef..caf9365 100644 --- a/src/stuff.lisp +++ b/src/stuff.lisp @@ -1,4 +1,10 @@ (in-package :llvm) + +;; Enable verbose assembly output from codegen +;(cffi::defcvar ("_ZN4llvm16PrintMachineCodeE" *print-machine-code*) :boolean) +;(setf *print-machine-code* t) + + ;; Load up the native codegen. (CLLLVM_LLVMInitializeNativeTarget) -- 2.11.4.GIT