llvm: llvm.org/llvm/bindings/go/llvm Index | Files

package llvm

import "llvm.org/llvm/bindings/go/llvm"


Package Files

analysis.go bitreader.go bitwriter.go dibuilder.go executionengine.go ir.go linker.go llvm_dep.go string.go support.go target.go transforms_coroutines.go transforms_instrumentation.go transforms_ipo.go transforms_pmbuilder.go transforms_scalar.go version.go


const (
    FlagPrivate = 1 << iota
const (
    MDStringMetadataKind                     = C.LLVMMDStringMetadataKind
    ConstantAsMetadataMetadataKind           = C.LLVMConstantAsMetadataMetadataKind
    LocalAsMetadataMetadataKind              = C.LLVMLocalAsMetadataMetadataKind
    DistinctMDOperandPlaceholderMetadataKind = C.LLVMDistinctMDOperandPlaceholderMetadataKind
    MDTupleMetadataKind                      = C.LLVMMDTupleMetadataKind
    DILocationMetadataKind                   = C.LLVMDILocationMetadataKind
    DIExpressionMetadataKind                 = C.LLVMDIExpressionMetadataKind
    DIGlobalVariableExpressionMetadataKind   = C.LLVMDIGlobalVariableExpressionMetadataKind
    GenericDINodeMetadataKind                = C.LLVMGenericDINodeMetadataKind
    DISubrangeMetadataKind                   = C.LLVMDISubrangeMetadataKind
    DIEnumeratorMetadataKind                 = C.LLVMDIEnumeratorMetadataKind
    DIBasicTypeMetadataKind                  = C.LLVMDIBasicTypeMetadataKind
    DIDerivedTypeMetadataKind                = C.LLVMDIDerivedTypeMetadataKind
    DICompositeTypeMetadataKind              = C.LLVMDICompositeTypeMetadataKind
    DISubroutineTypeMetadataKind             = C.LLVMDISubroutineTypeMetadataKind
    DIFileMetadataKind                       = C.LLVMDIFileMetadataKind
    DICompileUnitMetadataKind                = C.LLVMDICompileUnitMetadataKind
    DISubprogramMetadataKind                 = C.LLVMDISubprogramMetadataKind
    DILexicalBlockMetadataKind               = C.LLVMDILexicalBlockMetadataKind
    DILexicalBlockFileMetadataKind           = C.LLVMDILexicalBlockFileMetadataKind
    DINamespaceMetadataKind                  = C.LLVMDINamespaceMetadataKind
    DIModuleMetadataKind                     = C.LLVMDIModuleMetadataKind
    DITemplateTypeParameterMetadataKind      = C.LLVMDITemplateTypeParameterMetadataKind
    DITemplateValueParameterMetadataKind     = C.LLVMDITemplateValueParameterMetadataKind
    DIGlobalVariableMetadataKind             = C.LLVMDIGlobalVariableMetadataKind
    DILocalVariableMetadataKind              = C.LLVMDILocalVariableMetadataKind
    DILabelMetadataKind                      = C.LLVMDILabelMetadataKind
    DIObjCPropertyMetadataKind               = C.LLVMDIObjCPropertyMetadataKind
    DIImportedEntityMetadataKind             = C.LLVMDIImportedEntityMetadataKind
    DIMacroMetadataKind                      = C.LLVMDIMacroMetadataKind
    DIMacroFileMetadataKind                  = C.LLVMDIMacroFileMetadataKind
    DICommonBlockMetadataKind                = C.LLVMDICommonBlockMetadataKind

func AttributeKindID Uses

func AttributeKindID(name string) (id uint)

func DefaultTargetTriple Uses

func DefaultTargetTriple() (triple string)

func InitializeAllAsmParsers Uses

func InitializeAllAsmParsers()

func InitializeAllAsmPrinters Uses

func InitializeAllAsmPrinters()

func InitializeAllTargetInfos Uses

func InitializeAllTargetInfos()

InitializeAllTargetInfos - The main program should call this function if it wants access to all available targets that LLVM is configured to support.

func InitializeAllTargetMCs Uses

func InitializeAllTargetMCs()

func InitializeAllTargets Uses

func InitializeAllTargets()

InitializeAllTargets - The main program should call this function if it wants to link in all available targets that LLVM is configured to support.

func InitializeNativeAsmPrinter Uses

func InitializeNativeAsmPrinter() error

func InitializeNativeTarget Uses

func InitializeNativeTarget() error

InitializeNativeTarget - The main program should call this function to initialize the native target corresponding to the host. This is useful for JIT applications to ensure that the target gets linked in correctly.

func LinkInInterpreter Uses

func LinkInInterpreter()

func LinkInMCJIT Uses

func LinkInMCJIT()

func LinkModules Uses

func LinkModules(Dest, Src Module) error

func LoadLibraryPermanently Uses

func LoadLibraryPermanently(lib string) error

Loads a dynamic library such that it may be used as an LLVM plugin. See llvm::sys::DynamicLibrary::LoadLibraryPermanently.

func MDKindID Uses

func MDKindID(name string) (id int)

func ParseCommandLineOptions Uses

func ParseCommandLineOptions(args []string, overview string)

Parse the given arguments using the LLVM command line parser. See llvm::cl::ParseCommandLineOptions.

func VerifyFunction Uses

func VerifyFunction(f Value, a VerifierFailureAction) error

Verifies that a single function is valid, taking the specified action. Useful for debugging.

func VerifyModule Uses

func VerifyModule(m Module, a VerifierFailureAction) error

Verifies that a module is valid, taking the specified action if not. Optionally returns a human-readable description of any invalid constructs.

func ViewFunctionCFG Uses

func ViewFunctionCFG(f Value)

Open up a ghostview window that displays the CFG of the current function. Useful for debugging.

func ViewFunctionCFGOnly Uses

func ViewFunctionCFGOnly(f Value)

func WriteBitcodeToFile Uses

func WriteBitcodeToFile(m Module, file *os.File) error

type AtomicOrdering Uses

type AtomicOrdering C.LLVMAtomicOrdering
const (
    AtomicOrderingNotAtomic              AtomicOrdering = C.LLVMAtomicOrderingNotAtomic
    AtomicOrderingUnordered              AtomicOrdering = C.LLVMAtomicOrderingUnordered
    AtomicOrderingMonotonic              AtomicOrdering = C.LLVMAtomicOrderingMonotonic
    AtomicOrderingAcquire                AtomicOrdering = C.LLVMAtomicOrderingAcquire
    AtomicOrderingRelease                AtomicOrdering = C.LLVMAtomicOrderingRelease
    AtomicOrderingAcquireRelease         AtomicOrdering = C.LLVMAtomicOrderingAcquireRelease
    AtomicOrderingSequentiallyConsistent AtomicOrdering = C.LLVMAtomicOrderingSequentiallyConsistent

type AtomicRMWBinOp Uses

type AtomicRMWBinOp C.LLVMAtomicRMWBinOp
const (
    AtomicRMWBinOpXchg AtomicRMWBinOp = C.LLVMAtomicRMWBinOpXchg
    AtomicRMWBinOpAdd  AtomicRMWBinOp = C.LLVMAtomicRMWBinOpAdd
    AtomicRMWBinOpSub  AtomicRMWBinOp = C.LLVMAtomicRMWBinOpSub
    AtomicRMWBinOpAnd  AtomicRMWBinOp = C.LLVMAtomicRMWBinOpAnd
    AtomicRMWBinOpNand AtomicRMWBinOp = C.LLVMAtomicRMWBinOpNand
    AtomicRMWBinOpOr   AtomicRMWBinOp = C.LLVMAtomicRMWBinOpOr
    AtomicRMWBinOpXor  AtomicRMWBinOp = C.LLVMAtomicRMWBinOpXor
    AtomicRMWBinOpMax  AtomicRMWBinOp = C.LLVMAtomicRMWBinOpMax
    AtomicRMWBinOpMin  AtomicRMWBinOp = C.LLVMAtomicRMWBinOpMin
    AtomicRMWBinOpUMax AtomicRMWBinOp = C.LLVMAtomicRMWBinOpUMax
    AtomicRMWBinOpUMin AtomicRMWBinOp = C.LLVMAtomicRMWBinOpUMin

type Attribute Uses

type Attribute struct {
    C C.LLVMAttributeRef

func (Attribute) GetEnumKind Uses

func (a Attribute) GetEnumKind() (id int)

func (Attribute) GetEnumValue Uses

func (a Attribute) GetEnumValue() (val uint64)

func (Attribute) GetStringKind Uses

func (a Attribute) GetStringKind() string

func (Attribute) GetStringValue Uses

func (a Attribute) GetStringValue() string

func (Attribute) IsEnum Uses

func (a Attribute) IsEnum() bool

func (Attribute) IsNil Uses

func (c Attribute) IsNil() bool

func (Attribute) IsString Uses

func (a Attribute) IsString() bool

type BasicBlock Uses

type BasicBlock struct {
    C C.LLVMBasicBlockRef

func AddBasicBlock Uses

func AddBasicBlock(f Value, name string) (bb BasicBlock)

func InsertBasicBlock Uses

func InsertBasicBlock(ref BasicBlock, name string) (bb BasicBlock)

func NextBasicBlock Uses

func NextBasicBlock(bb BasicBlock) (rbb BasicBlock)

func PrevBasicBlock Uses

func PrevBasicBlock(bb BasicBlock) (rbb BasicBlock)

func (BasicBlock) AsValue Uses

func (bb BasicBlock) AsValue() (v Value)

Operations on basic blocks

func (BasicBlock) EraseFromParent Uses

func (bb BasicBlock) EraseFromParent()

func (BasicBlock) FirstInstruction Uses

func (bb BasicBlock) FirstInstruction() (v Value)

func (BasicBlock) IsNil Uses

func (c BasicBlock) IsNil() bool

func (BasicBlock) LastInstruction Uses

func (bb BasicBlock) LastInstruction() (v Value)

func (BasicBlock) MoveAfter Uses

func (bb BasicBlock) MoveAfter(pos BasicBlock)

func (BasicBlock) MoveBefore Uses

func (bb BasicBlock) MoveBefore(pos BasicBlock)

func (BasicBlock) Parent Uses

func (bb BasicBlock) Parent() (v Value)

type Builder Uses

type Builder struct {
    C C.LLVMBuilderRef

func NewBuilder Uses

func NewBuilder() (b Builder)

func (Builder) ClearInsertionPoint Uses

func (b Builder) ClearInsertionPoint()

func (Builder) CreateAShr Uses

func (b Builder) CreateAShr(lhs, rhs Value, name string) (v Value)

func (Builder) CreateAdd Uses

func (b Builder) CreateAdd(lhs, rhs Value, name string) (v Value)


func (Builder) CreateAggregateRet Uses

func (b Builder) CreateAggregateRet(vs []Value) (rv Value)

func (Builder) CreateAlloca Uses

func (b Builder) CreateAlloca(t Type, name string) (v Value)

func (Builder) CreateAnd Uses

func (b Builder) CreateAnd(lhs, rhs Value, name string) (v Value)

func (Builder) CreateArrayAlloca Uses

func (b Builder) CreateArrayAlloca(t Type, val Value, name string) (v Value)

func (Builder) CreateArrayMalloc Uses

func (b Builder) CreateArrayMalloc(t Type, val Value, name string) (v Value)

func (Builder) CreateAtomicCmpXchg Uses

func (b Builder) CreateAtomicCmpXchg(ptr, cmp, newVal Value, successOrdering, failureOrdering AtomicOrdering, singleThread bool) (v Value)

func (Builder) CreateAtomicRMW Uses

func (b Builder) CreateAtomicRMW(op AtomicRMWBinOp, ptr, val Value, ordering AtomicOrdering, singleThread bool) (v Value)

func (Builder) CreateBinOp Uses

func (b Builder) CreateBinOp(op Opcode, lhs, rhs Value, name string) (v Value)

func (Builder) CreateBitCast Uses

func (b Builder) CreateBitCast(val Value, t Type, name string) (v Value)

func (Builder) CreateBr Uses

func (b Builder) CreateBr(bb BasicBlock) (rv Value)

func (Builder) CreateCall Uses

func (b Builder) CreateCall(fn Value, args []Value, name string) (v Value)

func (Builder) CreateCast Uses

func (b Builder) CreateCast(val Value, op Opcode, t Type, name string) (v Value)

func (Builder) CreateCondBr Uses

func (b Builder) CreateCondBr(ifv Value, thenb, elseb BasicBlock) (rv Value)

func (Builder) CreateExactSDiv Uses

func (b Builder) CreateExactSDiv(lhs, rhs Value, name string) (v Value)

func (Builder) CreateExtractElement Uses

func (b Builder) CreateExtractElement(vec, i Value, name string) (v Value)

func (Builder) CreateExtractValue Uses

func (b Builder) CreateExtractValue(agg Value, i int, name string) (v Value)

func (Builder) CreateFAdd Uses

func (b Builder) CreateFAdd(lhs, rhs Value, name string) (v Value)

func (Builder) CreateFCmp Uses

func (b Builder) CreateFCmp(pred FloatPredicate, lhs, rhs Value, name string) (v Value)

func (Builder) CreateFDiv Uses

func (b Builder) CreateFDiv(lhs, rhs Value, name string) (v Value)

func (Builder) CreateFMul Uses

func (b Builder) CreateFMul(lhs, rhs Value, name string) (v Value)

func (Builder) CreateFNeg Uses

func (b Builder) CreateFNeg(v Value, name string) (rv Value)

func (Builder) CreateFPCast Uses

func (b Builder) CreateFPCast(val Value, t Type, name string) (v Value)

func (Builder) CreateFPExt Uses

func (b Builder) CreateFPExt(val Value, t Type, name string) (v Value)

func (Builder) CreateFPToSI Uses

func (b Builder) CreateFPToSI(val Value, t Type, name string) (v Value)

func (Builder) CreateFPToUI Uses

func (b Builder) CreateFPToUI(val Value, t Type, name string) (v Value)

func (Builder) CreateFPTrunc Uses

func (b Builder) CreateFPTrunc(val Value, t Type, name string) (v Value)

func (Builder) CreateFRem Uses

func (b Builder) CreateFRem(lhs, rhs Value, name string) (v Value)

func (Builder) CreateFSub Uses

func (b Builder) CreateFSub(lhs, rhs Value, name string) (v Value)

func (Builder) CreateFree Uses

func (b Builder) CreateFree(p Value) (v Value)

func (Builder) CreateGEP Uses

func (b Builder) CreateGEP(p Value, indices []Value, name string) (v Value)

func (Builder) CreateGlobalString Uses

func (b Builder) CreateGlobalString(str, name string) (v Value)

func (Builder) CreateGlobalStringPtr Uses

func (b Builder) CreateGlobalStringPtr(str, name string) (v Value)

func (Builder) CreateICmp Uses

func (b Builder) CreateICmp(pred IntPredicate, lhs, rhs Value, name string) (v Value)


func (Builder) CreateInBoundsGEP Uses

func (b Builder) CreateInBoundsGEP(p Value, indices []Value, name string) (v Value)

func (Builder) CreateIndirectBr Uses

func (b Builder) CreateIndirectBr(addr Value, numDests int) (rv Value)

func (Builder) CreateInsertElement Uses

func (b Builder) CreateInsertElement(vec, elt, i Value, name string) (v Value)

func (Builder) CreateInsertValue Uses

func (b Builder) CreateInsertValue(agg, elt Value, i int, name string) (v Value)

func (Builder) CreateIntCast Uses

func (b Builder) CreateIntCast(val Value, t Type, name string) (v Value)

func (Builder) CreateIntToPtr Uses

func (b Builder) CreateIntToPtr(val Value, t Type, name string) (v Value)

func (Builder) CreateInvoke Uses

func (b Builder) CreateInvoke(fn Value, args []Value, then, catch BasicBlock, name string) (rv Value)

func (Builder) CreateIsNotNull Uses

func (b Builder) CreateIsNotNull(val Value, name string) (v Value)

func (Builder) CreateIsNull Uses

func (b Builder) CreateIsNull(val Value, name string) (v Value)

func (Builder) CreateLShr Uses

func (b Builder) CreateLShr(lhs, rhs Value, name string) (v Value)

func (Builder) CreateLandingPad Uses

func (b Builder) CreateLandingPad(t Type, nclauses int, name string) (l Value)

func (Builder) CreateLoad Uses

func (b Builder) CreateLoad(p Value, name string) (v Value)

func (Builder) CreateMalloc Uses

func (b Builder) CreateMalloc(t Type, name string) (v Value)

func (Builder) CreateMul Uses

func (b Builder) CreateMul(lhs, rhs Value, name string) (v Value)

func (Builder) CreateNSWAdd Uses

func (b Builder) CreateNSWAdd(lhs, rhs Value, name string) (v Value)

func (Builder) CreateNSWMul Uses

func (b Builder) CreateNSWMul(lhs, rhs Value, name string) (v Value)

func (Builder) CreateNSWNeg Uses

func (b Builder) CreateNSWNeg(v Value, name string) (rv Value)

func (Builder) CreateNSWSub Uses

func (b Builder) CreateNSWSub(lhs, rhs Value, name string) (v Value)

func (Builder) CreateNUWAdd Uses

func (b Builder) CreateNUWAdd(lhs, rhs Value, name string) (v Value)

func (Builder) CreateNUWMul Uses

func (b Builder) CreateNUWMul(lhs, rhs Value, name string) (v Value)

func (Builder) CreateNUWNeg Uses

func (b Builder) CreateNUWNeg(v Value, name string) (rv Value)

func (Builder) CreateNUWSub Uses

func (b Builder) CreateNUWSub(lhs, rhs Value, name string) (v Value)

func (Builder) CreateNeg Uses

func (b Builder) CreateNeg(v Value, name string) (rv Value)

func (Builder) CreateNot Uses

func (b Builder) CreateNot(v Value, name string) (rv Value)

func (Builder) CreateOr Uses

func (b Builder) CreateOr(lhs, rhs Value, name string) (v Value)

func (Builder) CreatePHI Uses

func (b Builder) CreatePHI(t Type, name string) (v Value)

Miscellaneous instructions

func (Builder) CreatePointerCast Uses

func (b Builder) CreatePointerCast(val Value, t Type, name string) (v Value)

func (Builder) CreatePtrDiff Uses

func (b Builder) CreatePtrDiff(lhs, rhs Value, name string) (v Value)

func (Builder) CreatePtrToInt Uses

func (b Builder) CreatePtrToInt(val Value, t Type, name string) (v Value)

func (Builder) CreateResume Uses

func (b Builder) CreateResume(ex Value) (v Value)

func (Builder) CreateRet Uses

func (b Builder) CreateRet(v Value) (rv Value)

func (Builder) CreateRetVoid Uses

func (b Builder) CreateRetVoid() (rv Value)


func (Builder) CreateSDiv Uses

func (b Builder) CreateSDiv(lhs, rhs Value, name string) (v Value)

func (Builder) CreateSExt Uses

func (b Builder) CreateSExt(val Value, t Type, name string) (v Value)

func (Builder) CreateSExtOrBitCast Uses

func (b Builder) CreateSExtOrBitCast(val Value, t Type, name string) (v Value)

func (Builder) CreateSIToFP Uses

func (b Builder) CreateSIToFP(val Value, t Type, name string) (v Value)

func (Builder) CreateSRem Uses

func (b Builder) CreateSRem(lhs, rhs Value, name string) (v Value)

func (Builder) CreateSelect Uses

func (b Builder) CreateSelect(ifv, thenv, elsev Value, name string) (v Value)

func (Builder) CreateShl Uses

func (b Builder) CreateShl(lhs, rhs Value, name string) (v Value)

func (Builder) CreateShuffleVector Uses

func (b Builder) CreateShuffleVector(v1, v2, mask Value, name string) (v Value)

func (Builder) CreateStore Uses

func (b Builder) CreateStore(val Value, p Value) (v Value)

func (Builder) CreateStructGEP Uses

func (b Builder) CreateStructGEP(p Value, i int, name string) (v Value)

func (Builder) CreateSub Uses

func (b Builder) CreateSub(lhs, rhs Value, name string) (v Value)

func (Builder) CreateSwitch Uses

func (b Builder) CreateSwitch(v Value, elseb BasicBlock, numCases int) (rv Value)

func (Builder) CreateTrunc Uses

func (b Builder) CreateTrunc(val Value, t Type, name string) (v Value)


func (Builder) CreateTruncOrBitCast Uses

func (b Builder) CreateTruncOrBitCast(val Value, t Type, name string) (v Value)

func (Builder) CreateUDiv Uses

func (b Builder) CreateUDiv(lhs, rhs Value, name string) (v Value)

func (Builder) CreateUIToFP Uses

func (b Builder) CreateUIToFP(val Value, t Type, name string) (v Value)

func (Builder) CreateURem Uses

func (b Builder) CreateURem(lhs, rhs Value, name string) (v Value)

func (Builder) CreateUnreachable Uses

func (b Builder) CreateUnreachable() (rv Value)

func (Builder) CreateVAArg Uses

func (b Builder) CreateVAArg(list Value, t Type, name string) (v Value)

func (Builder) CreateXor Uses

func (b Builder) CreateXor(lhs, rhs Value, name string) (v Value)

func (Builder) CreateZExt Uses

func (b Builder) CreateZExt(val Value, t Type, name string) (v Value)

func (Builder) CreateZExtOrBitCast Uses

func (b Builder) CreateZExtOrBitCast(val Value, t Type, name string) (v Value)

func (Builder) Dispose Uses

func (b Builder) Dispose()

func (Builder) GetCurrentDebugLocation Uses

func (b Builder) GetCurrentDebugLocation() (loc DebugLoc)

Get current debug location. Please do not call this function until setting debug location with SetCurrentDebugLocation()

func (Builder) GetInsertBlock Uses

func (b Builder) GetInsertBlock() (bb BasicBlock)

func (Builder) Insert Uses

func (b Builder) Insert(instr Value)

func (Builder) InsertDeclare Uses

func (b Builder) InsertDeclare(module Module, storage Value, md Value) Value

func (Builder) InsertWithName Uses

func (b Builder) InsertWithName(instr Value, name string)

func (Builder) IsNil Uses

func (c Builder) IsNil() bool

func (Builder) SetCurrentDebugLocation Uses

func (b Builder) SetCurrentDebugLocation(line, col uint, scope, inlinedAt Metadata)

func (Builder) SetInsertPoint Uses

func (b Builder) SetInsertPoint(block BasicBlock, instr Value)

func (Builder) SetInsertPointAtEnd Uses

func (b Builder) SetInsertPointAtEnd(block BasicBlock)

func (Builder) SetInsertPointBefore Uses

func (b Builder) SetInsertPointBefore(instr Value)

func (Builder) SetInstDebugLocation Uses

func (b Builder) SetInstDebugLocation(v Value)

type ByteOrdering Uses

type ByteOrdering C.enum_LLVMByteOrdering
const (
    BigEndian    ByteOrdering = C.LLVMBigEndian
    LittleEndian ByteOrdering = C.LLVMLittleEndian

type CallConv Uses

type CallConv C.LLVMCallConv
const (
    CCallConv           CallConv = C.LLVMCCallConv
    FastCallConv        CallConv = C.LLVMFastCallConv
    ColdCallConv        CallConv = C.LLVMColdCallConv
    X86StdcallCallConv  CallConv = C.LLVMX86StdcallCallConv
    X86FastcallCallConv CallConv = C.LLVMX86FastcallCallConv

type CodeGenFileType Uses

type CodeGenFileType C.LLVMCodeGenFileType
const (
    AssemblyFile CodeGenFileType = C.LLVMAssemblyFile
    ObjectFile   CodeGenFileType = C.LLVMObjectFile

type CodeGenOptLevel Uses

type CodeGenOptLevel C.LLVMCodeGenOptLevel
const (
    CodeGenLevelNone       CodeGenOptLevel = C.LLVMCodeGenLevelNone
    CodeGenLevelLess       CodeGenOptLevel = C.LLVMCodeGenLevelLess
    CodeGenLevelDefault    CodeGenOptLevel = C.LLVMCodeGenLevelDefault
    CodeGenLevelAggressive CodeGenOptLevel = C.LLVMCodeGenLevelAggressive

type CodeModel Uses

type CodeModel C.LLVMCodeModel
const (
    CodeModelDefault    CodeModel = C.LLVMCodeModelDefault
    CodeModelJITDefault CodeModel = C.LLVMCodeModelJITDefault
    CodeModelTiny       CodeModel = C.LLVMCodeModelTiny
    CodeModelSmall      CodeModel = C.LLVMCodeModelSmall
    CodeModelKernel     CodeModel = C.LLVMCodeModelKernel
    CodeModelMedium     CodeModel = C.LLVMCodeModelMedium
    CodeModelLarge      CodeModel = C.LLVMCodeModelLarge

type Comdat Uses

type Comdat struct {
    C C.LLVMComdatRef

func (Comdat) SelectionKind Uses

func (c Comdat) SelectionKind() ComdatSelectionKind

func (Comdat) SetSelectionKind Uses

func (c Comdat) SetSelectionKind(k ComdatSelectionKind)

type ComdatSelectionKind Uses

type ComdatSelectionKind C.LLVMComdatSelectionKind
const (
    AnyComdatSelectionKind          ComdatSelectionKind = C.LLVMAnyComdatSelectionKind
    ExactMatchComdatSelectionKind   ComdatSelectionKind = C.LLVMExactMatchComdatSelectionKind
    LargestComdatSelectionKind      ComdatSelectionKind = C.LLVMLargestComdatSelectionKind
    NoDuplicatesComdatSelectionKind ComdatSelectionKind = C.LLVMNoDuplicatesComdatSelectionKind
    SameSizeComdatSelectionKind     ComdatSelectionKind = C.LLVMSameSizeComdatSelectionKind

type Context Uses

type Context struct {
    C C.LLVMContextRef

We use these weird structs here because *Ref types are pointers and Go's spec says that a pointer cannot be used as a receiver base type.

func GlobalContext Uses

func GlobalContext() Context

func NewContext Uses

func NewContext() Context

func (Context) AddBasicBlock Uses

func (c Context) AddBasicBlock(f Value, name string) (bb BasicBlock)

func (Context) ConstString Uses

func (c Context) ConstString(str string, addnull bool) (v Value)

Operations on composite constants

func (Context) ConstStruct Uses

func (c Context) ConstStruct(constVals []Value, packed bool) (v Value)

func (Context) CreateEnumAttribute Uses

func (c Context) CreateEnumAttribute(kind uint, val uint64) (a Attribute)

func (Context) CreateStringAttribute Uses

func (c Context) CreateStringAttribute(kind string, val string) (a Attribute)

func (Context) Dispose Uses

func (c Context) Dispose()

func (Context) DoubleType Uses

func (c Context) DoubleType() (t Type)

func (Context) FP128Type Uses

func (c Context) FP128Type() (t Type)

func (Context) FloatType Uses

func (c Context) FloatType() (t Type)

Operations on real types

func (Context) InsertBasicBlock Uses

func (c Context) InsertBasicBlock(ref BasicBlock, name string) (bb BasicBlock)

func (Context) Int16Type Uses

func (c Context) Int16Type() (t Type)

func (Context) Int1Type Uses

func (c Context) Int1Type() (t Type)

Operations on integer types

func (Context) Int32Type Uses

func (c Context) Int32Type() (t Type)

func (Context) Int64Type Uses

func (c Context) Int64Type() (t Type)

func (Context) Int8Type Uses

func (c Context) Int8Type() (t Type)

func (Context) IntType Uses

func (c Context) IntType(numbits int) (t Type)

func (Context) IsNil Uses

func (c Context) IsNil() bool

func (Context) LabelType Uses

func (c Context) LabelType() (t Type)

func (Context) MDKindID Uses

func (c Context) MDKindID(name string) (id int)

func (Context) MDNode Uses

func (c Context) MDNode(mds []Metadata) (md Metadata)

func (Context) MDString Uses

func (c Context) MDString(str string) (md Metadata)

Operations on metadata

func (Context) NewBuilder Uses

func (c Context) NewBuilder() (b Builder)

func (Context) NewModule Uses

func (c Context) NewModule(name string) (m Module)

func (Context) PPCFP128Type Uses

func (c Context) PPCFP128Type() (t Type)

func (Context) StructCreateNamed Uses

func (c Context) StructCreateNamed(name string) (t Type)

func (Context) StructType Uses

func (c Context) StructType(elementTypes []Type, packed bool) (t Type)

Operations on struct types

func (Context) TemporaryMDNode Uses

func (c Context) TemporaryMDNode(mds []Metadata) (md Metadata)

func (Context) TokenType Uses

func (c Context) TokenType() (t Type)

func (Context) VoidType Uses

func (c Context) VoidType() (t Type)

Operations on other types

func (Context) X86FP80Type Uses

func (c Context) X86FP80Type() (t Type)

type DIArrayType Uses

type DIArrayType struct {
    SizeInBits  uint64
    AlignInBits uint32
    ElementType Metadata
    Subscripts  []DISubrange

DIArrayType holds the values for creating array type debug metadata.

type DIAutoVariable Uses

type DIAutoVariable struct {
    Name           string
    File           Metadata
    Line           int
    Type           Metadata
    AlwaysPreserve bool
    Flags          int
    AlignInBits    uint32

DIAutoVariable holds the values for creating auto variable debug metadata.

type DIBasicType Uses

type DIBasicType struct {
    Name       string
    SizeInBits uint64
    Encoding   DwarfTypeEncoding

DIBasicType holds the values for creating basic type debug metadata.

type DIBuilder Uses

type DIBuilder struct {
    // contains filtered or unexported fields

DIBuilder is a wrapper for the LLVM DIBuilder class.

func NewDIBuilder Uses

func NewDIBuilder(m Module) *DIBuilder

NewDIBuilder creates a new DIBuilder, associated with the given module.

func (*DIBuilder) CreateArrayType Uses

func (d *DIBuilder) CreateArrayType(t DIArrayType) Metadata

CreateArrayType creates struct type debug metadata.

func (*DIBuilder) CreateAutoVariable Uses

func (d *DIBuilder) CreateAutoVariable(scope Metadata, v DIAutoVariable) Metadata

CreateAutoVariable creates local variable debug metadata.

func (*DIBuilder) CreateBasicType Uses

func (d *DIBuilder) CreateBasicType(t DIBasicType) Metadata

CreateBasicType creates basic type debug metadata.

func (*DIBuilder) CreateCompileUnit Uses

func (d *DIBuilder) CreateCompileUnit(cu DICompileUnit) Metadata

CreateCompileUnit creates compile unit debug metadata.

func (*DIBuilder) CreateExpression Uses

func (d *DIBuilder) CreateExpression(addr []int64) Metadata

CreateExpression creates a new descriptor for the specified variable which has a complex address expression for its address.

func (*DIBuilder) CreateFile Uses

func (d *DIBuilder) CreateFile(filename, dir string) Metadata

CreateFile creates file debug metadata.

func (*DIBuilder) CreateFunction Uses

func (d *DIBuilder) CreateFunction(diScope Metadata, f DIFunction) Metadata

CreateFunction creates function debug metadata.

func (*DIBuilder) CreateLexicalBlock Uses

func (d *DIBuilder) CreateLexicalBlock(diScope Metadata, b DILexicalBlock) Metadata

CreateLexicalBlock creates lexical block debug metadata.

func (*DIBuilder) CreateLexicalBlockFile Uses

func (d *DIBuilder) CreateLexicalBlockFile(diScope Metadata, diFile Metadata, discriminator int) Metadata

func (*DIBuilder) CreateMemberType Uses

func (d *DIBuilder) CreateMemberType(scope Metadata, t DIMemberType) Metadata

CreateMemberType creates struct type debug metadata.

func (*DIBuilder) CreateParameterVariable Uses

func (d *DIBuilder) CreateParameterVariable(scope Metadata, v DIParameterVariable) Metadata

CreateParameterVariable creates parameter variable debug metadata.

func (*DIBuilder) CreatePointerType Uses

func (d *DIBuilder) CreatePointerType(t DIPointerType) Metadata

CreatePointerType creates a type that represents a pointer to another type.

func (*DIBuilder) CreateReplaceableCompositeType Uses

func (d *DIBuilder) CreateReplaceableCompositeType(scope Metadata, t DIReplaceableCompositeType) Metadata

CreateReplaceableCompositeType creates replaceable composite type debug metadata.

func (*DIBuilder) CreateStructType Uses

func (d *DIBuilder) CreateStructType(scope Metadata, t DIStructType) Metadata

CreateStructType creates struct type debug metadata.

func (*DIBuilder) CreateSubroutineType Uses

func (d *DIBuilder) CreateSubroutineType(t DISubroutineType) Metadata

CreateSubroutineType creates subroutine type debug metadata.

func (*DIBuilder) CreateTypedef Uses

func (d *DIBuilder) CreateTypedef(t DITypedef) Metadata

CreateTypedef creates typedef type debug metadata.

func (*DIBuilder) Destroy Uses

func (d *DIBuilder) Destroy()

Destroy destroys the DIBuilder.

func (*DIBuilder) Finalize Uses

func (d *DIBuilder) Finalize()

FInalize finalizes the debug information generated by the DIBuilder.

func (*DIBuilder) InsertDeclareAtEnd Uses

func (d *DIBuilder) InsertDeclareAtEnd(v Value, diVarInfo, expr Metadata, l DebugLoc, bb BasicBlock) Value

InsertDeclareAtEnd inserts a call to llvm.dbg.declare at the end of the specified basic block for the given value and associated debug metadata.

func (*DIBuilder) InsertValueAtEnd Uses

func (d *DIBuilder) InsertValueAtEnd(v Value, diVarInfo, expr Metadata, l DebugLoc, bb BasicBlock) Value

InsertValueAtEnd inserts a call to llvm.dbg.value at the end of the specified basic block for the given value and associated debug metadata.

type DICompileUnit Uses

type DICompileUnit struct {
    Language       DwarfLang
    File           string
    Dir            string
    Producer       string
    Optimized      bool
    Flags          string
    RuntimeVersion int

DICompileUnit holds the values for creating compile unit debug metadata.

type DIFunction Uses

type DIFunction struct {
    Name         string
    LinkageName  string
    File         Metadata
    Line         int
    Type         Metadata
    LocalToUnit  bool
    IsDefinition bool
    ScopeLine    int
    Flags        int
    Optimized    bool

DIFunction holds the values for creating function debug metadata.

type DILexicalBlock Uses

type DILexicalBlock struct {
    File   Metadata
    Line   int
    Column int

DILexicalBlock holds the values for creating lexical block debug metadata.

type DIMemberType Uses

type DIMemberType struct {
    Name         string
    File         Metadata
    Line         int
    SizeInBits   uint64
    AlignInBits  uint32
    OffsetInBits uint64
    Flags        int
    Type         Metadata

DIMemberType holds the values for creating member type debug metadata.

type DIParameterVariable Uses

type DIParameterVariable struct {
    Name           string
    File           Metadata
    Line           int
    Type           Metadata
    AlwaysPreserve bool
    Flags          int

    // ArgNo is the 1-based index of the argument in the function's
    // parameter list.
    ArgNo int

DIParameterVariable holds the values for creating parameter variable debug metadata.

type DIPointerType Uses

type DIPointerType struct {
    Pointee      Metadata
    SizeInBits   uint64
    AlignInBits  uint32 // optional
    AddressSpace uint32
    Name         string // optional

DIPointerType holds the values for creating pointer type debug metadata.

type DIReplaceableCompositeType Uses

type DIReplaceableCompositeType struct {
    Tag         dwarf.Tag
    Name        string
    File        Metadata
    Line        int
    RuntimeLang int
    SizeInBits  uint64
    AlignInBits uint32
    Flags       int
    UniqueID    string

DIReplaceableCompositeType holds the values for creating replaceable composite type debug metadata.

type DIStructType Uses

type DIStructType struct {
    Name         string
    File         Metadata
    Line         int
    SizeInBits   uint64
    AlignInBits  uint32
    Flags        int
    DerivedFrom  Metadata
    Elements     []Metadata
    VTableHolder Metadata // optional
    UniqueID     string

DIStructType holds the values for creating struct type debug metadata.

type DISubrange Uses

type DISubrange struct {
    Lo    int64
    Count int64

DISubrange describes an integer value range.

type DISubroutineType Uses

type DISubroutineType struct {
    // File is the file in which the subroutine type is defined.
    File Metadata

    // Parameters contains the subroutine parameter types,
    // including the return type at the 0th index.
    Parameters []Metadata

    Flags int

DISubroutineType holds the values for creating subroutine type debug metadata.

type DITypedef Uses

type DITypedef struct {
    Type    Metadata
    Name    string
    File    Metadata
    Line    int
    Context Metadata

DITypedef holds the values for creating typedef type debug metadata.

type DebugLoc Uses

type DebugLoc struct {
    Line, Col uint
    Scope     Metadata
    InlinedAt Metadata


type DwarfLang Uses

type DwarfLang uint32
const (
    // http://dwarfstd.org/ShowIssue.php?issue=101014.1&type=open
    DW_LANG_Go DwarfLang = 0x0016

type DwarfTag Uses

type DwarfTag uint32
const (
    DW_TAG_lexical_block   DwarfTag = 0x0b
    DW_TAG_compile_unit    DwarfTag = 0x11
    DW_TAG_variable        DwarfTag = 0x34
    DW_TAG_base_type       DwarfTag = 0x24
    DW_TAG_pointer_type    DwarfTag = 0x0F
    DW_TAG_structure_type  DwarfTag = 0x13
    DW_TAG_subroutine_type DwarfTag = 0x15
    DW_TAG_file_type       DwarfTag = 0x29
    DW_TAG_subprogram      DwarfTag = 0x2E
    DW_TAG_auto_variable   DwarfTag = 0x100
    DW_TAG_arg_variable    DwarfTag = 0x101

type DwarfTypeEncoding Uses

type DwarfTypeEncoding uint32
const (
    DW_ATE_address         DwarfTypeEncoding = 0x01
    DW_ATE_boolean         DwarfTypeEncoding = 0x02
    DW_ATE_complex_float   DwarfTypeEncoding = 0x03
    DW_ATE_float           DwarfTypeEncoding = 0x04
    DW_ATE_signed          DwarfTypeEncoding = 0x05
    DW_ATE_signed_char     DwarfTypeEncoding = 0x06
    DW_ATE_unsigned        DwarfTypeEncoding = 0x07
    DW_ATE_unsigned_char   DwarfTypeEncoding = 0x08
    DW_ATE_imaginary_float DwarfTypeEncoding = 0x09
    DW_ATE_packed_decimal  DwarfTypeEncoding = 0x0a
    DW_ATE_numeric_string  DwarfTypeEncoding = 0x0b
    DW_ATE_edited          DwarfTypeEncoding = 0x0c
    DW_ATE_signed_fixed    DwarfTypeEncoding = 0x0d
    DW_ATE_unsigned_fixed  DwarfTypeEncoding = 0x0e
    DW_ATE_decimal_float   DwarfTypeEncoding = 0x0f
    DW_ATE_UTF             DwarfTypeEncoding = 0x10
    DW_ATE_lo_user         DwarfTypeEncoding = 0x80
    DW_ATE_hi_user         DwarfTypeEncoding = 0xff

type ExecutionEngine Uses

type ExecutionEngine struct {
    C C.LLVMExecutionEngineRef

func NewExecutionEngine Uses

func NewExecutionEngine(m Module) (ee ExecutionEngine, err error)

func NewInterpreter Uses

func NewInterpreter(m Module) (ee ExecutionEngine, err error)

func NewMCJITCompiler Uses

func NewMCJITCompiler(m Module, options MCJITCompilerOptions) (ee ExecutionEngine, err error)

func (ExecutionEngine) AddGlobalMapping Uses

func (ee ExecutionEngine) AddGlobalMapping(global Value, addr unsafe.Pointer)

func (ExecutionEngine) AddModule Uses

func (ee ExecutionEngine) AddModule(m Module)

func (ExecutionEngine) Dispose Uses

func (ee ExecutionEngine) Dispose()

func (ExecutionEngine) FindFunction Uses

func (ee ExecutionEngine) FindFunction(name string) (f Value)

func (ExecutionEngine) FreeMachineCodeForFunction Uses

func (ee ExecutionEngine) FreeMachineCodeForFunction(f Value)

func (ExecutionEngine) PointerToGlobal Uses

func (ee ExecutionEngine) PointerToGlobal(global Value) unsafe.Pointer

func (ExecutionEngine) RecompileAndRelinkFunction Uses

func (ee ExecutionEngine) RecompileAndRelinkFunction(f Value) unsafe.Pointer

func (ExecutionEngine) RemoveModule Uses

func (ee ExecutionEngine) RemoveModule(m Module)

func (ExecutionEngine) RunFunction Uses

func (ee ExecutionEngine) RunFunction(f Value, args []GenericValue) (g GenericValue)

func (ExecutionEngine) RunStaticConstructors Uses

func (ee ExecutionEngine) RunStaticConstructors()

func (ExecutionEngine) RunStaticDestructors Uses

func (ee ExecutionEngine) RunStaticDestructors()

func (ExecutionEngine) TargetData Uses

func (ee ExecutionEngine) TargetData() (td TargetData)

type FloatPredicate Uses

type FloatPredicate C.LLVMRealPredicate
const (
    FloatPredicateFalse FloatPredicate = C.LLVMRealPredicateFalse
    FloatOEQ            FloatPredicate = C.LLVMRealOEQ
    FloatOGT            FloatPredicate = C.LLVMRealOGT
    FloatOGE            FloatPredicate = C.LLVMRealOGE
    FloatOLT            FloatPredicate = C.LLVMRealOLT
    FloatOLE            FloatPredicate = C.LLVMRealOLE
    FloatONE            FloatPredicate = C.LLVMRealONE
    FloatORD            FloatPredicate = C.LLVMRealORD
    FloatUNO            FloatPredicate = C.LLVMRealUNO
    FloatUEQ            FloatPredicate = C.LLVMRealUEQ
    FloatUGT            FloatPredicate = C.LLVMRealUGT
    FloatUGE            FloatPredicate = C.LLVMRealUGE
    FloatULT            FloatPredicate = C.LLVMRealULT
    FloatULE            FloatPredicate = C.LLVMRealULE
    FloatUNE            FloatPredicate = C.LLVMRealUNE
    FloatPredicateTrue  FloatPredicate = C.LLVMRealPredicateTrue

type GenericValue Uses

type GenericValue struct {
    C C.LLVMGenericValueRef

func NewGenericValueFromFloat Uses

func NewGenericValueFromFloat(t Type, n float64) (g GenericValue)

func NewGenericValueFromInt Uses

func NewGenericValueFromInt(t Type, n uint64, signed bool) (g GenericValue)

func NewGenericValueFromPointer Uses

func NewGenericValueFromPointer(p unsafe.Pointer) (g GenericValue)

func (GenericValue) Dispose Uses

func (g GenericValue) Dispose()

func (GenericValue) Float Uses

func (g GenericValue) Float(t Type) float64

func (GenericValue) Int Uses

func (g GenericValue) Int(signed bool) uint64

func (GenericValue) IntWidth Uses

func (g GenericValue) IntWidth() int

func (GenericValue) Pointer Uses

func (g GenericValue) Pointer() unsafe.Pointer

type InlineAsmDialect Uses

type InlineAsmDialect C.LLVMInlineAsmDialect
const (
    InlineAsmDialectATT   InlineAsmDialect = C.LLVMInlineAsmDialectATT
    InlineAsmDialectIntel InlineAsmDialect = C.LLVMInlineAsmDialectIntel

type IntPredicate Uses

type IntPredicate C.LLVMIntPredicate
const (
    IntEQ  IntPredicate = C.LLVMIntEQ
    IntNE  IntPredicate = C.LLVMIntNE
    IntUGT IntPredicate = C.LLVMIntUGT
    IntUGE IntPredicate = C.LLVMIntUGE
    IntULT IntPredicate = C.LLVMIntULT
    IntULE IntPredicate = C.LLVMIntULE
    IntSGT IntPredicate = C.LLVMIntSGT
    IntSGE IntPredicate = C.LLVMIntSGE
    IntSLT IntPredicate = C.LLVMIntSLT
    IntSLE IntPredicate = C.LLVMIntSLE

type LandingPadClause Uses

type LandingPadClause C.LLVMLandingPadClauseTy
const (
    LandingPadCatch  LandingPadClause = C.LLVMLandingPadCatch
    LandingPadFilter LandingPadClause = C.LLVMLandingPadFilter

type Linkage Uses

type Linkage C.LLVMLinkage
const (
    ExternalLinkage            Linkage = C.LLVMExternalLinkage
    AvailableExternallyLinkage Linkage = C.LLVMAvailableExternallyLinkage
    LinkOnceAnyLinkage         Linkage = C.LLVMLinkOnceAnyLinkage
    LinkOnceODRLinkage         Linkage = C.LLVMLinkOnceODRLinkage
    WeakAnyLinkage             Linkage = C.LLVMWeakAnyLinkage
    WeakODRLinkage             Linkage = C.LLVMWeakODRLinkage
    AppendingLinkage           Linkage = C.LLVMAppendingLinkage
    InternalLinkage            Linkage = C.LLVMInternalLinkage
    PrivateLinkage             Linkage = C.LLVMPrivateLinkage
    ExternalWeakLinkage        Linkage = C.LLVMExternalWeakLinkage
    CommonLinkage              Linkage = C.LLVMCommonLinkage

type MCJITCompilerOptions Uses

type MCJITCompilerOptions struct {
    C C.struct_LLVMMCJITCompilerOptions

func NewMCJITCompilerOptions Uses

func NewMCJITCompilerOptions() MCJITCompilerOptions

func (*MCJITCompilerOptions) SetMCJITCodeModel Uses

func (options *MCJITCompilerOptions) SetMCJITCodeModel(CodeModel CodeModel)

func (*MCJITCompilerOptions) SetMCJITEnableFastISel Uses

func (options *MCJITCompilerOptions) SetMCJITEnableFastISel(fastisel bool)

func (*MCJITCompilerOptions) SetMCJITNoFramePointerElim Uses

func (options *MCJITCompilerOptions) SetMCJITNoFramePointerElim(nfp bool)

func (*MCJITCompilerOptions) SetMCJITOptimizationLevel Uses

func (options *MCJITCompilerOptions) SetMCJITOptimizationLevel(level uint)

type MemoryBuffer Uses

type MemoryBuffer struct {
    C C.LLVMMemoryBufferRef

func NewMemoryBufferFromFile Uses

func NewMemoryBufferFromFile(path string) (b MemoryBuffer, err error)

func NewMemoryBufferFromStdin Uses

func NewMemoryBufferFromStdin() (b MemoryBuffer, err error)

func WriteBitcodeToMemoryBuffer Uses

func WriteBitcodeToMemoryBuffer(m Module) MemoryBuffer

func (MemoryBuffer) Bytes Uses

func (b MemoryBuffer) Bytes() []byte

func (MemoryBuffer) Dispose Uses

func (b MemoryBuffer) Dispose()

func (MemoryBuffer) IsNil Uses

func (c MemoryBuffer) IsNil() bool

type Metadata Uses

type Metadata struct {
    C C.LLVMMetadataRef

func (Metadata) FileDirectory Uses

func (md Metadata) FileDirectory() string

FileDirectory returns the directory of a DIFile metadata node.

func (Metadata) FileFilename Uses

func (md Metadata) FileFilename() string

FileFilename returns the filename of a DIFile metadata node.

func (Metadata) FileSource Uses

func (md Metadata) FileSource() string

FileSource returns the source of a DIFile metadata node.

func (Metadata) IsNil Uses

func (c Metadata) IsNil() bool

func (Metadata) Kind Uses

func (md Metadata) Kind() MetadataKind

Kind returns the metadata kind.

func (Metadata) LocationColumn Uses

func (md Metadata) LocationColumn() uint

LocationColumn returns the column (offset from the start of the line) of a DILocation.

func (Metadata) LocationInlinedAt Uses

func (md Metadata) LocationInlinedAt() Metadata

LocationInlinedAt return the "inline at" location associated with this debug location.

func (Metadata) LocationLine Uses

func (md Metadata) LocationLine() uint

LocationLine returns the line number of a DILocation.

func (Metadata) LocationScope Uses

func (md Metadata) LocationScope() Metadata

LocationScope returns the local scope associated with this debug location.

func (Metadata) ReplaceAllUsesWith Uses

func (md Metadata) ReplaceAllUsesWith(new Metadata)

func (Metadata) ScopeFile Uses

func (md Metadata) ScopeFile() Metadata

ScopeFile returns the file (DIFile) of a given scope.

type MetadataKind Uses

type MetadataKind C.LLVMMetadataKind

type Module Uses

type Module struct {
    C C.LLVMModuleRef

func NewModule Uses

func NewModule(name string) (m Module)

Create and destroy modules. See llvm::Module::Module.

func ParseBitcodeFile Uses

func ParseBitcodeFile(name string) (Module, error)

ParseBitcodeFile parses the LLVM IR (bitcode) in the file with the specified name, and returns a new LLVM module.

func (Module) AddNamedMetadataOperand Uses

func (m Module) AddNamedMetadataOperand(name string, operand Metadata)

func (Module) Comdat Uses

func (m Module) Comdat(name string) (c Comdat)

Operations on comdat

func (Module) Context Uses

func (m Module) Context() (c Context)

func (Module) DataLayout Uses

func (m Module) DataLayout() string

Data layout. See Module::getDataLayout.

func (Module) Dispose Uses

func (m Module) Dispose()

See llvm::Module::~Module

func (Module) Dump Uses

func (m Module) Dump()

See Module::dump.

func (Module) FirstFunction Uses

func (m Module) FirstFunction() (v Value)

func (Module) FirstGlobal Uses

func (m Module) FirstGlobal() (v Value)

func (Module) GetTypeByName Uses

func (m Module) GetTypeByName(name string) (t Type)

func (Module) IsNil Uses

func (c Module) IsNil() bool

func (Module) LastFunction Uses

func (m Module) LastFunction() (v Value)

func (Module) LastGlobal Uses

func (m Module) LastGlobal() (v Value)

func (Module) NamedFunction Uses

func (m Module) NamedFunction(name string) (v Value)

func (Module) NamedGlobal Uses

func (m Module) NamedGlobal(name string) (v Value)

func (Module) SetDataLayout Uses

func (m Module) SetDataLayout(layout string)

func (Module) SetInlineAsm Uses

func (m Module) SetInlineAsm(asm string)

See Module::setModuleInlineAsm.

func (Module) SetTarget Uses

func (m Module) SetTarget(target string)

func (Module) String Uses

func (m Module) String() string

func (Module) Target Uses

func (m Module) Target() string

Target triple. See Module::getTargetTriple.

type ModuleProvider Uses

type ModuleProvider struct {
    C C.LLVMModuleProviderRef

func NewModuleProviderForModule Uses

func NewModuleProviderForModule(m Module) (mp ModuleProvider)

Changes the type of M so it can be passed to FunctionPassManagers and the JIT. They take ModuleProviders for historical reasons.

func (ModuleProvider) Dispose Uses

func (mp ModuleProvider) Dispose()

Destroys the module M.

func (ModuleProvider) IsNil Uses

func (c ModuleProvider) IsNil() bool

type Opcode Uses

type Opcode C.LLVMOpcode
const (
    Ret         Opcode = C.LLVMRet
    Br          Opcode = C.LLVMBr
    Switch      Opcode = C.LLVMSwitch
    IndirectBr  Opcode = C.LLVMIndirectBr
    Invoke      Opcode = C.LLVMInvoke
    Unreachable Opcode = C.LLVMUnreachable

    // Standard Binary Operators
    Add  Opcode = C.LLVMAdd
    FAdd Opcode = C.LLVMFAdd
    Sub  Opcode = C.LLVMSub
    FSub Opcode = C.LLVMFSub
    Mul  Opcode = C.LLVMMul
    FMul Opcode = C.LLVMFMul
    UDiv Opcode = C.LLVMUDiv
    SDiv Opcode = C.LLVMSDiv
    FDiv Opcode = C.LLVMFDiv
    URem Opcode = C.LLVMURem
    SRem Opcode = C.LLVMSRem
    FRem Opcode = C.LLVMFRem

    // Logical Operators
    Shl  Opcode = C.LLVMShl
    LShr Opcode = C.LLVMLShr
    AShr Opcode = C.LLVMAShr
    And  Opcode = C.LLVMAnd
    Or   Opcode = C.LLVMOr
    Xor  Opcode = C.LLVMXor

    // Memory Operators
    Alloca        Opcode = C.LLVMAlloca
    Load          Opcode = C.LLVMLoad
    Store         Opcode = C.LLVMStore
    GetElementPtr Opcode = C.LLVMGetElementPtr

    // Cast Operators
    Trunc    Opcode = C.LLVMTrunc
    ZExt     Opcode = C.LLVMZExt
    SExt     Opcode = C.LLVMSExt
    FPToUI   Opcode = C.LLVMFPToUI
    FPToSI   Opcode = C.LLVMFPToSI
    UIToFP   Opcode = C.LLVMUIToFP
    SIToFP   Opcode = C.LLVMSIToFP
    FPTrunc  Opcode = C.LLVMFPTrunc
    FPExt    Opcode = C.LLVMFPExt
    PtrToInt Opcode = C.LLVMPtrToInt
    IntToPtr Opcode = C.LLVMIntToPtr
    BitCast  Opcode = C.LLVMBitCast

    // Other Operators
    ICmp   Opcode = C.LLVMICmp
    FCmp   Opcode = C.LLVMFCmp
    PHI    Opcode = C.LLVMPHI
    Call   Opcode = C.LLVMCall
    Select Opcode = C.LLVMSelect
    // UserOp1
    // UserOp2
    VAArg          Opcode = C.LLVMVAArg
    ExtractElement Opcode = C.LLVMExtractElement
    InsertElement  Opcode = C.LLVMInsertElement
    ShuffleVector  Opcode = C.LLVMShuffleVector
    ExtractValue   Opcode = C.LLVMExtractValue
    InsertValue    Opcode = C.LLVMInsertValue

type PassManager Uses

type PassManager struct {
    C C.LLVMPassManagerRef

func NewFunctionPassManagerForModule Uses

func NewFunctionPassManagerForModule(m Module) (pm PassManager)

Constructs a new function-by-function pass pipeline over the module provider. It does not take ownership of the module provider. This type of pipeline is suitable for code generation and JIT compilation tasks. See llvm::FunctionPassManager::FunctionPassManager.

func NewPassManager Uses

func NewPassManager() (pm PassManager)

Constructs a new whole-module pass pipeline. This type of pipeline is suitable for link-time optimization and whole-module transformations. See llvm::PassManager::PassManager.

func (PassManager) AddAddressSanitizerFunctionPass Uses

func (pm PassManager) AddAddressSanitizerFunctionPass()

func (PassManager) AddAddressSanitizerModulePass Uses

func (pm PassManager) AddAddressSanitizerModulePass()

func (PassManager) AddAggressiveDCEPass Uses

func (pm PassManager) AddAggressiveDCEPass()

func (PassManager) AddArgumentPromotionPass Uses

func (pm PassManager) AddArgumentPromotionPass()

func (PassManager) AddCFGSimplificationPass Uses

func (pm PassManager) AddCFGSimplificationPass()

func (PassManager) AddConstantMergePass Uses

func (pm PassManager) AddConstantMergePass()

func (PassManager) AddConstantPropagationPass Uses

func (pm PassManager) AddConstantPropagationPass()

func (PassManager) AddCoroCleanupPass Uses

func (pm PassManager) AddCoroCleanupPass()

func (PassManager) AddCoroEarlyPass Uses

func (pm PassManager) AddCoroEarlyPass()

func (PassManager) AddCoroElidePass Uses

func (pm PassManager) AddCoroElidePass()

func (PassManager) AddCoroSplitPass Uses

func (pm PassManager) AddCoroSplitPass()

func (PassManager) AddDataFlowSanitizerPass Uses

func (pm PassManager) AddDataFlowSanitizerPass(abilist []string)

func (PassManager) AddDeadArgEliminationPass Uses

func (pm PassManager) AddDeadArgEliminationPass()

func (PassManager) AddDeadStoreEliminationPass Uses

func (pm PassManager) AddDeadStoreEliminationPass()

func (PassManager) AddDemoteMemoryToRegisterPass Uses

func (pm PassManager) AddDemoteMemoryToRegisterPass()

func (PassManager) AddFunctionAttrsPass Uses

func (pm PassManager) AddFunctionAttrsPass()

func (PassManager) AddFunctionInliningPass Uses

func (pm PassManager) AddFunctionInliningPass()

func (PassManager) AddGVNPass Uses

func (pm PassManager) AddGVNPass()

func (PassManager) AddGlobalDCEPass Uses

func (pm PassManager) AddGlobalDCEPass()

func (PassManager) AddGlobalOptimizerPass Uses

func (pm PassManager) AddGlobalOptimizerPass()

func (PassManager) AddIPConstantPropagationPass Uses

func (pm PassManager) AddIPConstantPropagationPass()

func (PassManager) AddIPSCCPPass Uses

func (pm PassManager) AddIPSCCPPass()

func (PassManager) AddIndVarSimplifyPass Uses

func (pm PassManager) AddIndVarSimplifyPass()

func (PassManager) AddInstructionCombiningPass Uses

func (pm PassManager) AddInstructionCombiningPass()

func (PassManager) AddInternalizePass Uses

func (pm PassManager) AddInternalizePass(allButMain bool)

func (PassManager) AddJumpThreadingPass Uses

func (pm PassManager) AddJumpThreadingPass()

func (PassManager) AddLICMPass Uses

func (pm PassManager) AddLICMPass()

func (PassManager) AddLoopDeletionPass Uses

func (pm PassManager) AddLoopDeletionPass()

func (PassManager) AddLoopRotatePass Uses

func (pm PassManager) AddLoopRotatePass()

func (PassManager) AddLoopUnrollPass Uses

func (pm PassManager) AddLoopUnrollPass()

func (PassManager) AddLoopUnswitchPass Uses

func (pm PassManager) AddLoopUnswitchPass()

func (PassManager) AddMemCpyOptPass Uses

func (pm PassManager) AddMemCpyOptPass()

func (PassManager) AddMemorySanitizerLegacyPassPass Uses

func (pm PassManager) AddMemorySanitizerLegacyPassPass()

func (PassManager) AddPromoteMemoryToRegisterPass Uses

func (pm PassManager) AddPromoteMemoryToRegisterPass()

func (PassManager) AddPruneEHPass Uses

func (pm PassManager) AddPruneEHPass()

func (PassManager) AddReassociatePass Uses

func (pm PassManager) AddReassociatePass()

func (PassManager) AddSCCPPass Uses

func (pm PassManager) AddSCCPPass()

func (PassManager) AddScalarReplAggregatesPass Uses

func (pm PassManager) AddScalarReplAggregatesPass()

func (PassManager) AddScalarReplAggregatesPassWithThreshold Uses

func (pm PassManager) AddScalarReplAggregatesPassWithThreshold(threshold int)

func (PassManager) AddSimplifyLibCallsPass Uses

func (pm PassManager) AddSimplifyLibCallsPass()

func (PassManager) AddStripDeadPrototypesPass Uses

func (pm PassManager) AddStripDeadPrototypesPass()

func (PassManager) AddTailCallEliminationPass Uses

func (pm PassManager) AddTailCallEliminationPass()

func (PassManager) AddThreadSanitizerPass Uses

func (pm PassManager) AddThreadSanitizerPass()

func (PassManager) AddVerifierPass Uses

func (pm PassManager) AddVerifierPass()

func (PassManager) Dispose Uses

func (pm PassManager) Dispose()

Frees the memory of a pass pipeline. For function pipelines, does not free the module provider. See llvm::PassManagerBase::~PassManagerBase.

func (PassManager) FinalizeFunc Uses

func (pm PassManager) FinalizeFunc() bool

Finalizes all of the function passes scheduled in the function pass manager. Returns 1 if any of the passes modified the module, 0 otherwise. See llvm::FunctionPassManager::doFinalization.

func (PassManager) InitializeFunc Uses

func (pm PassManager) InitializeFunc() bool

Initializes all of the function passes scheduled in the function pass manager. Returns 1 if any of the passes modified the module, 0 otherwise. See llvm::FunctionPassManager::doInitialization.

func (PassManager) IsNil Uses

func (c PassManager) IsNil() bool

func (PassManager) Run Uses

func (pm PassManager) Run(m Module) bool

Initializes, executes on the provided module, and finalizes all of the passes scheduled in the pass manager. Returns 1 if any of the passes modified the module, 0 otherwise. See llvm::PassManager::run(Module&).

func (PassManager) RunFunc Uses

func (pm PassManager) RunFunc(f Value) bool

Executes all of the function passes scheduled in the function pass manager on the provided function. Returns 1 if any of the passes modified the function, false otherwise. See llvm::FunctionPassManager::run(Function&).

type PassManagerBuilder Uses

type PassManagerBuilder struct {
    C C.LLVMPassManagerBuilderRef

func NewPassManagerBuilder Uses

func NewPassManagerBuilder() (pmb PassManagerBuilder)

func (PassManagerBuilder) Dispose Uses

func (pmb PassManagerBuilder) Dispose()

func (PassManagerBuilder) Populate Uses

func (pmb PassManagerBuilder) Populate(pm PassManager)

func (PassManagerBuilder) PopulateFunc Uses

func (pmb PassManagerBuilder) PopulateFunc(pm PassManager)

func (PassManagerBuilder) PopulateLTOPassManager Uses

func (pmb PassManagerBuilder) PopulateLTOPassManager(pm PassManager, internalize bool, runInliner bool)

func (PassManagerBuilder) SetDisableSimplifyLibCalls Uses

func (pmb PassManagerBuilder) SetDisableSimplifyLibCalls(val bool)

func (PassManagerBuilder) SetDisableUnitAtATime Uses

func (pmb PassManagerBuilder) SetDisableUnitAtATime(val bool)

func (PassManagerBuilder) SetDisableUnrollLoops Uses

func (pmb PassManagerBuilder) SetDisableUnrollLoops(val bool)

func (PassManagerBuilder) SetOptLevel Uses

func (pmb PassManagerBuilder) SetOptLevel(level int)

func (PassManagerBuilder) SetSizeLevel Uses

func (pmb PassManagerBuilder) SetSizeLevel(level int)

func (PassManagerBuilder) UseInlinerWithThreshold Uses

func (pmb PassManagerBuilder) UseInlinerWithThreshold(threshold uint)

type RelocMode Uses

type RelocMode C.LLVMRelocMode
const (
    RelocDefault      RelocMode = C.LLVMRelocDefault
    RelocStatic       RelocMode = C.LLVMRelocStatic
    RelocPIC          RelocMode = C.LLVMRelocPIC
    RelocDynamicNoPic RelocMode = C.LLVMRelocDynamicNoPic

type Target Uses

type Target struct {
    C C.LLVMTargetRef

func FirstTarget Uses

func FirstTarget() Target

func GetTargetFromTriple Uses

func GetTargetFromTriple(triple string) (t Target, err error)

func (Target) CreateTargetMachine Uses

func (t Target) CreateTargetMachine(Triple string, CPU string, Features string,
    Level CodeGenOptLevel, Reloc RelocMode,
    CodeModel CodeModel) (tm TargetMachine)

CreateTargetMachine creates a new TargetMachine.

func (Target) Description Uses

func (t Target) Description() string

func (Target) Name Uses

func (t Target) Name() string

func (Target) NextTarget Uses

func (t Target) NextTarget() Target

type TargetData Uses

type TargetData struct {
    C C.LLVMTargetDataRef

func NewTargetData Uses

func NewTargetData(rep string) (td TargetData)

Creates target data from a target layout string. See the constructor llvm::TargetData::TargetData.

func (TargetData) ABITypeAlignment Uses

func (td TargetData) ABITypeAlignment(t Type) int

Computes the ABI alignment of a type in bytes for a target. See the method llvm::TargetData::getABITypeAlignment.

func (TargetData) ByteOrder Uses

func (td TargetData) ByteOrder() ByteOrdering

Returns the byte order of a target, either BigEndian or LittleEndian. See the method llvm::TargetData::isLittleEndian.

func (TargetData) CallFrameTypeAlignment Uses

func (td TargetData) CallFrameTypeAlignment(t Type) int

Computes the call frame alignment of a type in bytes for a target. See the method llvm::TargetData::getCallFrameTypeAlignment.

func (TargetData) Dispose Uses

func (td TargetData) Dispose()

Deallocates a TargetData. See the destructor llvm::TargetData::~TargetData.

func (TargetData) ElementContainingOffset Uses

func (td TargetData) ElementContainingOffset(t Type, offset uint64) int

Computes the structure element that contains the byte offset for a target. See the method llvm::StructLayout::getElementContainingOffset.

func (TargetData) ElementOffset Uses

func (td TargetData) ElementOffset(t Type, element int) uint64

Computes the byte offset of the indexed struct element for a target. See the method llvm::StructLayout::getElementOffset.

func (TargetData) IntPtrType Uses

func (td TargetData) IntPtrType() (t Type)

Returns the integer type that is the same size as a pointer on a target. See the method llvm::TargetData::getIntPtrType.

func (TargetData) PointerSize Uses

func (td TargetData) PointerSize() int

Returns the pointer size in bytes for a target. See the method llvm::TargetData::getPointerSize.

func (TargetData) PrefTypeAlignment Uses

func (td TargetData) PrefTypeAlignment(t Type) int

Computes the preferred alignment of a type in bytes for a target. See the method llvm::TargetData::getPrefTypeAlignment.

func (TargetData) PreferredAlignment Uses

func (td TargetData) PreferredAlignment(g Value) int

Computes the preferred alignment of a global variable in bytes for a target. See the method llvm::TargetData::getPreferredAlignment.

func (TargetData) String Uses

func (td TargetData) String() (s string)

Converts target data to a target layout string. The string must be disposed with LLVMDisposeMessage. See the constructor llvm::TargetData::TargetData.

func (TargetData) TypeAllocSize Uses

func (td TargetData) TypeAllocSize(t Type) uint64

Computes the ABI size of a type in bytes for a target. See the method llvm::TargetData::getTypeAllocSize.

func (TargetData) TypeSizeInBits Uses

func (td TargetData) TypeSizeInBits(t Type) uint64

Computes the size of a type in bytes for a target. See the method llvm::TargetData::getTypeSizeInBits.

func (TargetData) TypeStoreSize Uses

func (td TargetData) TypeStoreSize(t Type) uint64

Computes the storage size of a type in bytes for a target. See the method llvm::TargetData::getTypeStoreSize.

type TargetMachine Uses

type TargetMachine struct {
    C C.LLVMTargetMachineRef

func (TargetMachine) AddAnalysisPasses Uses

func (tm TargetMachine) AddAnalysisPasses(pm PassManager)

func (TargetMachine) CreateTargetData Uses

func (tm TargetMachine) CreateTargetData() TargetData

CreateTargetData returns a new TargetData describing the TargetMachine's data layout. The returned TargetData is owned by the caller, who is responsible for disposing of it by calling the TargetData.Dispose method.

func (TargetMachine) Dispose Uses

func (tm TargetMachine) Dispose()

Dispose releases resources related to the TargetMachine.

func (TargetMachine) EmitToMemoryBuffer Uses

func (tm TargetMachine) EmitToMemoryBuffer(m Module, ft CodeGenFileType) (MemoryBuffer, error)

func (TargetMachine) Triple Uses

func (tm TargetMachine) Triple() string

Triple returns the triple describing the machine (arch-vendor-os).

type Type Uses

type Type struct {
    C C.LLVMTypeRef

func ArrayType Uses

func ArrayType(elementType Type, elementCount int) (t Type)

func DoubleType Uses

func DoubleType() (t Type)

func FP128Type Uses

func FP128Type() (t Type)

func FloatType Uses

func FloatType() (t Type)

func FunctionType Uses

func FunctionType(returnType Type, paramTypes []Type, isVarArg bool) (t Type)

Operations on function types

func Int16Type Uses

func Int16Type() (t Type)

func Int1Type Uses

func Int1Type() (t Type)

func Int32Type Uses

func Int32Type() (t Type)

func Int64Type Uses

func Int64Type() (t Type)

func Int8Type Uses

func Int8Type() (t Type)

func IntType Uses

func IntType(numbits int) (t Type)

func LabelType Uses

func LabelType() (t Type)

func PPCFP128Type Uses

func PPCFP128Type() (t Type)

func PointerType Uses

func PointerType(elementType Type, addressSpace int) (t Type)

func StructType Uses

func StructType(elementTypes []Type, packed bool) (t Type)

func VectorType Uses

func VectorType(elementType Type, elementCount int) (t Type)

func VoidType Uses

func VoidType() (t Type)

func X86FP80Type Uses

func X86FP80Type() (t Type)

func (Type) ArrayLength Uses

func (t Type) ArrayLength() int

func (Type) Context Uses

func (t Type) Context() (c Context)

See llvm::LLVMType::getContext.

func (Type) ElementType Uses

func (t Type) ElementType() (rt Type)

func (Type) IntTypeWidth Uses

func (t Type) IntTypeWidth() int

func (Type) IsFunctionVarArg Uses

func (t Type) IsFunctionVarArg() bool

func (Type) IsNil Uses

func (c Type) IsNil() bool

func (Type) IsStructPacked Uses

func (t Type) IsStructPacked() bool

func (Type) ParamTypes Uses

func (t Type) ParamTypes() []Type

func (Type) ParamTypesCount Uses

func (t Type) ParamTypesCount() int

func (Type) PointerAddressSpace Uses

func (t Type) PointerAddressSpace() int

func (Type) ReturnType Uses

func (t Type) ReturnType() (rt Type)

func (Type) String Uses

func (t Type) String() string

func (Type) StructElementTypes Uses

func (t Type) StructElementTypes() []Type

func (Type) StructElementTypesCount Uses

func (t Type) StructElementTypesCount() int

func (Type) StructName Uses

func (t Type) StructName() string

func (Type) StructSetBody Uses

func (t Type) StructSetBody(elementTypes []Type, packed bool)

func (Type) Subtypes Uses

func (t Type) Subtypes() (ret []Type)

Operations on array, pointer, and vector types (sequence types)

func (Type) TypeKind Uses

func (t Type) TypeKind() TypeKind

See llvm::LLVMTypeKind::getTypeID.

func (Type) VectorSize Uses

func (t Type) VectorSize() int

type TypeKind Uses

type TypeKind C.LLVMTypeKind
const (
    VoidTypeKind      TypeKind = C.LLVMVoidTypeKind
    FloatTypeKind     TypeKind = C.LLVMFloatTypeKind
    DoubleTypeKind    TypeKind = C.LLVMDoubleTypeKind
    X86_FP80TypeKind  TypeKind = C.LLVMX86_FP80TypeKind
    FP128TypeKind     TypeKind = C.LLVMFP128TypeKind
    PPC_FP128TypeKind TypeKind = C.LLVMPPC_FP128TypeKind
    LabelTypeKind     TypeKind = C.LLVMLabelTypeKind
    IntegerTypeKind   TypeKind = C.LLVMIntegerTypeKind
    FunctionTypeKind  TypeKind = C.LLVMFunctionTypeKind
    StructTypeKind    TypeKind = C.LLVMStructTypeKind
    ArrayTypeKind     TypeKind = C.LLVMArrayTypeKind
    PointerTypeKind   TypeKind = C.LLVMPointerTypeKind
    VectorTypeKind    TypeKind = C.LLVMVectorTypeKind
    MetadataTypeKind  TypeKind = C.LLVMMetadataTypeKind
    TokenTypeKind     TypeKind = C.LLVMTokenTypeKind

func (TypeKind) String Uses

func (t TypeKind) String() string

type Use Uses

type Use struct {
    C C.LLVMUseRef

func (Use) IsNil Uses

func (c Use) IsNil() bool

func (Use) NextUse Uses

func (u Use) NextUse() (ru Use)

func (Use) UsedValue Uses

func (u Use) UsedValue() (v Value)

func (Use) User Uses

func (u Use) User() (v Value)

type Value Uses

type Value struct {
    C C.LLVMValueRef

func AddAlias Uses

func AddAlias(m Module, t Type, aliasee Value, name string) (v Value)

Operations on aliases

func AddFunction Uses

func AddFunction(m Module, name string, ft Type) (v Value)

Operations on functions

func AddGlobal Uses

func AddGlobal(m Module, t Type, name string) (v Value)

Operations on global variables

func AddGlobalInAddressSpace Uses

func AddGlobalInAddressSpace(m Module, t Type, name string, addressSpace int) (v Value)

func AlignOf Uses

func AlignOf(t Type) (v Value)

func BlockAddress Uses

func BlockAddress(f Value, bb BasicBlock) (v Value)

func ConstAShr Uses

func ConstAShr(lhs, rhs Value) (v Value)

func ConstAdd Uses

func ConstAdd(lhs, rhs Value) (v Value)

func ConstAllOnes Uses

func ConstAllOnes(t Type) (v Value)

func ConstAnd Uses

func ConstAnd(lhs, rhs Value) (v Value)

func ConstArray Uses

func ConstArray(t Type, constVals []Value) (v Value)

func ConstBitCast Uses

func ConstBitCast(v Value, t Type) (rv Value)

func ConstExactSDiv Uses

func ConstExactSDiv(lhs, rhs Value) (v Value)

func ConstExtractElement Uses

func ConstExtractElement(vec, i Value) (rv Value)

func ConstExtractValue Uses

func ConstExtractValue(agg Value, indices []uint32) (rv Value)

func ConstFAdd Uses

func ConstFAdd(lhs, rhs Value) (v Value)

func ConstFCmp Uses

func ConstFCmp(pred FloatPredicate, lhs, rhs Value) (v Value)

func ConstFDiv Uses

func ConstFDiv(lhs, rhs Value) (v Value)

func ConstFMul Uses

func ConstFMul(lhs, rhs Value) (v Value)

func ConstFNeg Uses

func ConstFNeg(v Value) (rv Value)

func ConstFPCast Uses

func ConstFPCast(v Value, t Type) (rv Value)

func ConstFPExt Uses

func ConstFPExt(v Value, t Type) (rv Value)

func ConstFPToSI Uses

func ConstFPToSI(v Value, t Type) (rv Value)

func ConstFPToUI Uses

func ConstFPToUI(v Value, t Type) (rv Value)

func ConstFPTrunc Uses

func ConstFPTrunc(v Value, t Type) (rv Value)

func ConstFRem Uses

func ConstFRem(lhs, rhs Value) (v Value)

func ConstFSub Uses

func ConstFSub(lhs, rhs Value) (v Value)

func ConstFloat Uses

func ConstFloat(t Type, n float64) (v Value)

func ConstFloatFromString Uses

func ConstFloatFromString(t Type, str string) (v Value)

func ConstGEP Uses

func ConstGEP(v Value, indices []Value) (rv Value)

func ConstICmp Uses

func ConstICmp(pred IntPredicate, lhs, rhs Value) (v Value)

func ConstInBoundsGEP Uses

func ConstInBoundsGEP(v Value, indices []Value) (rv Value)

func ConstInsertElement Uses

func ConstInsertElement(vec, elem, i Value) (rv Value)

func ConstInsertValue Uses

func ConstInsertValue(agg, val Value, indices []uint32) (rv Value)

func ConstInt Uses

func ConstInt(t Type, n uint64, signExtend bool) (v Value)

Operations on scalar constants

func ConstIntCast Uses

func ConstIntCast(v Value, t Type, signed bool) (rv Value)

func ConstIntFromString Uses

func ConstIntFromString(t Type, str string, radix int) (v Value)

func ConstIntToPtr Uses

func ConstIntToPtr(v Value, t Type) (rv Value)

func ConstLShr Uses

func ConstLShr(lhs, rhs Value) (v Value)

func ConstMul Uses

func ConstMul(lhs, rhs Value) (v Value)

func ConstNSWAdd Uses

func ConstNSWAdd(lhs, rhs Value) (v Value)

func ConstNSWMul Uses

func ConstNSWMul(lhs, rhs Value) (v Value)

func ConstNSWNeg Uses

func ConstNSWNeg(v Value) (rv Value)

func ConstNSWSub Uses

func ConstNSWSub(lhs, rhs Value) (v Value)

func ConstNUWAdd Uses

func ConstNUWAdd(lhs, rhs Value) (v Value)

func ConstNUWMul Uses

func ConstNUWMul(lhs, rhs Value) (v Value)

func ConstNUWNeg Uses

func ConstNUWNeg(v Value) (rv Value)

func ConstNUWSub Uses

func ConstNUWSub(lhs, rhs Value) (v Value)

func ConstNamedStruct Uses

func ConstNamedStruct(t Type, constVals []Value) (v Value)

func ConstNeg Uses

func ConstNeg(v Value) (rv Value)

func ConstNot Uses

func ConstNot(v Value) (rv Value)

func ConstNull Uses

func ConstNull(t Type) (v Value)

Operations on constants of any type

func ConstOr Uses

func ConstOr(lhs, rhs Value) (v Value)

func ConstPointerCast Uses

func ConstPointerCast(v Value, t Type) (rv Value)

func ConstPointerNull Uses

func ConstPointerNull(t Type) (v Value)

func ConstPtrToInt Uses

func ConstPtrToInt(v Value, t Type) (rv Value)

func ConstSDiv Uses

func ConstSDiv(lhs, rhs Value) (v Value)

func ConstSExt Uses

func ConstSExt(v Value, t Type) (rv Value)

func ConstSExtOrBitCast Uses

func ConstSExtOrBitCast(v Value, t Type) (rv Value)

func ConstSIToFP Uses

func ConstSIToFP(v Value, t Type) (rv Value)

func ConstSRem Uses

func ConstSRem(lhs, rhs Value) (v Value)

func ConstSelect Uses

func ConstSelect(cond, iftrue, iffalse Value) (rv Value)

func ConstShl Uses

func ConstShl(lhs, rhs Value) (v Value)

func ConstShuffleVector Uses

func ConstShuffleVector(veca, vecb, mask Value) (rv Value)

func ConstString Uses

func ConstString(str string, addnull bool) (v Value)

func ConstStruct Uses

func ConstStruct(constVals []Value, packed bool) (v Value)

func ConstSub Uses

func ConstSub(lhs, rhs Value) (v Value)

func ConstTrunc Uses

func ConstTrunc(v Value, t Type) (rv Value)

func ConstTruncOrBitCast Uses

func ConstTruncOrBitCast(v Value, t Type) (rv Value)

func ConstUDiv Uses

func ConstUDiv(lhs, rhs Value) (v Value)

func ConstUIToFP Uses

func ConstUIToFP(v Value, t Type) (rv Value)

func ConstURem Uses

func ConstURem(lhs, rhs Value) (v Value)

func ConstVector Uses

func ConstVector(scalarConstVals []Value, packed bool) (v Value)

func ConstXor Uses

func ConstXor(lhs, rhs Value) (v Value)

func ConstZExt Uses

func ConstZExt(v Value, t Type) (rv Value)

func ConstZExtOrBitCast Uses

func ConstZExtOrBitCast(v Value, t Type) (rv Value)

func InlineAsm Uses

func InlineAsm(t Type, asmString, constraints string, hasSideEffects, isAlignStack bool, dialect InlineAsmDialect) (rv Value)

Operations on inline assembly

func NextFunction Uses

func NextFunction(v Value) (rv Value)

func NextGlobal Uses

func NextGlobal(v Value) (rv Value)

func NextInstruction Uses

func NextInstruction(v Value) (rv Value)

func NextParam Uses

func NextParam(v Value) (rv Value)

func PrevFunction Uses

func PrevFunction(v Value) (rv Value)

func PrevGlobal Uses

func PrevGlobal(v Value) (rv Value)

func PrevInstruction Uses

func PrevInstruction(v Value) (rv Value)

func PrevParam Uses

func PrevParam(v Value) (rv Value)

func SizeOf Uses

func SizeOf(t Type) (v Value)

func Undef Uses

func Undef(t Type) (v Value)

func (Value) AddAttributeAtIndex Uses

func (v Value) AddAttributeAtIndex(i int, a Attribute)

func (Value) AddCallSiteAttribute Uses

func (v Value) AddCallSiteAttribute(i int, a Attribute)

func (Value) AddCase Uses

func (v Value) AddCase(on Value, dest BasicBlock)

Add a case to the switch instruction

func (Value) AddClause Uses

func (l Value) AddClause(v Value)

func (Value) AddDest Uses

func (v Value) AddDest(dest BasicBlock)

Add a destination to the indirectbr instruction

func (Value) AddFunctionAttr Uses

func (v Value) AddFunctionAttr(a Attribute)

func (Value) AddIncoming Uses

func (v Value) AddIncoming(vals []Value, blocks []BasicBlock)

Operations on phi nodes

func (Value) AddTargetDependentFunctionAttr Uses

func (v Value) AddTargetDependentFunctionAttr(attr, value string)

func (Value) Alignment Uses

func (v Value) Alignment() int

func (Value) AsBasicBlock Uses

func (v Value) AsBasicBlock() (bb BasicBlock)

func (Value) BasicBlocks Uses

func (v Value) BasicBlocks() []BasicBlock

func (Value) BasicBlocksCount Uses

func (v Value) BasicBlocksCount() int

func (Value) CalledValue Uses

func (v Value) CalledValue() (rv Value)

func (Value) CmpXchgFailureOrdering Uses

func (v Value) CmpXchgFailureOrdering() AtomicOrdering

func (Value) CmpXchgSuccessOrdering Uses

func (v Value) CmpXchgSuccessOrdering() AtomicOrdering

func (Value) Comdat Uses

func (v Value) Comdat() (c Comdat)

func (Value) ConstantAsMetadata Uses

func (v Value) ConstantAsMetadata() (md Metadata)

func (Value) Dump Uses

func (v Value) Dump()

func (Value) EntryBasicBlock Uses

func (v Value) EntryBasicBlock() (bb BasicBlock)

func (Value) EraseFromParentAsFunction Uses

func (v Value) EraseFromParentAsFunction()

func (Value) EraseFromParentAsGlobal Uses

func (v Value) EraseFromParentAsGlobal()

func (Value) EraseFromParentAsInstruction Uses

func (v Value) EraseFromParentAsInstruction()

Operations on instructions

func (Value) FirstBasicBlock Uses

func (v Value) FirstBasicBlock() (bb BasicBlock)

func (Value) FirstParam Uses

func (v Value) FirstParam() (rv Value)

func (Value) FirstUse Uses

func (v Value) FirstUse() (u Use)

Operations on Uses

func (Value) FloatPredicate Uses

func (v Value) FloatPredicate() FloatPredicate

func (Value) FunctionCallConv Uses

func (v Value) FunctionCallConv() CallConv

func (Value) GC Uses

func (v Value) GC() string

func (Value) GetEnumAttributeAtIndex Uses

func (v Value) GetEnumAttributeAtIndex(i int, kind uint) (a Attribute)

func (Value) GetEnumFunctionAttribute Uses

func (v Value) GetEnumFunctionAttribute(kind uint) Attribute

func (Value) GetStringAttributeAtIndex Uses

func (v Value) GetStringAttributeAtIndex(i int, kind string) (a Attribute)

func (Value) GlobalParent Uses

func (v Value) GlobalParent() (m Module)

Operations on global variables, functions, and aliases (globals)

func (Value) HasMetadata Uses

func (v Value) HasMetadata() bool

func (Value) IncomingBlock Uses

func (v Value) IncomingBlock(i int) (bb BasicBlock)

func (Value) IncomingCount Uses

func (v Value) IncomingCount() int

func (Value) IncomingValue Uses

func (v Value) IncomingValue(i int) (rv Value)

func (Value) Indices Uses

func (v Value) Indices() []uint32

Operations on aggregates

func (Value) Initializer Uses

func (v Value) Initializer() (rv Value)

func (Value) InstructionCallConv Uses

func (v Value) InstructionCallConv() CallConv

func (Value) InstructionDebugLoc Uses

func (v Value) InstructionDebugLoc() (md Metadata)

func (Value) InstructionOpcode Uses

func (v Value) InstructionOpcode() Opcode

func (Value) InstructionParent Uses

func (v Value) InstructionParent() (bb BasicBlock)

func (Value) InstructionSetDebugLoc Uses

func (v Value) InstructionSetDebugLoc(md Metadata)

func (Value) IntPredicate Uses

func (v Value) IntPredicate() IntPredicate

Operations on comparisons

func (Value) IntrinsicID Uses

func (v Value) IntrinsicID() int

func (Value) IsAAllocaInst Uses

func (v Value) IsAAllocaInst() (rv Value)

func (Value) IsAArgument Uses

func (v Value) IsAArgument() (rv Value)

Conversion functions. Return the input value if it is an instance of the specified class, otherwise NULL. See llvm::dyn_cast_or_null<>.

func (Value) IsABasicBlock Uses

func (v Value) IsABasicBlock() (rv Value)

func (Value) IsABinaryOperator Uses

func (v Value) IsABinaryOperator() (rv Value)

func (Value) IsABitCastInst Uses

func (v Value) IsABitCastInst() (rv Value)

func (Value) IsABranchInst Uses

func (v Value) IsABranchInst() (rv Value)

func (Value) IsACallInst Uses

func (v Value) IsACallInst() (rv Value)

func (Value) IsACastInst Uses

func (v Value) IsACastInst() (rv Value)

func (Value) IsACmpInst Uses

func (v Value) IsACmpInst() (rv Value)

func (Value) IsAConstant Uses

func (v Value) IsAConstant() (rv Value)

func (Value) IsAConstantAggregateZero Uses

func (v Value) IsAConstantAggregateZero() (rv Value)

func (Value) IsAConstantArray Uses

func (v Value) IsAConstantArray() (rv Value)

func (Value) IsAConstantExpr Uses

func (v Value) IsAConstantExpr() (rv Value)

func (Value) IsAConstantFP Uses

func (v Value) IsAConstantFP() (rv Value)

func (Value) IsAConstantInt Uses

func (v Value) IsAConstantInt() (rv Value)

func (Value) IsAConstantPointerNull Uses

func (v Value) IsAConstantPointerNull() (rv Value)

func (Value) IsAConstantStruct Uses

func (v Value) IsAConstantStruct() (rv Value)

func (Value) IsAConstantVector Uses

func (v Value) IsAConstantVector() (rv Value)

func (Value) IsADbgDeclareInst Uses

func (v Value) IsADbgDeclareInst() (rv Value)

func (Value) IsADbgInfoIntrinsic Uses

func (v Value) IsADbgInfoIntrinsic() (rv Value)

func (Value) IsAExtractElementInst Uses

func (v Value) IsAExtractElementInst() (rv Value)

func (Value) IsAExtractValueInst Uses

func (v Value) IsAExtractValueInst() (rv Value)

func (Value) IsAFCmpInst Uses

func (v Value) IsAFCmpInst() (rv Value)

func (Value) IsAFPExtInst Uses

func (v Value) IsAFPExtInst() (rv Value)

func (Value) IsAFPToSIInst Uses

func (v Value) IsAFPToSIInst() (rv Value)

func (Value) IsAFPToUIInst Uses

func (v Value) IsAFPToUIInst() (rv Value)

func (Value) IsAFPTruncInst Uses

func (v Value) IsAFPTruncInst() (rv Value)

func (Value) IsAFunction Uses

func (v Value) IsAFunction() (rv Value)

func (Value) IsAGetElementPtrInst Uses

func (v Value) IsAGetElementPtrInst() (rv Value)

func (Value) IsAGlobalAlias Uses

func (v Value) IsAGlobalAlias() (rv Value)

func (Value) IsAGlobalValue Uses

func (v Value) IsAGlobalValue() (rv Value)

func (Value) IsAGlobalVariable Uses

func (v Value) IsAGlobalVariable() (rv Value)

func (Value) IsAICmpInst Uses

func (v Value) IsAICmpInst() (rv Value)

func (Value) IsAInlineAsm Uses

func (v Value) IsAInlineAsm() (rv Value)

func (Value) IsAInsertElementInst Uses

func (v Value) IsAInsertElementInst() (rv Value)

func (Value) IsAInsertValueInst Uses

func (v Value) IsAInsertValueInst() (rv Value)

func (Value) IsAInstruction Uses

func (v Value) IsAInstruction() (rv Value)

func (Value) IsAIntToPtrInst Uses

func (v Value) IsAIntToPtrInst() (rv Value)

func (Value) IsAIntrinsicInst Uses

func (v Value) IsAIntrinsicInst() (rv Value)

func (Value) IsAInvokeInst Uses

func (v Value) IsAInvokeInst() (rv Value)

func (Value) IsALoadInst Uses

func (v Value) IsALoadInst() (rv Value)

func (Value) IsAMemCpyInst Uses

func (v Value) IsAMemCpyInst() (rv Value)

func (Value) IsAMemIntrinsic Uses

func (v Value) IsAMemIntrinsic() (rv Value)

func (Value) IsAMemMoveInst Uses

func (v Value) IsAMemMoveInst() (rv Value)

func (Value) IsAMemSetInst Uses

func (v Value) IsAMemSetInst() (rv Value)

func (Value) IsAPHINode Uses

func (v Value) IsAPHINode() (rv Value)

func (Value) IsAPtrToIntInst Uses

func (v Value) IsAPtrToIntInst() (rv Value)

func (Value) IsAReturnInst Uses

func (v Value) IsAReturnInst() (rv Value)

func (Value) IsASExtInst Uses

func (v Value) IsASExtInst() (rv Value)

func (Value) IsASIToFPInst Uses

func (v Value) IsASIToFPInst() (rv Value)

func (Value) IsASelectInst Uses

func (v Value) IsASelectInst() (rv Value)

func (Value) IsAShuffleVectorInst Uses

func (v Value) IsAShuffleVectorInst() (rv Value)

func (Value) IsAStoreInst Uses

func (v Value) IsAStoreInst() (rv Value)

func (Value) IsASwitchInst Uses

func (v Value) IsASwitchInst() (rv Value)

func (Value) IsATruncInst Uses

func (v Value) IsATruncInst() (rv Value)

func (Value) IsAUIToFPInst Uses

func (v Value) IsAUIToFPInst() (rv Value)

func (Value) IsAUnaryInstruction Uses

func (v Value) IsAUnaryInstruction() (rv Value)

func (Value) IsAUndefValue Uses

func (v Value) IsAUndefValue() (rv Value)

func (Value) IsAUnreachableInst Uses

func (v Value) IsAUnreachableInst() (rv Value)

func (Value) IsAUser Uses

func (v Value) IsAUser() (rv Value)

func (Value) IsAVAArgInst Uses

func (v Value) IsAVAArgInst() (rv Value)

func (Value) IsAZExtInst Uses

func (v Value) IsAZExtInst() (rv Value)

func (Value) IsAtomicSingleThread Uses

func (v Value) IsAtomicSingleThread() bool

func (Value) IsBasicBlock Uses

func (v Value) IsBasicBlock() bool

func (Value) IsConstant Uses

func (v Value) IsConstant() bool

func (Value) IsDeclaration Uses

func (v Value) IsDeclaration() bool

func (Value) IsGlobalConstant Uses

func (v Value) IsGlobalConstant() bool

func (Value) IsNil Uses

func (c Value) IsNil() bool

func (Value) IsNull Uses

func (v Value) IsNull() bool

func (Value) IsTailCall Uses

func (v Value) IsTailCall() bool

Operations on call instructions (only)

func (Value) IsThreadLocal Uses

func (v Value) IsThreadLocal() bool

func (Value) IsUndef Uses

func (v Value) IsUndef() bool

func (Value) IsVolatile Uses

func (v Value) IsVolatile() bool

func (Value) LastBasicBlock Uses

func (v Value) LastBasicBlock() (bb BasicBlock)

func (Value) LastParam Uses

func (v Value) LastParam() (rv Value)

func (Value) Linkage Uses

func (v Value) Linkage() Linkage

func (Value) Metadata Uses

func (v Value) Metadata(kind int) (rv Value)

func (Value) Name Uses

func (v Value) Name() string

func (Value) Opcode Uses

func (v Value) Opcode() Opcode

Constant expressions

func (Value) Operand Uses

func (v Value) Operand(i int) (rv Value)

Operations on Users

func (Value) OperandsCount Uses

func (v Value) OperandsCount() int

func (Value) Ordering Uses

func (v Value) Ordering() AtomicOrdering

func (Value) Param Uses

func (v Value) Param(i int) (rv Value)

func (Value) ParamParent Uses

func (v Value) ParamParent() (rv Value)

func (Value) Params Uses

func (v Value) Params() []Value

func (Value) ParamsCount Uses

func (v Value) ParamsCount() int

Operations on parameters

func (Value) RemoveEnumAttributeAtIndex Uses

func (v Value) RemoveEnumAttributeAtIndex(i int, kind uint)

func (Value) RemoveEnumFunctionAttribute Uses

func (v Value) RemoveEnumFunctionAttribute(kind uint)

func (Value) RemoveStringAttributeAtIndex Uses

func (v Value) RemoveStringAttributeAtIndex(i int, kind string)

func (Value) ReplaceAllUsesWith Uses

func (v Value) ReplaceAllUsesWith(nv Value)

func (Value) SExtValue Uses

func (v Value) SExtValue() int64

func (Value) Section Uses

func (v Value) Section() string

func (Value) SetAlignment Uses

func (v Value) SetAlignment(a int)

func (Value) SetAtomicSingleThread Uses

func (v Value) SetAtomicSingleThread(singleThread bool)

func (Value) SetCleanup Uses

func (l Value) SetCleanup(cleanup bool)

func (Value) SetCmpXchgFailureOrdering Uses

func (v Value) SetCmpXchgFailureOrdering(ordering AtomicOrdering)

func (Value) SetCmpXchgSuccessOrdering Uses

func (v Value) SetCmpXchgSuccessOrdering(ordering AtomicOrdering)

func (Value) SetComdat Uses

func (v Value) SetComdat(c Comdat)

func (Value) SetFunctionCallConv Uses

func (v Value) SetFunctionCallConv(cc CallConv)

func (Value) SetGC Uses

func (v Value) SetGC(name string)

func (Value) SetGlobalConstant Uses

func (v Value) SetGlobalConstant(gc bool)

func (Value) SetInitializer Uses

func (v Value) SetInitializer(cv Value)

func (Value) SetInstrParamAlignment Uses

func (v Value) SetInstrParamAlignment(i int, align int)

func (Value) SetInstructionCallConv Uses

func (v Value) SetInstructionCallConv(cc CallConv)

Operations on call sites

func (Value) SetLinkage Uses

func (v Value) SetLinkage(l Linkage)

func (Value) SetMetadata Uses

func (v Value) SetMetadata(kind int, node Metadata)

func (Value) SetName Uses

func (v Value) SetName(name string)

func (Value) SetOperand Uses

func (v Value) SetOperand(i int, op Value)

func (Value) SetOrdering Uses

func (v Value) SetOrdering(ordering AtomicOrdering)

func (Value) SetParamAlignment Uses

func (v Value) SetParamAlignment(align int)

func (Value) SetPersonality Uses

func (v Value) SetPersonality(p Value)

func (Value) SetSection Uses

func (v Value) SetSection(str string)

func (Value) SetSubprogram Uses

func (v Value) SetSubprogram(sp Metadata)

func (Value) SetTailCall Uses

func (v Value) SetTailCall(is bool)

func (Value) SetThreadLocal Uses

func (v Value) SetThreadLocal(tl bool)

func (Value) SetUnnamedAddr Uses

func (v Value) SetUnnamedAddr(ua bool)

func (Value) SetVisibility Uses

func (v Value) SetVisibility(vi Visibility)

func (Value) SetVolatile Uses

func (v Value) SetVolatile(volatile bool)

func (Value) Type Uses

func (v Value) Type() (t Type)

Operations on all values

func (Value) Visibility Uses

func (v Value) Visibility() Visibility

func (Value) ZExtValue Uses

func (v Value) ZExtValue() uint64

type VerifierFailureAction Uses

type VerifierFailureAction C.LLVMVerifierFailureAction
const (
    // verifier will print to stderr and abort()
    AbortProcessAction VerifierFailureAction = C.LLVMAbortProcessAction
    // verifier will print to stderr and return 1
    PrintMessageAction VerifierFailureAction = C.LLVMPrintMessageAction
    // verifier will just return 1
    ReturnStatusAction VerifierFailureAction = C.LLVMReturnStatusAction

type Visibility Uses

type Visibility C.LLVMVisibility
const (
    DefaultVisibility   Visibility = C.LLVMDefaultVisibility
    HiddenVisibility    Visibility = C.LLVMHiddenVisibility
    ProtectedVisibility Visibility = C.LLVMProtectedVisibility

Package llvm imports 6 packages (graph) and is imported by 21 packages. Updated 2020-01-04. Refresh now. Tools for package owners.