Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
LLVM.FFI.Core
Contents
Description
Raw.Module: LLVM.FFI.Core Copyright: Bryan O'Sullivan 2007, 2008 License: BSD-style (see the file LICENSE)
Maintainer: [email protected] Stability: experimental Portability: requires GHC 6.8, LLVM
This module provides direct access to the LLVM C bindings.
Synopsis
- initializeCore :: PassRegistryRef -> IO ()
- version :: Int
- newtype Bool = Bool Int32
- false :: Bool
- true :: Bool
- consBool :: Bool -> Bool
- deconsBool :: Bool -> Bool
- disposeMessage :: CString -> IO ()
- data Context
- type ContextRef = Ptr Context
- contextCreate :: IO ContextRef
- contextDispose :: ContextRef -> IO ()
- getGlobalContext :: IO ContextRef
- getMDKindID :: CString -> CUInt -> IO CUInt
- getMDKindIDInContext :: ContextRef -> CString -> CUInt -> IO CUInt
- data Module
- type ModuleRef = Ptr Module
- moduleCreateWithName :: CString -> IO ModuleRef
- moduleCreateWithNameInContext :: CString -> ContextRef -> IO ModuleRef
- disposeModule :: ModuleRef -> IO ()
- ptrDisposeModule :: FinalizerPtr Module
- getDataLayout :: ModuleRef -> IO CString
- setDataLayout :: ModuleRef -> CString -> IO ()
- getTarget :: ModuleRef -> IO CString
- setTarget :: ModuleRef -> CString -> IO ()
- defaultTargetTriple :: String
- hostTriple :: String
- dumpModule :: ModuleRef -> IO ()
- setModuleInlineAsm :: ModuleRef -> CString -> IO ()
- getModuleContext :: ModuleRef -> IO ContextRef
- data Type
- type TypeRef = Ptr Type
- data TypeKind
- getTypeKind :: TypeRef -> IO TypeKind
- typeIsSized :: TypeRef -> IO Bool
- getTypeContext :: TypeRef -> IO ContextRef
- int1TypeInContext :: ContextRef -> IO TypeRef
- int8TypeInContext :: ContextRef -> IO TypeRef
- int16TypeInContext :: ContextRef -> IO TypeRef
- int32TypeInContext :: ContextRef -> IO TypeRef
- int64TypeInContext :: ContextRef -> IO TypeRef
- intTypeInContext :: ContextRef -> CUInt -> IO TypeRef
- int1Type :: IO TypeRef
- int8Type :: IO TypeRef
- int16Type :: IO TypeRef
- int32Type :: IO TypeRef
- int64Type :: IO TypeRef
- integerType :: CUInt -> IO TypeRef
- getIntTypeWidth :: TypeRef -> IO CUInt
- floatTypeInContext :: ContextRef -> IO TypeRef
- doubleTypeInContext :: ContextRef -> IO TypeRef
- x86FP80TypeInContext :: ContextRef -> IO TypeRef
- fp128TypeInContext :: ContextRef -> IO TypeRef
- ppcFP128TypeInContext :: ContextRef -> IO TypeRef
- floatType :: IO TypeRef
- doubleType :: IO TypeRef
- x86FP80Type :: IO TypeRef
- fp128Type :: IO TypeRef
- ppcFP128Type :: IO TypeRef
- functionType :: TypeRef -> Ptr TypeRef -> CUInt -> Bool -> IO TypeRef
- isFunctionVarArg :: TypeRef -> IO Bool
- getReturnType :: TypeRef -> IO TypeRef
- countParamTypes :: TypeRef -> IO CUInt
- getParamTypes :: TypeRef -> Ptr TypeRef -> IO ()
- structTypeInContext :: ContextRef -> Ptr TypeRef -> CUInt -> Bool -> IO TypeRef
- structType :: Ptr TypeRef -> CUInt -> Bool -> IO TypeRef
- structCreateNamed :: ContextRef -> CString -> IO TypeRef
- getStructName :: TypeRef -> IO CString
- structSetBody :: TypeRef -> Ptr TypeRef -> CUInt -> Bool -> IO ()
- countStructElementTypes :: TypeRef -> IO CUInt
- getStructElementTypes :: TypeRef -> Ptr TypeRef -> IO ()
- isPackedStruct :: TypeRef -> IO Bool
- isOpaqueStruct :: TypeRef -> IO Bool
- getTypeByName :: ModuleRef -> CString -> IO TypeRef
- arrayType :: TypeRef -> CUInt -> IO TypeRef
- pointerType :: TypeRef -> CUInt -> IO TypeRef
- vectorType :: TypeRef -> CUInt -> IO TypeRef
- getElementType :: TypeRef -> IO TypeRef
- getArrayLength :: TypeRef -> IO CUInt
- getPointerAddressSpace :: TypeRef -> IO CUInt
- getVectorSize :: TypeRef -> IO CUInt
- voidTypeInContext :: ContextRef -> IO TypeRef
- labelTypeInContext :: ContextRef -> IO TypeRef
- x86MMXTypeInContext :: ContextRef -> IO TypeRef
- voidType :: IO TypeRef
- labelType :: IO TypeRef
- x86MMXType :: IO TypeRef
- data Value
- type ValueRef = Ptr Value
- typeOf :: ValueRef -> IO TypeRef
- getValueName :: ValueRef -> IO CString
- setValueName :: ValueRef -> CString -> IO ()
- dumpValue :: ValueRef -> IO ()
- replaceAllUsesWith :: ValueRef -> ValueRef -> IO ()
- hasMetadata :: ValueRef -> IO Bool
- getMetadata :: ValueRef -> CUInt -> IO ValueRef
- setMetadata :: ValueRef -> CUInt -> ValueRef -> IO ()
- data OpaqueUse
- type UseRef = Ptr OpaqueUse
- getFirstUse :: ValueRef -> IO UseRef
- getNextUse :: UseRef -> IO UseRef
- getUser :: UseRef -> IO ValueRef
- getUsedValue :: UseRef -> IO ValueRef
- getOperand :: ValueRef -> CUInt -> IO ValueRef
- setOperand :: ValueRef -> CUInt -> ValueRef -> IO ()
- getNumOperands :: ValueRef -> IO CUInt
- constNull :: TypeRef -> IO ValueRef
- constAllOnes :: TypeRef -> IO ValueRef
- getUndef :: TypeRef -> IO ValueRef
- isConstant :: ValueRef -> IO Bool
- isNull :: ValueRef -> IO Bool
- isUndef :: ValueRef -> IO Bool
- constPointerNull :: TypeRef -> IO ValueRef
- mDStringInContext :: ContextRef -> CString -> CUInt -> IO ValueRef
- mDString :: CString -> CUInt -> IO ValueRef
- mDNodeInContext :: ContextRef -> Ptr ValueRef -> CUInt -> IO ValueRef
- mDNode :: Ptr ValueRef -> CUInt -> IO ValueRef
- getMDString :: ValueRef -> Ptr CUInt -> IO CString
- getNamedMetadataNumOperands :: ModuleRef -> CString -> IO CUInt
- getNamedMetadataOperands :: ModuleRef -> CString -> Ptr ValueRef -> IO ()
- constInt :: TypeRef -> CULLong -> Bool -> IO ValueRef
- constIntOfArbitraryPrecision :: TypeRef -> CUInt -> Ptr Word64 -> IO ValueRef
- constIntOfString :: TypeRef -> CString -> Word8 -> IO ValueRef
- constIntOfStringAndSize :: TypeRef -> CString -> CUInt -> Word8 -> IO ValueRef
- constReal :: TypeRef -> CDouble -> IO ValueRef
- constRealOfString :: TypeRef -> CString -> IO ValueRef
- constRealOfStringAndSize :: TypeRef -> CString -> CUInt -> IO ValueRef
- constIntGetZExtValue :: ValueRef -> IO CULLong
- constIntGetSExtValue :: ValueRef -> IO CLLong
- constStringInContext :: ContextRef -> CString -> CUInt -> Bool -> IO ValueRef
- constStructInContext :: ContextRef -> Ptr ValueRef -> CUInt -> Bool -> IO ValueRef
- constString :: CString -> CUInt -> Bool -> IO ValueRef
- constArray :: TypeRef -> Ptr ValueRef -> CUInt -> IO ValueRef
- constStruct :: Ptr ValueRef -> CUInt -> Bool -> IO ValueRef
- constNamedStruct :: TypeRef -> Ptr ValueRef -> CUInt -> IO ValueRef
- constVector :: Ptr ValueRef -> CUInt -> IO ValueRef
- getConstOpcode :: ValueRef -> IO Opcode
- alignOf :: TypeRef -> IO ValueRef
- sizeOf :: TypeRef -> IO ValueRef
- constNeg :: ValueRef -> IO ValueRef
- constNUWNeg :: ValueRef -> IO ValueRef
- constNSWNeg :: ValueRef -> IO ValueRef
- constNot :: ValueRef -> IO ValueRef
- constAdd :: ValueRef -> ValueRef -> IO ValueRef
- constNSWAdd :: ValueRef -> ValueRef -> IO ValueRef
- constNUWAdd :: ValueRef -> ValueRef -> IO ValueRef
- constSub :: ValueRef -> ValueRef -> IO ValueRef
- constNSWSub :: ValueRef -> ValueRef -> IO ValueRef
- constNUWSub :: ValueRef -> ValueRef -> IO ValueRef
- constMul :: ValueRef -> ValueRef -> IO ValueRef
- constNSWMul :: ValueRef -> ValueRef -> IO ValueRef
- constNUWMul :: ValueRef -> ValueRef -> IO ValueRef
- constAnd :: ValueRef -> ValueRef -> IO ValueRef
- constOr :: ValueRef -> ValueRef -> IO ValueRef
- constXor :: ValueRef -> ValueRef -> IO ValueRef
- constICmp :: IntPredicate -> ValueRef -> ValueRef -> IO ValueRef
- constFCmp :: RealPredicate -> ValueRef -> ValueRef -> IO ValueRef
- constShl :: ValueRef -> ValueRef -> IO ValueRef
- constLShr :: ValueRef -> ValueRef -> IO ValueRef
- constAShr :: ValueRef -> ValueRef -> IO ValueRef
- constGEP2 :: TypeRef -> ValueRef -> Ptr ValueRef -> CUInt -> IO ValueRef
- constInBoundsGEP2 :: TypeRef -> ValueRef -> Ptr ValueRef -> CUInt -> IO ValueRef
- constTrunc :: ValueRef -> TypeRef -> IO ValueRef
- constSExt :: ValueRef -> TypeRef -> IO ValueRef
- constZExt :: ValueRef -> TypeRef -> IO ValueRef
- constFPTrunc :: ValueRef -> TypeRef -> IO ValueRef
- constFPExt :: ValueRef -> TypeRef -> IO ValueRef
- constUIToFP :: ValueRef -> TypeRef -> IO ValueRef
- constSIToFP :: ValueRef -> TypeRef -> IO ValueRef
- constFPToUI :: ValueRef -> TypeRef -> IO ValueRef
- constFPToSI :: ValueRef -> TypeRef -> IO ValueRef
- constPtrToInt :: ValueRef -> TypeRef -> IO ValueRef
- constIntToPtr :: ValueRef -> TypeRef -> IO ValueRef
- constBitCast :: ValueRef -> TypeRef -> IO ValueRef
- constZExtOrBitCast :: ValueRef -> TypeRef -> IO ValueRef
- constSExtOrBitCast :: ValueRef -> TypeRef -> IO ValueRef
- constTruncOrBitCast :: ValueRef -> TypeRef -> IO ValueRef
- constPointerCast :: ValueRef -> TypeRef -> IO ValueRef
- constIntCast :: ValueRef -> TypeRef -> Bool -> IO ValueRef
- constFPCast :: ValueRef -> TypeRef -> IO ValueRef
- constSelect :: ValueRef -> ValueRef -> ValueRef -> IO ValueRef
- constExtractElement :: ValueRef -> ValueRef -> IO ValueRef
- constInsertElement :: ValueRef -> ValueRef -> ValueRef -> IO ValueRef
- constShuffleVector :: ValueRef -> ValueRef -> ValueRef -> IO ValueRef
- constInlineAsm :: TypeRef -> CString -> CString -> Bool -> Bool -> IO ValueRef
- blockAddress :: ValueRef -> BasicBlockRef -> IO ValueRef
- data IntPredicate
- fromIntPredicate :: IntPredicate -> IntPredicate
- toIntPredicate :: IntPredicate -> IntPredicate
- data FPPredicate
- fromRealPredicate :: FPPredicate -> RealPredicate
- toRealPredicate :: RealPredicate -> FPPredicate
- setFastMath :: ValueRef -> Bool -> IO ()
- setHasUnsafeAlgebra :: ValueRef -> Bool -> IO ()
- setHasNoNaNs :: ValueRef -> Bool -> IO ()
- setHasNoInfs :: ValueRef -> Bool -> IO ()
- setHasNoSignedZeros :: ValueRef -> Bool -> IO ()
- setHasAllowReciprocal :: ValueRef -> Bool -> IO ()
- setHasAllowReassoc :: ValueRef -> Bool -> IO ()
- setHasApproxFunc :: ValueRef -> Bool -> IO ()
- data Linkage
- = ExternalLinkage
- | AvailableExternallyLinkage
- | LinkOnceAnyLinkage
- | LinkOnceODRLinkage
- | LinkOnceODRAutoHideLinkage
- | WeakAnyLinkage
- | WeakODRLinkage
- | AppendingLinkage
- | InternalLinkage
- | PrivateLinkage
- | DLLImportLinkage
- | DLLExportLinkage
- | ExternalWeakLinkage
- | GhostLinkage
- | CommonLinkage
- | LinkerPrivateLinkage
- | LinkerPrivateWeakLinkage
- fromLinkage :: Linkage -> Linkage
- toLinkage :: Linkage -> Linkage
- data Visibility
- fromVisibility :: Visibility -> Visibility
- toVisibility :: Visibility -> Visibility
- getGlobalParent :: ValueRef -> IO ModuleRef
- isDeclaration :: ValueRef -> IO Bool
- getLinkage :: ValueRef -> IO Linkage
- setLinkage :: ValueRef -> Linkage -> IO ()
- getSection :: ValueRef -> IO CString
- setSection :: ValueRef -> CString -> IO ()
- getVisibility :: ValueRef -> IO Visibility
- setVisibility :: ValueRef -> Visibility -> IO ()
- getAlignment :: ValueRef -> IO CUInt
- setAlignment :: ValueRef -> CUInt -> IO ()
- addGlobal :: ModuleRef -> TypeRef -> CString -> IO ValueRef
- addGlobalInAddressSpace :: ModuleRef -> TypeRef -> CString -> CUInt -> IO ValueRef
- getNamedGlobal :: ModuleRef -> CString -> IO ValueRef
- getFirstGlobal :: ModuleRef -> IO ValueRef
- getLastGlobal :: ModuleRef -> IO ValueRef
- getNextGlobal :: ValueRef -> IO ValueRef
- getPreviousGlobal :: ValueRef -> IO ValueRef
- deleteGlobal :: ValueRef -> IO ()
- getInitializer :: ValueRef -> IO ValueRef
- setInitializer :: ValueRef -> ValueRef -> IO ()
- isThreadLocal :: ValueRef -> IO Bool
- setThreadLocal :: ValueRef -> Bool -> IO ()
- isGlobalConstant :: ValueRef -> IO Bool
- setGlobalConstant :: ValueRef -> Bool -> IO ()
- addAlias2 :: ModuleRef -> TypeRef -> CUInt -> ValueRef -> CString -> IO ValueRef
- data Attribute
- type AttributeRef = Ptr Attribute
- newtype AttributeKind = AttributeKind CUInt
- data CallingConvention
- = C
- | Fast
- | Cold
- | X86StdCall
- | X86FastCall
- | GHC
- fromCallingConvention :: CallingConvention -> CallingConvention
- toCallingConvention :: CallingConvention -> CallingConvention
- addFunction :: ModuleRef -> CString -> TypeRef -> IO FunctionRef
- getNamedFunction :: ModuleRef -> CString -> IO FunctionRef
- getFirstFunction :: ModuleRef -> IO ValueRef
- getLastFunction :: ModuleRef -> IO ValueRef
- getNextFunction :: ValueRef -> IO ValueRef
- getPreviousFunction :: ValueRef -> IO ValueRef
- deleteFunction :: FunctionRef -> IO ()
- getIntrinsicID :: FunctionRef -> IO CUInt
- getFunctionCallConv :: FunctionRef -> IO CallingConvention
- setFunctionCallConv :: FunctionRef -> CallingConvention -> IO ()
- getGC :: ValueRef -> IO CString
- setGC :: ValueRef -> CString -> IO ()
- newtype AttributeIndex = AttributeIndex Word32
- attributeReturnIndex :: AttributeIndex
- attributeFunctionIndex :: AttributeIndex
- getEnumAttributeKindForName :: CString -> CSize -> IO AttributeKind
- getLastEnumAttributeKind :: IO AttributeKind
- createEnumAttribute :: ContextRef -> AttributeKind -> Word64 -> IO AttributeRef
- getEnumAttributeKind :: AttributeRef -> IO AttributeKind
- getEnumAttributeValue :: AttributeRef -> IO Word64
- createStringAttribute :: ContextRef -> CString -> CUInt -> CString -> CUInt -> IO AttributeRef
- getStringAttributeKind :: AttributeRef -> Ptr CUInt -> IO CString
- getStringAttributeValue :: AttributeRef -> Ptr CUInt -> IO CString
- isEnumAttribute :: AttributeRef -> IO Bool
- isStringAttribute :: AttributeRef -> IO Bool
- addAttributeAtIndex :: ValueRef -> AttributeIndex -> AttributeRef -> IO ()
- getAttributeCountAtIndex :: ValueRef -> AttributeIndex -> IO CUInt
- getAttributesAtIndex :: ValueRef -> AttributeIndex -> Ptr AttributeRef -> IO ()
- getEnumAttributeAtIndex :: ValueRef -> AttributeIndex -> AttributeKind -> IO AttributeRef
- getStringAttributeAtIndex :: ValueRef -> AttributeIndex -> CString -> CUInt -> IO AttributeRef
- removeEnumAttributeAtIndex :: ValueRef -> AttributeIndex -> AttributeKind -> IO ()
- removeStringAttributeAtIndex :: ValueRef -> AttributeIndex -> CString -> CUInt -> IO ()
- addTargetDependentFunctionAttr :: ValueRef -> CString -> CString -> IO ()
- addCallSiteAttribute :: ValueRef -> AttributeIndex -> AttributeRef -> IO ()
- getCallSiteAttributeCount :: ValueRef -> AttributeIndex -> IO CUInt
- getCallSiteAttributes :: ValueRef -> AttributeIndex -> Ptr AttributeRef -> IO ()
- getCallSiteEnumAttribute :: ValueRef -> AttributeIndex -> AttributeKind -> IO AttributeRef
- getCallSiteStringAttribute :: ValueRef -> AttributeIndex -> CString -> CUInt -> IO AttributeRef
- removeCallSiteEnumAttribute :: ValueRef -> AttributeIndex -> AttributeKind -> IO ()
- removeCallSiteStringAttribute :: ValueRef -> AttributeIndex -> CString -> CUInt -> IO ()
- getCalledValue :: ValueRef -> IO ValueRef
- countParams :: FunctionRef -> IO CUInt
- getParams :: FunctionRef -> Ptr ValueRef -> IO ()
- getParam :: FunctionRef -> CUInt -> IO ValueRef
- getParamParent :: ValueRef -> IO ValueRef
- getFirstParam :: ValueRef -> IO ValueRef
- getLastParam :: ValueRef -> IO ValueRef
- getNextParam :: ValueRef -> IO ValueRef
- getPreviousParam :: ValueRef -> IO ValueRef
- setParamAlignment :: ValueRef -> CUInt -> IO ()
- data BasicBlock
- type BasicBlockRef = Ptr BasicBlock
- basicBlockAsValue :: BasicBlockRef -> IO ValueRef
- valueIsBasicBlock :: ValueRef -> IO Bool
- valueAsBasicBlock :: ValueRef -> IO BasicBlockRef
- getBasicBlockName :: BasicBlockRef -> IO CString
- getBasicBlockParent :: BasicBlockRef -> IO ValueRef
- getBasicBlockTerminator :: BasicBlockRef -> IO ValueRef
- countBasicBlocks :: ValueRef -> IO CUInt
- getBasicBlocks :: ValueRef -> Ptr BasicBlockRef -> IO ()
- getFirstBasicBlock :: ValueRef -> IO BasicBlockRef
- getLastBasicBlock :: ValueRef -> IO BasicBlockRef
- getNextBasicBlock :: BasicBlockRef -> IO BasicBlockRef
- getPreviousBasicBlock :: BasicBlockRef -> IO BasicBlockRef
- getEntryBasicBlock :: ValueRef -> IO BasicBlockRef
- appendBasicBlockInContext :: ContextRef -> ValueRef -> CString -> IO BasicBlockRef
- insertBasicBlockInContext :: ContextRef -> BasicBlockRef -> CString -> IO BasicBlockRef
- appendBasicBlock :: ValueRef -> CString -> IO BasicBlockRef
- insertBasicBlock :: BasicBlockRef -> CString -> IO BasicBlockRef
- deleteBasicBlock :: BasicBlockRef -> IO ()
- removeBasicBlockFromParent :: BasicBlockRef -> IO ()
- moveBasicBlockBefore :: BasicBlockRef -> BasicBlockRef -> IO ()
- moveBasicBlockAfter :: BasicBlockRef -> BasicBlockRef -> IO ()
- getFirstInstruction :: BasicBlockRef -> IO ValueRef
- getLastInstruction :: BasicBlockRef -> IO ValueRef
- getInstructionParent :: ValueRef -> IO BasicBlockRef
- getNextInstruction :: ValueRef -> IO ValueRef
- getPreviousInstruction :: ValueRef -> IO ValueRef
- instructionEraseFromParent :: ValueRef -> IO ()
- getInstructionOpcode :: ValueRef -> IO Opcode
- getICmpPredicate :: ValueRef -> IO IntPredicate
- getInstructionCallConv :: ValueRef -> IO CallingConvention
- setInstructionCallConv :: ValueRef -> CallingConvention -> IO ()
- setInstrParamAlignment :: ValueRef -> AttributeIndex -> CUInt -> IO ()
- isTailCall :: ValueRef -> IO Bool
- setTailCall :: ValueRef -> Bool -> IO ()
- getSwitchDefaultDest :: ValueRef -> IO BasicBlockRef
- addIncoming :: ValueRef -> Ptr ValueRef -> Ptr BasicBlockRef -> CUInt -> IO ()
- countIncoming :: ValueRef -> IO CUInt
- getIncomingValue :: ValueRef -> CUInt -> IO ValueRef
- getIncomingBlock :: ValueRef -> CUInt -> IO BasicBlockRef
- data Builder
- type BuilderRef = Ptr Builder
- createBuilderInContext :: ContextRef -> IO BuilderRef
- createBuilder :: IO BuilderRef
- positionBuilder :: BuilderRef -> BasicBlockRef -> ValueRef -> IO ()
- positionBefore :: BuilderRef -> ValueRef -> IO ()
- positionAtEnd :: BuilderRef -> BasicBlockRef -> IO ()
- getInsertBlock :: BuilderRef -> IO BasicBlockRef
- clearInsertionPosition :: BuilderRef -> IO ()
- insertIntoBuilder :: BuilderRef -> ValueRef -> IO ()
- insertIntoBuilderWithName :: BuilderRef -> ValueRef -> CString -> IO ()
- ptrDisposeBuilder :: FinalizerPtr Builder
- setCurrentDebugLocation :: BuilderRef -> ValueRef -> IO ()
- getCurrentDebugLocation :: BuilderRef -> IO ValueRef
- setInstDebugLocation :: BuilderRef -> ValueRef -> IO ()
- buildRetVoid :: BuilderRef -> IO ValueRef
- buildRet :: BuilderRef -> ValueRef -> IO ValueRef
- buildAggregateRet :: BuilderRef -> Ptr ValueRef -> CUInt -> IO ValueRef
- buildBr :: BuilderRef -> BasicBlockRef -> IO ValueRef
- buildCondBr :: BuilderRef -> ValueRef -> BasicBlockRef -> BasicBlockRef -> IO ValueRef
- buildSwitch :: BuilderRef -> ValueRef -> BasicBlockRef -> CUInt -> IO ValueRef
- buildIndirectBr :: BuilderRef -> ValueRef -> CUInt -> IO ValueRef
- buildInvoke2 :: BuilderRef -> TypeRef -> ValueRef -> Ptr ValueRef -> CUInt -> BasicBlockRef -> BasicBlockRef -> CString -> IO ValueRef
- buildLandingPad :: BuilderRef -> TypeRef -> ValueRef -> CUInt -> CString -> IO ValueRef
- buildResume :: BuilderRef -> ValueRef -> IO ValueRef
- buildUnreachable :: BuilderRef -> IO ValueRef
- addCase :: ValueRef -> ValueRef -> BasicBlockRef -> IO ()
- addDestination :: ValueRef -> BasicBlockRef -> IO ()
- addClause :: ValueRef -> ValueRef -> IO ()
- setCleanup :: ValueRef -> Bool -> IO ()
- buildAdd :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildNSWAdd :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildNUWAdd :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildFAdd :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildSub :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildNSWSub :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildNUWSub :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildFSub :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildMul :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildNSWMul :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildNUWMul :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildFMul :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildUDiv :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildSDiv :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildExactSDiv :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildFDiv :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildURem :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildSRem :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildFRem :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildShl :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildLShr :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildAShr :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildAnd :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildOr :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildXor :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildBinOp :: BuilderRef -> Opcode -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildNeg :: BuilderRef -> ValueRef -> CString -> IO ValueRef
- buildNSWNeg :: BuilderRef -> ValueRef -> CString -> IO ValueRef
- buildNUWNeg :: BuilderRef -> ValueRef -> CString -> IO ValueRef
- buildFNeg :: BuilderRef -> ValueRef -> CString -> IO ValueRef
- buildNot :: BuilderRef -> ValueRef -> CString -> IO ValueRef
- buildMalloc :: BuilderRef -> TypeRef -> CString -> IO ValueRef
- buildArrayMalloc :: BuilderRef -> TypeRef -> ValueRef -> CString -> IO ValueRef
- buildAlloca :: BuilderRef -> TypeRef -> CString -> IO ValueRef
- buildArrayAlloca :: BuilderRef -> TypeRef -> ValueRef -> CString -> IO ValueRef
- buildFree :: BuilderRef -> ValueRef -> IO ValueRef
- buildLoad2 :: BuilderRef -> TypeRef -> ValueRef -> CString -> IO ValueRef
- buildStore :: BuilderRef -> ValueRef -> ValueRef -> IO ValueRef
- buildGEP2 :: BuilderRef -> TypeRef -> ValueRef -> Ptr ValueRef -> CUInt -> CString -> IO ValueRef
- buildInBoundsGEP2 :: BuilderRef -> TypeRef -> ValueRef -> Ptr ValueRef -> CUInt -> CString -> IO ValueRef
- buildStructGEP2 :: BuilderRef -> TypeRef -> ValueRef -> CUInt -> CString -> IO ValueRef
- buildGlobalString :: BuilderRef -> CString -> CString -> IO ValueRef
- buildGlobalStringPtr :: BuilderRef -> CString -> CString -> IO ValueRef
- buildTrunc :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
- buildZExt :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
- buildSExt :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
- buildFPToUI :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
- buildFPToSI :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
- buildUIToFP :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
- buildSIToFP :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
- buildFPTrunc :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
- buildFPExt :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
- buildPtrToInt :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
- buildIntToPtr :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
- buildBitCast :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
- buildZExtOrBitCast :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
- buildSExtOrBitCast :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
- buildTruncOrBitCast :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
- buildCast :: BuilderRef -> Opcode -> ValueRef -> TypeRef -> CString -> IO ValueRef
- buildPointerCast :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
- buildIntCast :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
- buildFPCast :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
- buildICmp :: BuilderRef -> IntPredicate -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildFCmp :: BuilderRef -> RealPredicate -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildPhi :: BuilderRef -> TypeRef -> CString -> IO ValueRef
- buildCall2 :: BuilderRef -> TypeRef -> ValueRef -> Ptr ValueRef -> CUInt -> CString -> IO ValueRef
- buildSelect :: BuilderRef -> ValueRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildVAArg :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
- buildExtractElement :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildInsertElement :: BuilderRef -> ValueRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildShuffleVector :: BuilderRef -> ValueRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildExtractValue :: BuilderRef -> ValueRef -> CUInt -> CString -> IO ValueRef
- buildInsertValue :: BuilderRef -> ValueRef -> ValueRef -> CUInt -> CString -> IO ValueRef
- buildIsNull :: BuilderRef -> ValueRef -> CString -> IO ValueRef
- buildIsNotNull :: BuilderRef -> ValueRef -> CString -> IO ValueRef
- buildPtrDiff2 :: BuilderRef -> TypeRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
- data MemoryBuffer
- type MemoryBufferRef = Ptr MemoryBuffer
- createMemoryBufferWithContentsOfFile :: CString -> Ptr MemoryBufferRef -> Ptr CString -> IO Bool
- createMemoryBufferWithSTDIN :: Ptr MemoryBufferRef -> Ptr CString -> IO Bool
- disposeMemoryBuffer :: MemoryBufferRef -> IO ()
- data PassRegistry
- type PassRegistryRef = Ptr PassRegistry
- getGlobalPassRegistry :: IO PassRegistryRef
- data PassManager
- type PassManagerRef = Ptr PassManager
- ptrDisposePassManager :: FinalizerPtr PassManager
- createPassManager :: IO PassManagerRef
- createFunctionPassManagerForModule :: ModuleRef -> IO PassManagerRef
- runPassManager :: PassManagerRef -> ModuleRef -> IO Bool
- initializeFunctionPassManager :: PassManagerRef -> IO Bool
- runFunctionPassManager :: PassManagerRef -> ValueRef -> IO Bool
- finalizeFunctionPassManager :: PassManagerRef -> IO Bool
- disposePassManager :: PassManagerRef -> IO ()
- getNumUses :: ValueRef -> IO CInt
- instGetOpcode :: ValueRef -> IO CInt
- cmpInstGetIntPredicate :: ValueRef -> IO IntPredicate
- cmpInstGetRealPredicate :: ValueRef -> IO RealPredicate
Documentation
initializeCore :: PassRegistryRef -> IO () Source #
Boolean values
deconsBool :: Bool -> Bool Source #
Error handling
disposeMessage :: CString -> IO () Source #
Raw.Context functions
type ContextRef = Ptr Context Source #
contextDispose :: ContextRef -> IO () Source #
getMDKindID :: CString -> CUInt -> IO CUInt Source #
getMDKindIDInContext :: ContextRef -> CString -> CUInt -> IO CUInt Source #
Modules
disposeModule :: ModuleRef -> IO () Source #
ptrDisposeModule :: FinalizerPtr Module Source #
hostTriple :: String Source #
dumpModule :: ModuleRef -> IO () Source #
getModuleContext :: ModuleRef -> IO ContextRef Source #
Types
Constructors
Instances
Bounded TypeKind Source # | |
Enum TypeKind Source # | |
Eq TypeKind Source # | |
Ord TypeKind Source # | |
Defined in LLVM.FFI.Core | |
Read TypeKind Source # | |
Show TypeKind Source # | |
getTypeContext :: TypeRef -> IO ContextRef Source #
Integer types
int1TypeInContext :: ContextRef -> IO TypeRef Source #
int8TypeInContext :: ContextRef -> IO TypeRef Source #
int16TypeInContext :: ContextRef -> IO TypeRef Source #
int32TypeInContext :: ContextRef -> IO TypeRef Source #
int64TypeInContext :: ContextRef -> IO TypeRef Source #
intTypeInContext :: ContextRef -> CUInt -> IO TypeRef Source #
integerType :: CUInt -> IO TypeRef Source #
getIntTypeWidth :: TypeRef -> IO CUInt Source #
Real types
floatTypeInContext :: ContextRef -> IO TypeRef Source #
fp128TypeInContext :: ContextRef -> IO TypeRef Source #
doubleType :: IO TypeRef Source #
x86FP80Type :: IO TypeRef Source #
ppcFP128Type :: IO TypeRef Source #
Function types
Arguments
:: TypeRef | return type |
-> Ptr TypeRef | array of argument types |
-> CUInt | number of elements in array |
-> Bool | non-zero if function is varargs |
-> IO TypeRef |
Create a function type.
countParamTypes :: TypeRef -> IO CUInt Source #
Give the number of fixed parameters that a function takes.
getParamTypes :: TypeRef -> Ptr TypeRef -> IO () Source #
Fill out an array with the types of a function's fixed parameters.
Struct types
structTypeInContext :: ContextRef -> Ptr TypeRef -> CUInt -> Bool -> IO TypeRef Source #
structCreateNamed :: ContextRef -> CString -> IO TypeRef Source #
countStructElementTypes :: TypeRef -> IO CUInt Source #
Array, pointer, and vector types
getArrayLength :: TypeRef -> IO CUInt Source #
getPointerAddressSpace :: TypeRef -> IO CUInt Source #
getVectorSize :: TypeRef -> IO CUInt Source #
Other types
voidTypeInContext :: ContextRef -> IO TypeRef Source #
labelTypeInContext :: ContextRef -> IO TypeRef Source #
x86MMXType :: IO TypeRef Source #
Values
Uses
Users
getNumOperands :: ValueRef -> IO CUInt Source #
Constants
Metadata
mDStringInContext :: ContextRef -> CString -> CUInt -> IO ValueRef Source #
mDNodeInContext :: ContextRef -> Ptr ValueRef -> CUInt -> IO ValueRef Source #
Scalar constants
constIntGetZExtValue :: ValueRef -> IO CULLong Source #
constIntGetSExtValue :: ValueRef -> IO CLLong Source #
Composite constants
constStringInContext :: ContextRef -> CString -> CUInt -> Bool -> IO ValueRef Source #
constStructInContext :: ContextRef -> Ptr ValueRef -> CUInt -> Bool -> IO ValueRef Source #
Constant Expressions
getConstOpcode :: ValueRef -> IO Opcode Source #
blockAddress :: ValueRef -> BasicBlockRef -> IO ValueRef Source #
Comparison predicates
data IntPredicate Source #
Constructors
IntEQ | equal |
IntNE | not equal |
IntUGT | unsigned greater than |
IntUGE | unsigned greater or equal |
IntULT | unsigned less than |
IntULE | unsigned less or equal |
IntSGT | signed greater than |
IntSGE | signed greater or equal |
IntSLT | signed less than |
IntSLE | signed less or equal |
Instances
fromIntPredicate :: IntPredicate -> IntPredicate Source #
toIntPredicate :: IntPredicate -> IntPredicate Source #
data FPPredicate Source #
Constructors
FPFalse | Always false (always folded) |
FPOEQ | True if ordered and equal |
FPOGT | True if ordered and greater than |
FPOGE | True if ordered and greater than or equal |
FPOLT | True if ordered and less than |
FPOLE | True if ordered and less than or equal |
FPONE | True if ordered and operands are unequal |
FPORD | True if ordered (no nans) |
FPUNO | True if unordered: isnan(X) | isnan(Y) |
FPUEQ | True if unordered or equal |
FPUGT | True if unordered or greater than |
FPUGE | True if unordered, greater than, or equal |
FPULT | True if unordered or less than |
FPULE | True if unordered, less than, or equal |
FPUNE | True if unordered or not equal |
FPTrue | Always true (always folded) |
Instances
fromRealPredicate :: FPPredicate -> RealPredicate Source #
toRealPredicate :: RealPredicate -> FPPredicate Source #
Floating point attributes
Support operations and types
An enumeration for the kinds of linkage for global values.
Constructors
ExternalLinkage | Externally visible function |
AvailableExternallyLinkage | |
LinkOnceAnyLinkage | Keep one copy of function when linking (inline) |
LinkOnceODRLinkage | Same, but only replaced by something equivalent. |
LinkOnceODRAutoHideLinkage | Like LinkOnceODR, but possibly hidden. |
WeakAnyLinkage | Keep one copy of named function when linking (weak) |
WeakODRLinkage | Same, but only replaced by something equivalent. |
AppendingLinkage | Special purpose, only applies to global arrays |
InternalLinkage | Rename collisions when linking (static functions) |
PrivateLinkage | Like Internal, but omit from symbol table |
DLLImportLinkage | Function to be imported from DLL |
DLLExportLinkage | Function to be accessible from DLL |
ExternalWeakLinkage | ExternalWeak linkage description |
GhostLinkage | Stand-in functions for streaming fns from BC files |
CommonLinkage | Tentative definitions |
LinkerPrivateLinkage | Like Private, but linker removes. |
LinkerPrivateWeakLinkage | Like LinkerPrivate, but is weak. |
Instances
Enum Linkage Source # | |
Eq Linkage Source # | |
Ord Linkage Source # | |
Show Linkage Source # | |
fromLinkage :: Linkage -> Linkage Source #
data Visibility Source #
An enumeration for the kinds of visibility of global values.
Constructors
DefaultVisibility | The GV is visible |
HiddenVisibility | The GV is hidden |
ProtectedVisibility | The GV is protected |
Instances
Enum Visibility Source # | |
Defined in LLVM.FFI.Core Methods succ :: Visibility -> Visibility # pred :: Visibility -> Visibility # toEnum :: Int -> Visibility # fromEnum :: Visibility -> Int # enumFrom :: Visibility -> [Visibility] # enumFromThen :: Visibility -> Visibility -> [Visibility] # enumFromTo :: Visibility -> Visibility -> [Visibility] # enumFromThenTo :: Visibility -> Visibility -> Visibility -> [Visibility] # | |
Eq Visibility Source # | |
Defined in LLVM.FFI.Core | |
Ord Visibility Source # | |
Defined in LLVM.FFI.Core Methods compare :: Visibility -> Visibility -> Ordering # (<) :: Visibility -> Visibility -> Bool # (<=) :: Visibility -> Visibility -> Bool # (>) :: Visibility -> Visibility -> Bool # (>=) :: Visibility -> Visibility -> Bool # max :: Visibility -> Visibility -> Visibility # min :: Visibility -> Visibility -> Visibility # | |
Show Visibility Source # | |
Defined in LLVM.FFI.Core Methods showsPrec :: Int -> Visibility -> ShowS # show :: Visibility -> String # showList :: [Visibility] -> ShowS # |
fromVisibility :: Visibility -> Visibility Source #
toVisibility :: Visibility -> Visibility Source #
Global variables, functions, and aliases (globals)
getLinkage :: ValueRef -> IO Linkage Source #
setLinkage :: ValueRef -> Linkage -> IO () Source #
getVisibility :: ValueRef -> IO Visibility Source #
setVisibility :: ValueRef -> Visibility -> IO () Source #
getAlignment :: ValueRef -> IO CUInt Source #
setAlignment :: ValueRef -> CUInt -> IO () Source #
Global variables
deleteGlobal :: ValueRef -> IO () Source #
Aliases
Parameter passing
type AttributeRef = Ptr Attribute Source #
newtype AttributeKind Source #
Constructors
AttributeKind CUInt |
Calling conventions
data CallingConvention Source #
Constructors
C | |
Fast | |
Cold | |
X86StdCall | |
X86FastCall | |
GHC |
Instances
fromCallingConvention :: CallingConvention -> CallingConvention Source #
toCallingConvention :: CallingConvention -> CallingConvention Source #
Functions
deleteFunction :: FunctionRef -> IO () Source #
getIntrinsicID :: FunctionRef -> IO CUInt Source #
getFunctionCallConv :: FunctionRef -> IO CallingConvention Source #
setFunctionCallConv :: FunctionRef -> CallingConvention -> IO () Source #
newtype AttributeIndex Source #
Constructors
AttributeIndex Word32 |
createEnumAttribute :: ContextRef -> AttributeKind -> Word64 -> IO AttributeRef Source #
createStringAttribute :: ContextRef -> CString -> CUInt -> CString -> CUInt -> IO AttributeRef Source #
getStringAttributeKind :: AttributeRef -> Ptr CUInt -> IO CString Source #
getStringAttributeValue :: AttributeRef -> Ptr CUInt -> IO CString Source #
isEnumAttribute :: AttributeRef -> IO Bool Source #
isStringAttribute :: AttributeRef -> IO Bool Source #
addAttributeAtIndex :: ValueRef -> AttributeIndex -> AttributeRef -> IO () Source #
getAttributeCountAtIndex :: ValueRef -> AttributeIndex -> IO CUInt Source #
getAttributesAtIndex :: ValueRef -> AttributeIndex -> Ptr AttributeRef -> IO () Source #
getStringAttributeAtIndex :: ValueRef -> AttributeIndex -> CString -> CUInt -> IO AttributeRef Source #
removeEnumAttributeAtIndex :: ValueRef -> AttributeIndex -> AttributeKind -> IO () Source #
removeStringAttributeAtIndex :: ValueRef -> AttributeIndex -> CString -> CUInt -> IO () Source #
addCallSiteAttribute :: ValueRef -> AttributeIndex -> AttributeRef -> IO () Source #
getCallSiteAttributeCount :: ValueRef -> AttributeIndex -> IO CUInt Source #
getCallSiteAttributes :: ValueRef -> AttributeIndex -> Ptr AttributeRef -> IO () Source #
getCallSiteStringAttribute :: ValueRef -> AttributeIndex -> CString -> CUInt -> IO AttributeRef Source #
removeCallSiteEnumAttribute :: ValueRef -> AttributeIndex -> AttributeKind -> IO () Source #
removeCallSiteStringAttribute :: ValueRef -> AttributeIndex -> CString -> CUInt -> IO () Source #
Parameters
countParams :: FunctionRef -> IO CUInt Source #
setParamAlignment :: ValueRef -> CUInt -> IO () Source #
Basic blocks
data BasicBlock Source #
type BasicBlockRef = Ptr BasicBlock Source #
Arguments
:: ValueRef | basic block |
-> IO BasicBlockRef |
Arguments
:: ValueRef | function |
-> Ptr BasicBlockRef | array to fill out |
-> IO () |
Arguments
:: ValueRef | function |
-> IO BasicBlockRef |
appendBasicBlockInContext :: ContextRef -> ValueRef -> CString -> IO BasicBlockRef Source #
Arguments
:: ValueRef | function |
-> CString | name for label |
-> IO BasicBlockRef |
Arguments
:: BasicBlockRef | insert before this one |
-> CString | name for label |
-> IO BasicBlockRef |
deleteBasicBlock :: BasicBlockRef -> IO () Source #
removeBasicBlockFromParent :: BasicBlockRef -> IO () Source #
moveBasicBlockBefore :: BasicBlockRef -> BasicBlockRef -> IO () Source #
moveBasicBlockAfter :: BasicBlockRef -> BasicBlockRef -> IO () Source #
Instructions
instructionEraseFromParent :: ValueRef -> IO () Source #
getInstructionOpcode :: ValueRef -> IO Opcode Source #
getICmpPredicate :: ValueRef -> IO IntPredicate Source #
Call Sites
getInstructionCallConv :: ValueRef -> IO CallingConvention Source #
setInstructionCallConv :: ValueRef -> CallingConvention -> IO () Source #
setInstrParamAlignment :: ValueRef -> AttributeIndex -> CUInt -> IO () Source #
Call Instructions (only)
Switch Instructions (only)
Phi nodes
addIncoming :: ValueRef -> Ptr ValueRef -> Ptr BasicBlockRef -> CUInt -> IO () Source #
countIncoming :: ValueRef -> IO CUInt Source #
getIncomingBlock :: ValueRef -> CUInt -> IO BasicBlockRef Source #
Instruction building
type BuilderRef = Ptr Builder Source #
positionBuilder :: BuilderRef -> BasicBlockRef -> ValueRef -> IO () Source #
positionBefore :: BuilderRef -> ValueRef -> IO () Source #
positionAtEnd :: BuilderRef -> BasicBlockRef -> IO () Source #
clearInsertionPosition :: BuilderRef -> IO () Source #
insertIntoBuilder :: BuilderRef -> ValueRef -> IO () Source #
insertIntoBuilderWithName :: BuilderRef -> ValueRef -> CString -> IO () Source #
ptrDisposeBuilder :: FinalizerPtr Builder Source #
Metadata
setCurrentDebugLocation :: BuilderRef -> ValueRef -> IO () Source #
setInstDebugLocation :: BuilderRef -> ValueRef -> IO () Source #
Terminators
buildRetVoid :: BuilderRef -> IO ValueRef Source #
buildAggregateRet :: BuilderRef -> Ptr ValueRef -> CUInt -> IO ValueRef Source #
buildBr :: BuilderRef -> BasicBlockRef -> IO ValueRef Source #
buildCondBr :: BuilderRef -> ValueRef -> BasicBlockRef -> BasicBlockRef -> IO ValueRef Source #
buildSwitch :: BuilderRef -> ValueRef -> BasicBlockRef -> CUInt -> IO ValueRef Source #
buildIndirectBr :: BuilderRef -> ValueRef -> CUInt -> IO ValueRef Source #
buildInvoke2 :: BuilderRef -> TypeRef -> ValueRef -> Ptr ValueRef -> CUInt -> BasicBlockRef -> BasicBlockRef -> CString -> IO ValueRef Source #
buildLandingPad :: BuilderRef -> TypeRef -> ValueRef -> CUInt -> CString -> IO ValueRef Source #
buildResume :: BuilderRef -> ValueRef -> IO ValueRef Source #
buildUnreachable :: BuilderRef -> IO ValueRef Source #
addDestination :: ValueRef -> BasicBlockRef -> IO () Source #
Arithmetic
buildNSWAdd :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef Source #
buildNUWAdd :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef Source #
buildNSWSub :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef Source #
buildNUWSub :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef Source #
buildNSWMul :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef Source #
buildNUWMul :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef Source #
buildExactSDiv :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef Source #
buildBinOp :: BuilderRef -> Opcode -> ValueRef -> ValueRef -> CString -> IO ValueRef Source #
buildNSWNeg :: BuilderRef -> ValueRef -> CString -> IO ValueRef Source #
buildNUWNeg :: BuilderRef -> ValueRef -> CString -> IO ValueRef Source #
Memory
buildMalloc :: BuilderRef -> TypeRef -> CString -> IO ValueRef Source #
buildArrayMalloc :: BuilderRef -> TypeRef -> ValueRef -> CString -> IO ValueRef Source #
buildAlloca :: BuilderRef -> TypeRef -> CString -> IO ValueRef Source #
buildArrayAlloca :: BuilderRef -> TypeRef -> ValueRef -> CString -> IO ValueRef Source #
buildLoad2 :: BuilderRef -> TypeRef -> ValueRef -> CString -> IO ValueRef Source #
buildStore :: BuilderRef -> ValueRef -> ValueRef -> IO ValueRef Source #
buildGEP2 :: BuilderRef -> TypeRef -> ValueRef -> Ptr ValueRef -> CUInt -> CString -> IO ValueRef Source #
buildInBoundsGEP2 :: BuilderRef -> TypeRef -> ValueRef -> Ptr ValueRef -> CUInt -> CString -> IO ValueRef Source #
buildStructGEP2 :: BuilderRef -> TypeRef -> ValueRef -> CUInt -> CString -> IO ValueRef Source #
buildGlobalString :: BuilderRef -> CString -> CString -> IO ValueRef Source #
buildGlobalStringPtr :: BuilderRef -> CString -> CString -> IO ValueRef Source #
Casts
buildTrunc :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef Source #
buildFPToUI :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef Source #
buildFPToSI :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef Source #
buildUIToFP :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef Source #
buildSIToFP :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef Source #
buildFPTrunc :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef Source #
buildFPExt :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef Source #
buildPtrToInt :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef Source #
buildIntToPtr :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef Source #
buildBitCast :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef Source #
buildZExtOrBitCast :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef Source #
buildSExtOrBitCast :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef Source #
buildTruncOrBitCast :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef Source #
buildPointerCast :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef Source #
buildIntCast :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef Source #
buildFPCast :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef Source #
Comparisons
Miscellaneous instructions
buildCall2 :: BuilderRef -> TypeRef -> ValueRef -> Ptr ValueRef -> CUInt -> CString -> IO ValueRef Source #
buildSelect :: BuilderRef -> ValueRef -> ValueRef -> ValueRef -> CString -> IO ValueRef Source #
buildVAArg :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef Source #
buildExtractElement :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef Source #
buildInsertElement :: BuilderRef -> ValueRef -> ValueRef -> ValueRef -> CString -> IO ValueRef Source #
buildShuffleVector :: BuilderRef -> ValueRef -> ValueRef -> ValueRef -> CString -> IO ValueRef Source #
buildExtractValue :: BuilderRef -> ValueRef -> CUInt -> CString -> IO ValueRef Source #
buildInsertValue :: BuilderRef -> ValueRef -> ValueRef -> CUInt -> CString -> IO ValueRef Source #
buildIsNull :: BuilderRef -> ValueRef -> CString -> IO ValueRef Source #
buildIsNotNull :: BuilderRef -> ValueRef -> CString -> IO ValueRef Source #
buildPtrDiff2 :: BuilderRef -> TypeRef -> ValueRef -> ValueRef -> CString -> IO ValueRef Source #
Memory buffers
data MemoryBuffer Source #
type MemoryBufferRef = Ptr MemoryBuffer Source #
createMemoryBufferWithContentsOfFile :: CString -> Ptr MemoryBufferRef -> Ptr CString -> IO Bool Source #
createMemoryBufferWithSTDIN :: Ptr MemoryBufferRef -> Ptr CString -> IO Bool Source #
disposeMemoryBuffer :: MemoryBufferRef -> IO () Source #
Raw.PassRegistry
data PassRegistry Source #
type PassRegistryRef = Ptr PassRegistry Source #
Pass manager
data PassManager Source #
type PassManagerRef = Ptr PassManager Source #
ptrDisposePassManager :: FinalizerPtr PassManager Source #
runPassManager :: PassManagerRef -> ModuleRef -> IO Bool Source #
runFunctionPassManager :: PassManagerRef -> ValueRef -> IO Bool Source #
disposePassManager :: PassManagerRef -> IO () Source #
Functions from extras.cpp
getNumUses :: ValueRef -> IO CInt Source #
instGetOpcode :: ValueRef -> IO CInt Source #
cmpInstGetIntPredicate :: ValueRef -> IO IntPredicate Source #
cmpInstGetRealPredicate :: ValueRef -> IO RealPredicate Source #