LLVM.FFI.Core

initializeCore

version

Boolean values

data Bool

false

true

consBool

deconsBool

Error handling

disposeMessage

Raw.Context functions

data Context

type ContextRef

contextCreate

contextDispose

getGlobalContext

getMDKindID

getMDKindIDInContext

Modules

data Module

type ModuleRef

moduleCreateWithName

moduleCreateWithNameInContext

disposeModule

getDataLayout

setDataLayout

getTarget

setTarget

defaultTargetTriple

hostTriple

dumpModule

setModuleInlineAsm

getModuleContext

Types

data Type

type TypeRef

data TypeKind

getTypeKind

typeIsSized

getTypeContext

Integer types

int1TypeInContext

int8TypeInContext

int16TypeInContext

int32TypeInContext

int64TypeInContext

intTypeInContext

int1Type

int8Type

int16Type

int32Type

int64Type

integerType

getIntTypeWidth

Real types

floatTypeInContext

doubleTypeInContext

x86FP80TypeInContext

fp128TypeInContext

ppcFP128TypeInContext

floatType

doubleType

x86FP80Type

fp128Type

ppcFP128Type

Function types

functionType

isFunctionVarArg

getReturnType

countParamTypes

getParamTypes

Struct types

structTypeInContext

structType

structCreateNamed

getStructName

structSetBody

countStructElementTypes

getStructElementTypes

isPackedStruct

isOpaqueStruct

getTypeByName

Array, pointer, and vector types

arrayType

pointerType

vectorType

getElementType

getArrayLength

getPointerAddressSpace

getVectorSize

Other types

voidTypeInContext

labelTypeInContext

x86MMXTypeInContext

Values

data Value

type ValueRef

typeOf

getValueName

setValueName

dumpValue

replaceAllUsesWith

hasMetadata

getMetadata

setMetadata

Uses

data OpaqueUse

type UseRef

getFirstUse

getNextUse

getUser

getUsedValue

Users

getOperand

setOperand

getNumOperands

Constants

constNull

constAllOnes

getUndef

isConstant

isNull

isUndef

constPointerNull

Metadata

mDStringInContext

mDString

mDNodeInContext

mDNode

getMDString

getNamedMetadataNumOperands

getNamedMetadataOperands

Scalar constants

constInt

constIntOfArbitraryPrecision

constIntOfString

constIntOfStringAndSize

constReal

constRealOfString

constRealOfStringAndSize

constIntGetZExtValue

constIntGetSExtValue

Composite constants

constStringInContext

constStructInContext

constString

constArray

constStruct

constNamedStruct

constVector

Constant Expressions

getConstOpcode

alignOf

sizeOf

constNeg

constNUWNeg

constNSWNeg

constFNeg

constNot

constAdd

constNSWAdd

constNUWAdd

constFAdd

constSub

constNSWSub

constNUWSub

constFSub

constMul

constNSWMul

constNUWMul

constFMul

constUDiv

constSDiv

constExactSDiv

constFDiv

constURem

constSRem

constFRem

constAnd

constOr

constXor

constICmp

constFCmp

constShl

constLShr

constAShr

constGEP

constInBoundsGEP

constTrunc

constSExt

constZExt

constFPTrunc

constFPExt

constUIToFP

constSIToFP

constFPToUI

constFPToSI

constPtrToInt

constIntToPtr

constBitCast

constZExtOrBitCast

constSExtOrBitCast

constTruncOrBitCast

constPointerCast

constIntCast

constFPCast

constSelect

constExtractElement

constInsertElement

constShuffleVector

constExtractValue

constInsertValue

constInlineAsm

blockAddress

Comparison predicates

data IntPredicate

fromIntPredicate

toIntPredicate

data FPPredicate

fromRealPredicate

toRealPredicate

Floating point attributes

Support operations and types

data Linkage

fromLinkage

toLinkage

data Visibility

fromVisibility

toVisibility

Global variables, functions, and aliases (globals)

getGlobalParent

isDeclaration

getLinkage

setLinkage

getSection

setSection

getVisibility

setVisibility

getAlignment

setAlignment

Global variables

addGlobal

addGlobalInAddressSpace

getNamedGlobal

getFirstGlobal

getLastGlobal

getNextGlobal

getPreviousGlobal

deleteGlobal

getInitializer

setInitializer

isThreadLocal

setThreadLocal

isGlobalConstant

setGlobalConstant

Aliases

addAlias

Parameter passing

data Attribute

type AttributeRef

data AttributeKind

Calling conventions

data CallingConvention

fromCallingConvention

toCallingConvention

Functions

addFunction

getNamedFunction

getFirstFunction

getLastFunction

getNextFunction

getPreviousFunction

deleteFunction

getIntrinsicID

getFunctionCallConv

setFunctionCallConv

getGC

setGC

data AttributeIndex

attributeReturnIndex

attributeFunctionIndex

getEnumAttributeKindForName

getLastEnumAttributeKind

createEnumAttribute

getEnumAttributeKind

getEnumAttributeValue

createStringAttribute

getStringAttributeKind

getStringAttributeValue

isEnumAttribute

isStringAttribute

addAttributeAtIndex

getAttributeCountAtIndex

getAttributesAtIndex

getEnumAttributeAtIndex

getStringAttributeAtIndex

removeEnumAttributeAtIndex

removeStringAttributeAtIndex

addTargetDependentFunctionAttr

addCallSiteAttribute

getCallSiteAttributeCount

getCallSiteAttributes

getCallSiteEnumAttribute

getCallSiteStringAttribute

removeCallSiteEnumAttribute

removeCallSiteStringAttribute

getCalledValue

Parameters

countParams

getParams

getParam

getParamParent

getFirstParam

getLastParam

getNextParam

getPreviousParam

setParamAlignment

Basic blocks

data BasicBlock

type BasicBlockRef

basicBlockAsValue

valueIsBasicBlock

valueAsBasicBlock

getBasicBlockName

getBasicBlockParent

getBasicBlockTerminator

countBasicBlocks

getBasicBlocks

getFirstBasicBlock

getLastBasicBlock

getNextBasicBlock

getPreviousBasicBlock

getEntryBasicBlock

appendBasicBlockInContext

insertBasicBlockInContext

appendBasicBlock

insertBasicBlock

deleteBasicBlock

removeBasicBlockFromParent

moveBasicBlockBefore

moveBasicBlockAfter

getFirstInstruction

getLastInstruction

Instructions

getInstructionParent

getNextInstruction

getPreviousInstruction

instructionEraseFromParent

getInstructionOpcode

getICmpPredicate

Call Sites

getInstructionCallConv

setInstructionCallConv

setInstrParamAlignment

Call Instructions (only)

isTailCall

setTailCall

Switch Instructions (only)

getSwitchDefaultDest

Phi nodes

addIncoming

countIncoming

getIncomingValue

getIncomingBlock

Instruction building

data Builder

type BuilderRef

createBuilderInContext

createBuilder

positionBuilder

positionBefore

positionAtEnd

getInsertBlock

clearInsertionPosition

insertIntoBuilder

insertIntoBuilderWithName

Metadata

setCurrentDebugLocation

getCurrentDebugLocation

setInstDebugLocation

Terminators

buildRetVoid

buildRet

buildAggregateRet

buildBr

buildCondBr

buildSwitch

buildIndirectBr

buildInvoke

buildLandingPad

buildResume

buildUnreachable

addCase

addDestination

addClause

setCleanup

Arithmetic

buildAdd

buildNSWAdd

buildNUWAdd

buildFAdd

buildSub

buildNSWSub

buildNUWSub

buildFSub

buildMul

buildNSWMul

buildNUWMul

buildFMul

buildUDiv

buildSDiv

buildExactSDiv

buildFDiv

buildURem

buildSRem

buildFRem

buildShl

buildLShr

buildAShr

buildAnd

buildOr

buildXor

buildBinOp

buildNeg

buildNSWNeg

buildNUWNeg

buildFNeg

buildNot

Memory

buildMalloc

buildArrayMalloc

buildAlloca

buildArrayAlloca

buildFree

buildLoad

buildStore

buildGEP

buildInBoundsGEP

buildStructGEP

buildGlobalString

buildGlobalStringPtr

Casts

buildTrunc

buildZExt

buildSExt

buildFPToUI

buildFPToSI

buildUIToFP

buildSIToFP

buildFPTrunc

buildFPExt

buildPtrToInt

buildIntToPtr

buildBitCast

buildZExtOrBitCast

buildSExtOrBitCast

buildTruncOrBitCast

buildCast

buildPointerCast

buildFPCast

Comparisons

buildICmp

buildFCmp

Miscellaneous instructions

buildPhi

buildCall

buildSelect

buildVAArg

buildExtractElement

buildInsertElement

buildShuffleVector

buildExtractValue

buildInsertValue

buildIsNull

buildIsNotNull

buildPtrDiff

Memory buffers

data MemoryBuffer

type MemoryBufferRef

createMemoryBufferWithContentsOfFile

createMemoryBufferWithSTDIN

disposeMemoryBuffer

Raw.PassRegistry

data PassRegistry

type PassRegistryRef

getGlobalPassRegistry

Pass manager

data PassManager

type PassManagerRef

createPassManager

createFunctionPassManagerForModule

runPassManager

initializeFunctionPassManager

runFunctionPassManager

finalizeFunctionPassManager

disposePassManager

Functions from extras.cpp