Documentation ¶
Index ¶
- Constants
- func DefaultTargetTriple() (triple string)
- func InitializeAllAsmParsers()
- func InitializeAllAsmPrinters()
- func InitializeAllTargetInfos()
- func InitializeAllTargetMCs()
- func InitializeAllTargets()
- func InitializeNativeTarget() error
- func LinkInInterpreter()
- func LinkInJIT()
- func MDKindID(name string) (id int)
- func VerifyFunction(f Value, a VerifierFailureAction) error
- func VerifyModule(m Module, a VerifierFailureAction) error
- func ViewFunctionCFG(f Value)
- func ViewFunctionCFGOnly(f Value)
- func WriteBitcodeToFile(m Module, file *os.File) error
- type Attribute
- type BasicBlock
- func (bb BasicBlock) AsValue() (v Value)
- func (bb BasicBlock) EraseFromParent()
- func (bb BasicBlock) FirstInstruction() (v Value)
- func (c BasicBlock) IsNil() bool
- func (bb BasicBlock) LastInstruction() (v Value)
- func (bb BasicBlock) MoveAfter(pos BasicBlock)
- func (bb BasicBlock) MoveBefore(pos BasicBlock)
- func (bb BasicBlock) Parent() (v Value)
- type Builder
- func (b Builder) ClearInsertionPoint()
- func (b Builder) CreateAShr(lhs, rhs Value, name string) (v Value)
- func (b Builder) CreateAdd(lhs, rhs Value, name string) (v Value)
- func (b Builder) CreateAggregateRet(vs []Value) (rv Value)
- func (b Builder) CreateAlloca(t Type, name string) (v Value)
- func (b Builder) CreateAnd(lhs, rhs Value, name string) (v Value)
- func (b Builder) CreateArrayAlloca(t Type, val Value, name string) (v Value)
- func (b Builder) CreateArrayMalloc(t Type, val Value, name string) (v Value)
- func (b Builder) CreateBinOp(op Opcode, lhs, rhs Value, name string) (v Value)
- func (b Builder) CreateBitCast(val Value, t Type, name string) (v Value)
- func (b Builder) CreateBr(bb BasicBlock) (rv Value)
- func (b Builder) CreateCall(fn Value, args []Value, name string) (v Value)
- func (b Builder) CreateCast(val Value, op Opcode, t Type, name string) (v Value)
- func (b Builder) CreateCondBr(ifv Value, thenb, elseb BasicBlock) (rv Value)
- func (b Builder) CreateExactSDiv(lhs, rhs Value, name string) (v Value)
- func (b Builder) CreateExtractElement(vec, i Value, name string) (v Value)
- func (b Builder) CreateExtractValue(agg Value, i int, name string) (v Value)
- func (b Builder) CreateFAdd(lhs, rhs Value, name string) (v Value)
- func (b Builder) CreateFCmp(pred FloatPredicate, lhs, rhs Value, name string) (v Value)
- func (b Builder) CreateFDiv(lhs, rhs Value, name string) (v Value)
- func (b Builder) CreateFMul(lhs, rhs Value, name string) (v Value)
- func (b Builder) CreateFNeg(v Value, name string) (rv Value)
- func (b Builder) CreateFPCast(val Value, t Type, name string) (v Value)
- func (b Builder) CreateFPExt(val Value, t Type, name string) (v Value)
- func (b Builder) CreateFPToSI(val Value, t Type, name string) (v Value)
- func (b Builder) CreateFPToUI(val Value, t Type, name string) (v Value)
- func (b Builder) CreateFPTrunc(val Value, t Type, name string) (v Value)
- func (b Builder) CreateFRem(lhs, rhs Value, name string) (v Value)
- func (b Builder) CreateFSub(lhs, rhs Value, name string) (v Value)
- func (b Builder) CreateFree(p Value) (v Value)
- func (b Builder) CreateGEP(p Value, indices []Value, name string) (v Value)
- func (b Builder) CreateGlobalString(str, name string) (v Value)
- func (b Builder) CreateGlobalStringPtr(str, name string) (v Value)
- func (b Builder) CreateICmp(pred IntPredicate, lhs, rhs Value, name string) (v Value)
- func (b Builder) CreateInBoundsGEP(p Value, indices []Value, name string) (v Value)
- func (b Builder) CreateIndirectBr(addr Value, numDests int) (rv Value)
- func (b Builder) CreateInsertElement(vec, elt, i Value, name string) (v Value)
- func (b Builder) CreateInsertValue(agg, elt Value, i int, name string) (v Value)
- func (b Builder) CreateIntCast(val Value, t Type, name string) (v Value)
- func (b Builder) CreateIntToPtr(val Value, t Type, name string) (v Value)
- func (b Builder) CreateInvoke(fn Value, args []Value, then, catch BasicBlock, name string) (rv Value)
- func (b Builder) CreateIsNotNull(val Value, name string) (v Value)
- func (b Builder) CreateIsNull(val Value, name string) (v Value)
- func (b Builder) CreateLShr(lhs, rhs Value, name string) (v Value)
- func (b Builder) CreateLandingPad(t Type, personality Value, nclauses int, name string) (l Value)
- func (b Builder) CreateLoad(p Value, name string) (v Value)
- func (b Builder) CreateMalloc(t Type, name string) (v Value)
- func (b Builder) CreateMul(lhs, rhs Value, name string) (v Value)
- func (b Builder) CreateNSWAdd(lhs, rhs Value, name string) (v Value)
- func (b Builder) CreateNSWMul(lhs, rhs Value, name string) (v Value)
- func (b Builder) CreateNSWNeg(v Value, name string) (rv Value)
- func (b Builder) CreateNSWSub(lhs, rhs Value, name string) (v Value)
- func (b Builder) CreateNUWAdd(lhs, rhs Value, name string) (v Value)
- func (b Builder) CreateNUWMul(lhs, rhs Value, name string) (v Value)
- func (b Builder) CreateNUWNeg(v Value, name string) (rv Value)
- func (b Builder) CreateNUWSub(lhs, rhs Value, name string) (v Value)
- func (b Builder) CreateNeg(v Value, name string) (rv Value)
- func (b Builder) CreateNot(v Value, name string) (rv Value)
- func (b Builder) CreateOr(lhs, rhs Value, name string) (v Value)
- func (b Builder) CreatePHI(t Type, name string) (v Value)
- func (b Builder) CreatePointerCast(val Value, t Type, name string) (v Value)
- func (b Builder) CreatePtrDiff(lhs, rhs Value, name string) (v Value)
- func (b Builder) CreatePtrToInt(val Value, t Type, name string) (v Value)
- func (b Builder) CreateResume(ex Value) (v Value)
- func (b Builder) CreateRet(v Value) (rv Value)
- func (b Builder) CreateRetVoid() (rv Value)
- func (b Builder) CreateSDiv(lhs, rhs Value, name string) (v Value)
- func (b Builder) CreateSExt(val Value, t Type, name string) (v Value)
- func (b Builder) CreateSExtOrBitCast(val Value, t Type, name string) (v Value)
- func (b Builder) CreateSIToFP(val Value, t Type, name string) (v Value)
- func (b Builder) CreateSRem(lhs, rhs Value, name string) (v Value)
- func (b Builder) CreateSelect(ifv, thenv, elsev Value, name string) (v Value)
- func (b Builder) CreateShl(lhs, rhs Value, name string) (v Value)
- func (b Builder) CreateShuffleVector(v1, v2, mask Value, name string) (v Value)
- func (b Builder) CreateStore(val Value, p Value) (v Value)
- func (b Builder) CreateStructGEP(p Value, i int, name string) (v Value)
- func (b Builder) CreateSub(lhs, rhs Value, name string) (v Value)
- func (b Builder) CreateSwitch(v Value, elseb BasicBlock, numCases int) (rv Value)
- func (b Builder) CreateTrunc(val Value, t Type, name string) (v Value)
- func (b Builder) CreateTruncOrBitCast(val Value, t Type, name string) (v Value)
- func (b Builder) CreateUDiv(lhs, rhs Value, name string) (v Value)
- func (b Builder) CreateUIToFP(val Value, t Type, name string) (v Value)
- func (b Builder) CreateURem(lhs, rhs Value, name string) (v Value)
- func (b Builder) CreateUnreachable() (rv Value)
- func (b Builder) CreateVAArg(list Value, t Type, name string) (v Value)
- func (b Builder) CreateXor(lhs, rhs Value, name string) (v Value)
- func (b Builder) CreateZExt(val Value, t Type, name string) (v Value)
- func (b Builder) CreateZExtOrBitCast(val Value, t Type, name string) (v Value)
- func (b Builder) CurrentDebugLocation() (v Value)
- func (b Builder) Dispose()
- func (b Builder) GetInsertBlock() (bb BasicBlock)
- func (b Builder) Insert(instr Value)
- func (b Builder) InsertDeclare(module Module, storage Value, md Value) Value
- func (b Builder) InsertWithName(instr Value, name string)
- func (c Builder) IsNil() bool
- func (b Builder) SetCurrentDebugLocation(v Value)
- func (b Builder) SetInsertPoint(block BasicBlock, instr Value)
- func (b Builder) SetInsertPointAtEnd(block BasicBlock)
- func (b Builder) SetInsertPointBefore(instr Value)
- func (b Builder) SetInstDebugLocation(v Value)
- type ByteOrdering
- type CallConv
- type CodeGenFileType
- type CodeGenOptLevel
- type CodeModel
- type Context
- func (c Context) AddBasicBlock(f Value, name string) (bb BasicBlock)
- func (c Context) ConstString(str string, addnull bool) (v Value)
- func (c Context) ConstStruct(constVals []Value, packed bool) (v Value)
- func (c Context) Dispose()
- func (c Context) DoubleType() (t Type)
- func (c Context) FP128Type() (t Type)
- func (c Context) FloatType() (t Type)
- func (c Context) InsertBasicBlock(ref BasicBlock, name string) (bb BasicBlock)
- func (c Context) Int16Type() (t Type)
- func (c Context) Int1Type() (t Type)
- func (c Context) Int32Type() (t Type)
- func (c Context) Int64Type() (t Type)
- func (c Context) Int8Type() (t Type)
- func (c Context) IntType(numbits int) (t Type)
- func (c Context) IsNil() bool
- func (c Context) LabelType() (t Type)
- func (c Context) MDKindID(name string) (id int)
- func (c Context) MDNode(vals []Value) (v Value)
- func (c Context) MDString(str string) (v Value)
- func (c Context) NewBuilder() (b Builder)
- func (c Context) NewModule(name string) (m Module)
- func (c Context) PPCFP128Type() (t Type)
- func (c Context) StructCreateNamed(name string) (t Type)
- func (c Context) StructType(elementTypes []Type, packed bool) (t Type)
- func (c Context) VoidType() (t Type)
- func (c Context) X86FP80Type() (t Type)
- type DIArrayType
- type DIBasicType
- type DIBuilder
- func (d *DIBuilder) CreateArrayType(t DIArrayType) Value
- func (d *DIBuilder) CreateBasicType(t DIBasicType) Value
- func (d *DIBuilder) CreateCompileUnit(cu DICompileUnit) Value
- func (d *DIBuilder) CreateFile(filename, dir string) Value
- func (d *DIBuilder) CreateFunction(diScope Value, f DIFunction) Value
- func (d *DIBuilder) CreateLexicalBlock(diScope Value, b DILexicalBlock) Value
- func (d *DIBuilder) CreateLocalVariable(scope Value, v DILocalVariable) Value
- func (d *DIBuilder) CreateMemberType(scope Value, t DIMemberType) Value
- func (d *DIBuilder) CreatePointerType(t DIPointerType) Value
- func (d *DIBuilder) CreateStructType(scope Value, t DIStructType) Value
- func (d *DIBuilder) CreateSubroutineType(t DISubroutineType) Value
- func (d *DIBuilder) CreateTypedef(t DITypedef) Value
- func (d *DIBuilder) Destroy()
- func (d *DIBuilder) Finalize()
- func (d *DIBuilder) InsertDeclareAtEnd(v, diVarInfo Value, bb BasicBlock) Value
- type DICompileUnit
- type DIFunction
- type DILexicalBlock
- type DILocalVariable
- type DIMemberType
- type DIPointerType
- type DIStructType
- type DISubrange
- type DISubroutineType
- type DITypedef
- type DwarfLang
- type DwarfTag
- type DwarfTypeEncoding
- type ExecutionEngine
- func (ee ExecutionEngine) AddGlobalMapping(global Value, addr unsafe.Pointer)
- func (ee ExecutionEngine) AddModule(m Module)
- func (ee ExecutionEngine) Dispose()
- func (ee ExecutionEngine) FindFunction(name string) (f Value)
- func (ee ExecutionEngine) FreeMachineCodeForFunction(f Value)
- func (ee ExecutionEngine) PointerToGlobal(global Value) unsafe.Pointer
- func (ee ExecutionEngine) RecompileAndRelinkFunction(f Value) unsafe.Pointer
- func (ee ExecutionEngine) RemoveModule(m Module)
- func (ee ExecutionEngine) RunFunction(f Value, args []GenericValue) (g GenericValue)
- func (ee ExecutionEngine) RunStaticConstructors()
- func (ee ExecutionEngine) RunStaticDestructors()
- func (ee ExecutionEngine) TargetData() (td TargetData)
- type FloatPredicate
- type GenericValue
- type IntPredicate
- type LandingPadClause
- type Linkage
- type MemoryBuffer
- type Module
- func (m Module) AddNamedMetadataOperand(name string, operand Value)
- func (m Module) Context() (c Context)
- func (m Module) DataLayout() string
- func (m Module) Dispose()
- func (m Module) Dump()
- func (m Module) FirstFunction() (v Value)
- func (m Module) FirstGlobal() (v Value)
- func (m Module) GetTypeByName(name string) (t Type)
- func (c Module) IsNil() bool
- func (m Module) LastFunction() (v Value)
- func (m Module) LastGlobal() (v Value)
- func (m Module) NamedFunction(name string) (v Value)
- func (m Module) NamedGlobal(name string) (v Value)
- func (m Module) SetDataLayout(layout string)
- func (m Module) SetInlineAsm(asm string)
- func (m Module) SetTarget(target string)
- func (m Module) String() string
- func (m Module) Target() string
- type ModuleProvider
- type Opcode
- type PassManager
- func (pm PassManager) Add(td TargetData)
- func (pm PassManager) AddAggressiveDCEPass()
- func (pm PassManager) AddArgumentPromotionPass()
- func (pm PassManager) AddCFGSimplificationPass()
- func (pm PassManager) AddConstantMergePass()
- func (pm PassManager) AddConstantPropagationPass()
- func (pm PassManager) AddDeadArgEliminationPass()
- func (pm PassManager) AddDeadStoreEliminationPass()
- func (pm PassManager) AddDemoteMemoryToRegisterPass()
- func (pm PassManager) AddFunctionAttrsPass()
- func (pm PassManager) AddFunctionInliningPass()
- func (pm PassManager) AddGVNPass()
- func (pm PassManager) AddGlobalDCEPass()
- func (pm PassManager) AddGlobalOptimizerPass()
- func (pm PassManager) AddIPConstantPropagationPass()
- func (pm PassManager) AddIPSCCPPass()
- func (pm PassManager) AddIndVarSimplifyPass()
- func (pm PassManager) AddInstructionCombiningPass()
- func (pm PassManager) AddInternalizePass(allButMain bool)
- func (pm PassManager) AddJumpThreadingPass()
- func (pm PassManager) AddLICMPass()
- func (pm PassManager) AddLoopDeletionPass()
- func (pm PassManager) AddLoopRotatePass()
- func (pm PassManager) AddLoopUnrollPass()
- func (pm PassManager) AddLoopUnswitchPass()
- func (pm PassManager) AddMemCpyOptPass()
- func (pm PassManager) AddPromoteMemoryToRegisterPass()
- func (pm PassManager) AddPruneEHPass()
- func (pm PassManager) AddReassociatePass()
- func (pm PassManager) AddSCCPPass()
- func (pm PassManager) AddScalarReplAggregatesPass()
- func (pm PassManager) AddScalarReplAggregatesPassWithThreshold(threshold int)
- func (pm PassManager) AddSimplifyLibCallsPass()
- func (pm PassManager) AddStripDeadPrototypesPass()
- func (pm PassManager) AddTailCallEliminationPass()
- func (pm PassManager) AddVerifierPass()
- func (pm PassManager) Dispose()
- func (pm PassManager) FinalizeFunc() bool
- func (pm PassManager) InitializeFunc() bool
- func (c PassManager) IsNil() bool
- func (pm PassManager) Run(m Module) bool
- func (pm PassManager) RunFunc(f Value) bool
- type PassManagerBuilder
- type RelocMode
- type Target
- type TargetData
- func (td TargetData) ABITypeAlignment(t Type) int
- func (td TargetData) ByteOrder() ByteOrdering
- func (td TargetData) CallFrameTypeAlignment(t Type) int
- func (td TargetData) Dispose()
- func (td TargetData) ElementContainingOffset(t Type, offset uint64) int
- func (td TargetData) ElementOffset(t Type, element int) uint64
- func (td TargetData) IntPtrType() (t Type)
- func (td TargetData) PointerSize() int
- func (td TargetData) PrefTypeAlignment(t Type) int
- func (td TargetData) PreferredAlignment(g Value) int
- func (td TargetData) String() (s string)
- func (td TargetData) TypeAllocSize(t Type) uint64
- func (td TargetData) TypeSizeInBits(t Type) uint64
- func (td TargetData) TypeStoreSize(t Type) uint64
- type TargetMachine
- type Type
- func ArrayType(elementType Type, elementCount int) (t Type)
- func DoubleType() (t Type)
- func FP128Type() (t Type)
- func FloatType() (t Type)
- func FunctionType(returnType Type, paramTypes []Type, isVarArg bool) (t Type)
- func Int16Type() (t Type)
- func Int1Type() (t Type)
- func Int32Type() (t Type)
- func Int64Type() (t Type)
- func Int8Type() (t Type)
- func IntType(numbits int) (t Type)
- func LabelType() (t Type)
- func PPCFP128Type() (t Type)
- func PointerType(elementType Type, addressSpace int) (t Type)
- func StructType(elementTypes []Type, packed bool) (t Type)
- func VectorType(elementType Type, elementCount int) (t Type)
- func VoidType() (t Type)
- func X86FP80Type() (t Type)
- func (t Type) ArrayLength() int
- func (t Type) Context() (c Context)
- func (t Type) ElementType() (rt Type)
- func (t Type) IntTypeWidth() int
- func (t Type) IsFunctionVarArg() bool
- func (c Type) IsNil() bool
- func (t Type) IsStructPacked() bool
- func (t Type) ParamTypes() []Type
- func (t Type) ParamTypesCount() int
- func (t Type) PointerAddressSpace() int
- func (t Type) ReturnType() (rt Type)
- func (t Type) String() string
- func (t Type) StructElementTypes() []Type
- func (t Type) StructElementTypesCount() int
- func (t Type) StructName() string
- func (t Type) StructSetBody(elementTypes []Type, packed bool)
- func (t Type) TypeKind() TypeKind
- func (t Type) VectorSize() int
- type TypeKind
- type Use
- type Value
- func AddAlias(m Module, t Type, aliasee Value, name string) (v Value)
- func AddFunction(m Module, name string, ft Type) (v Value)
- func AddGlobal(m Module, t Type, name string) (v Value)
- func AddGlobalInAddressSpace(m Module, t Type, name string, addressSpace int) (v Value)
- func AlignOf(t Type) (v Value)
- func BlockAddress(f Value, bb BasicBlock) (v Value)
- func ConstAShr(lhs, rhs Value) (v Value)
- func ConstAdd(lhs, rhs Value) (v Value)
- func ConstAllOnes(t Type) (v Value)
- func ConstAnd(lhs, rhs Value) (v Value)
- func ConstArray(t Type, constVals []Value) (v Value)
- func ConstBitCast(v Value, t Type) (rv Value)
- func ConstExactSDiv(lhs, rhs Value) (v Value)
- func ConstExtractElement(vec, i Value) (rv Value)
- func ConstExtractValue(agg Value, indices []uint32) (rv Value)
- func ConstFAdd(lhs, rhs Value) (v Value)
- func ConstFCmp(pred FloatPredicate, lhs, rhs Value) (v Value)
- func ConstFDiv(lhs, rhs Value) (v Value)
- func ConstFMul(lhs, rhs Value) (v Value)
- func ConstFNeg(v Value) (rv Value)
- func ConstFPCast(v Value, t Type) (rv Value)
- func ConstFPExt(v Value, t Type) (rv Value)
- func ConstFPToSI(v Value, t Type) (rv Value)
- func ConstFPToUI(v Value, t Type) (rv Value)
- func ConstFPTrunc(v Value, t Type) (rv Value)
- func ConstFRem(lhs, rhs Value) (v Value)
- func ConstFSub(lhs, rhs Value) (v Value)
- func ConstFloat(t Type, n float64) (v Value)
- func ConstFloatFromString(t Type, str string) (v Value)
- func ConstGEP(v Value, indices []Value) (rv Value)
- func ConstICmp(pred IntPredicate, lhs, rhs Value) (v Value)
- func ConstInBoundsGEP(v Value, indices []Value) (rv Value)
- func ConstInsertElement(vec, elem, i Value) (rv Value)
- func ConstInsertValue(agg, val Value, indices []uint32) (rv Value)
- func ConstInt(t Type, n uint64, signExtend bool) (v Value)
- func ConstIntCast(v Value, t Type, signed bool) (rv Value)
- func ConstIntFromString(t Type, str string, radix int) (v Value)
- func ConstIntToPtr(v Value, t Type) (rv Value)
- func ConstLShr(lhs, rhs Value) (v Value)
- func ConstMul(lhs, rhs Value) (v Value)
- func ConstNSWAdd(lhs, rhs Value) (v Value)
- func ConstNSWMul(lhs, rhs Value) (v Value)
- func ConstNSWNeg(v Value) (rv Value)
- func ConstNSWSub(lhs, rhs Value) (v Value)
- func ConstNUWAdd(lhs, rhs Value) (v Value)
- func ConstNUWMul(lhs, rhs Value) (v Value)
- func ConstNUWNeg(v Value) (rv Value)
- func ConstNUWSub(lhs, rhs Value) (v Value)
- func ConstNamedStruct(t Type, constVals []Value) (v Value)
- func ConstNeg(v Value) (rv Value)
- func ConstNot(v Value) (rv Value)
- func ConstNull(t Type) (v Value)
- func ConstOr(lhs, rhs Value) (v Value)
- func ConstPointerCast(v Value, t Type) (rv Value)
- func ConstPointerNull(t Type) (v Value)
- func ConstPtrToInt(v Value, t Type) (rv Value)
- func ConstSDiv(lhs, rhs Value) (v Value)
- func ConstSExt(v Value, t Type) (rv Value)
- func ConstSExtOrBitCast(v Value, t Type) (rv Value)
- func ConstSIToFP(v Value, t Type) (rv Value)
- func ConstSRem(lhs, rhs Value) (v Value)
- func ConstSelect(cond, iftrue, iffalse Value) (rv Value)
- func ConstShl(lhs, rhs Value) (v Value)
- func ConstShuffleVector(veca, vecb, mask Value) (rv Value)
- func ConstString(str string, addnull bool) (v Value)
- func ConstStruct(constVals []Value, packed bool) (v Value)
- func ConstSub(lhs, rhs Value) (v Value)
- func ConstTrunc(v Value, t Type) (rv Value)
- func ConstTruncOrBitCast(v Value, t Type) (rv Value)
- func ConstUDiv(lhs, rhs Value) (v Value)
- func ConstUIToFP(v Value, t Type) (rv Value)
- func ConstURem(lhs, rhs Value) (v Value)
- func ConstVector(scalarConstVals []Value, packed bool) (v Value)
- func ConstXor(lhs, rhs Value) (v Value)
- func ConstZExt(v Value, t Type) (rv Value)
- func ConstZExtOrBitCast(v Value, t Type) (rv Value)
- func MDNode(vals []Value) (v Value)
- func MDString(str string) (v Value)
- func NextFunction(v Value) (rv Value)
- func NextGlobal(v Value) (rv Value)
- func NextInstruction(v Value) (rv Value)
- func NextParam(v Value) (rv Value)
- func PrevFunction(v Value) (rv Value)
- func PrevGlobal(v Value) (rv Value)
- func PrevInstruction(v Value) (rv Value)
- func PrevParam(v Value) (rv Value)
- func SizeOf(t Type) (v Value)
- func Undef(t Type) (v Value)
- func (v Value) AddAttribute(a Attribute)
- func (v Value) AddCase(on Value, dest BasicBlock)
- func (l Value) AddClause(v Value)
- func (v Value) AddDest(dest BasicBlock)
- func (v Value) AddFunctionAttr(a Attribute)
- func (v Value) AddIncoming(vals []Value, blocks []BasicBlock)
- func (v Value) AddInstrAttribute(i int, a Attribute)
- func (v Value) AddTargetDependentFunctionAttr(attr, value string)
- func (v Value) Alignment() int
- func (v Value) AsBasicBlock() (bb BasicBlock)
- func (v Value) Attribute() Attribute
- func (v Value) BasicBlocks() []BasicBlock
- func (v Value) BasicBlocksCount() int
- func (v Value) Dump()
- func (v Value) EntryBasicBlock() (bb BasicBlock)
- func (v Value) EraseFromParentAsFunction()
- func (v Value) EraseFromParentAsGlobal()
- func (v Value) FirstBasicBlock() (bb BasicBlock)
- func (v Value) FirstParam() (rv Value)
- func (v Value) FirstUse() (u Use)
- func (v Value) FunctionAttr() Attribute
- func (v Value) FunctionCallConv() CallConv
- func (v Value) GC() string
- func (v Value) GlobalParent() (m Module)
- func (v Value) HasMetadata() bool
- func (v Value) IncomingBlock(i int) (bb BasicBlock)
- func (v Value) IncomingCount() int
- func (v Value) IncomingValue(i int) (rv Value)
- func (v Value) Initializer() (rv Value)
- func (v Value) InstructionCallConv() CallConv
- func (v Value) InstructionOpcode() Opcode
- func (v Value) InstructionParent() (bb BasicBlock)
- func (v Value) IntrinsicID() int
- func (v Value) IsAAllocaInst() (rv Value)
- func (v Value) IsAArgument() (rv Value)
- func (v Value) IsABasicBlock() (rv Value)
- func (v Value) IsABinaryOperator() (rv Value)
- func (v Value) IsABitCastInst() (rv Value)
- func (v Value) IsABranchInst() (rv Value)
- func (v Value) IsACallInst() (rv Value)
- func (v Value) IsACastInst() (rv Value)
- func (v Value) IsACmpInst() (rv Value)
- func (v Value) IsAConstant() (rv Value)
- func (v Value) IsAConstantAggregateZero() (rv Value)
- func (v Value) IsAConstantArray() (rv Value)
- func (v Value) IsAConstantExpr() (rv Value)
- func (v Value) IsAConstantFP() (rv Value)
- func (v Value) IsAConstantInt() (rv Value)
- func (v Value) IsAConstantPointerNull() (rv Value)
- func (v Value) IsAConstantStruct() (rv Value)
- func (v Value) IsAConstantVector() (rv Value)
- func (v Value) IsADbgDeclareInst() (rv Value)
- func (v Value) IsADbgInfoIntrinsic() (rv Value)
- func (v Value) IsAExtractElementInst() (rv Value)
- func (v Value) IsAExtractValueInst() (rv Value)
- func (v Value) IsAFCmpInst() (rv Value)
- func (v Value) IsAFPExtInst() (rv Value)
- func (v Value) IsAFPToSIInst() (rv Value)
- func (v Value) IsAFPToUIInst() (rv Value)
- func (v Value) IsAFPTruncInst() (rv Value)
- func (v Value) IsAFunction() (rv Value)
- func (v Value) IsAGetElementPtrInst() (rv Value)
- func (v Value) IsAGlobalAlias() (rv Value)
- func (v Value) IsAGlobalValue() (rv Value)
- func (v Value) IsAGlobalVariable() (rv Value)
- func (v Value) IsAICmpInst() (rv Value)
- func (v Value) IsAInlineAsm() (rv Value)
- func (v Value) IsAInsertElementInst() (rv Value)
- func (v Value) IsAInsertValueInst() (rv Value)
- func (v Value) IsAInstruction() (rv Value)
- func (v Value) IsAIntToPtrInst() (rv Value)
- func (v Value) IsAIntrinsicInst() (rv Value)
- func (v Value) IsAInvokeInst() (rv Value)
- func (v Value) IsALoadInst() (rv Value)
- func (v Value) IsAMemCpyInst() (rv Value)
- func (v Value) IsAMemIntrinsic() (rv Value)
- func (v Value) IsAMemMoveInst() (rv Value)
- func (v Value) IsAMemSetInst() (rv Value)
- func (v Value) IsAPHINode() (rv Value)
- func (v Value) IsAPtrToIntInst() (rv Value)
- func (v Value) IsAReturnInst() (rv Value)
- func (v Value) IsASExtInst() (rv Value)
- func (v Value) IsASIToFPInst() (rv Value)
- func (v Value) IsASelectInst() (rv Value)
- func (v Value) IsAShuffleVectorInst() (rv Value)
- func (v Value) IsAStoreInst() (rv Value)
- func (v Value) IsASwitchInst() (rv Value)
- func (v Value) IsATerminatorInst() (rv Value)
- func (v Value) IsATruncInst() (rv Value)
- func (v Value) IsAUIToFPInst() (rv Value)
- func (v Value) IsAUnaryInstruction() (rv Value)
- func (v Value) IsAUndefValue() (rv Value)
- func (v Value) IsAUnreachableInst() (rv Value)
- func (v Value) IsAUser() (rv Value)
- func (v Value) IsAVAArgInst() (rv Value)
- func (v Value) IsAZExtInst() (rv Value)
- func (v Value) IsBasicBlock() bool
- func (v Value) IsConstant() bool
- func (v Value) IsDeclaration() bool
- func (v Value) IsGlobalConstant() bool
- func (c Value) IsNil() bool
- func (v Value) IsNull() bool
- func (v Value) IsTailCall() bool
- func (v Value) IsThreadLocal() bool
- func (v Value) IsUndef() bool
- func (v Value) LastBasicBlock() (bb BasicBlock)
- func (v Value) LastParam() (rv Value)
- func (v Value) Linkage() Linkage
- func (v Value) Metadata(kind int) (rv Value)
- func (v Value) Name() string
- func (v Value) Opcode() Opcode
- func (v Value) Operand(i int) (rv Value)
- func (v Value) OperandsCount() int
- func (v Value) Param(i int) (rv Value)
- func (v Value) ParamParent() (rv Value)
- func (v Value) Params() []Value
- func (v Value) ParamsCount() int
- func (v Value) RemoveAttribute(a Attribute)
- func (v Value) RemoveFunctionAttr(a Attribute)
- func (v Value) RemoveInstrAttribute(i int, a Attribute)
- func (v Value) ReplaceAllUsesWith(nv Value)
- func (v Value) SExtValue() int64
- func (v Value) Section() string
- func (v Value) SetAlignment(a int)
- func (l Value) SetCleanup(cleanup bool)
- func (v Value) SetFunctionCallConv(cc CallConv)
- func (v Value) SetGC(name string)
- func (v Value) SetGlobalConstant(gc bool)
- func (v Value) SetInitializer(cv Value)
- func (v Value) SetInstrParamAlignment(i int, align int)
- func (v Value) SetInstructionCallConv(cc CallConv)
- func (v Value) SetLinkage(l Linkage)
- func (v Value) SetMetadata(kind int, node Value)
- func (v Value) SetName(name string)
- func (v Value) SetOperand(i int, op Value)
- func (v Value) SetParamAlignment(align int)
- func (v Value) SetSection(str string)
- func (v Value) SetTailCall(is bool)
- func (v Value) SetThreadLocal(tl bool)
- func (v Value) SetVisibility(vi Visibility)
- func (v Value) Type() (t Type)
- func (v Value) Visibility() Visibility
- func (v Value) ZExtValue() uint64
- type VerifierFailureAction
- type Visibility
Constants ¶
const ( FlagPrivate = 1 << iota FlagProtected FlagFwdDecl FlagAppleBlock FlagBlockByrefStruct FlagVirtual FlagArtificial FlagExplicit FlagPrototyped FlagObjcClassComplete FlagObjectPointer FlagVector FlagStaticMember FlagIndirectVariable )
const (
LLVMDebugVersion = (12 << 16)
)
Variables ¶
This section is empty.
Functions ¶
func DefaultTargetTriple ¶
func DefaultTargetTriple() (triple string)
func InitializeAllAsmParsers ¶
func InitializeAllAsmParsers()
func InitializeAllAsmPrinters ¶
func InitializeAllAsmPrinters()
func InitializeAllTargetInfos ¶
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 ¶
func InitializeAllTargetMCs()
func InitializeAllTargets ¶
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 InitializeNativeTarget ¶
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 ¶
func LinkInInterpreter()
func VerifyFunction ¶
func VerifyFunction(f Value, a VerifierFailureAction) error
Verifies that a single function is valid, taking the specified action. Useful for debugging.
func VerifyModule ¶
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 ¶
func ViewFunctionCFG(f Value)
Open up a ghostview window that displays the CFG of the current function. Useful for debugging.
func ViewFunctionCFGOnly ¶
func ViewFunctionCFGOnly(f Value)
Types ¶
type Attribute ¶
type Attribute C.LLVMAttribute
const ( NoneAttribute Attribute = 0 ZExtAttribute Attribute = C.LLVMZExtAttribute SExtAttribute Attribute = C.LLVMSExtAttribute NoReturnAttribute Attribute = C.LLVMNoReturnAttribute InRegAttribute Attribute = C.LLVMInRegAttribute StructRetAttribute Attribute = C.LLVMStructRetAttribute NoUnwindAttribute Attribute = C.LLVMNoUnwindAttribute NoAliasAttribute Attribute = C.LLVMNoAliasAttribute ByValAttribute Attribute = C.LLVMByValAttribute NestAttribute Attribute = C.LLVMNestAttribute ReadNoneAttribute Attribute = C.LLVMReadNoneAttribute ReadOnlyAttribute Attribute = C.LLVMReadOnlyAttribute NoInlineAttribute Attribute = C.LLVMNoInlineAttribute AlwaysInlineAttribute Attribute = C.LLVMAlwaysInlineAttribute OptimizeForSizeAttribute Attribute = C.LLVMOptimizeForSizeAttribute StackProtectAttribute Attribute = C.LLVMStackProtectAttribute StackProtectReqAttribute Attribute = C.LLVMStackProtectReqAttribute Alignment Attribute = C.LLVMAlignment NoCaptureAttribute Attribute = C.LLVMNoCaptureAttribute NoRedZoneAttribute Attribute = C.LLVMNoRedZoneAttribute NoImplicitFloatAttribute Attribute = C.LLVMNoImplicitFloatAttribute NakedAttribute Attribute = C.LLVMNakedAttribute InlineHintAttribute Attribute = C.LLVMInlineHintAttribute StackAlignment Attribute = C.LLVMStackAlignment ReturnsTwiceAttribute Attribute = C.LLVMReturnsTwice UWTableAttribute Attribute = C.LLVMUWTable NonLazyBindAttribute Attribute = C.LLVMNonLazyBind )
type BasicBlock ¶
type BasicBlock struct {
C C.LLVMBasicBlockRef
}
func AddBasicBlock ¶
func AddBasicBlock(f Value, name string) (bb BasicBlock)
func InsertBasicBlock ¶
func InsertBasicBlock(ref BasicBlock, name string) (bb BasicBlock)
func NextBasicBlock ¶
func NextBasicBlock(bb BasicBlock) (rbb BasicBlock)
func PrevBasicBlock ¶
func PrevBasicBlock(bb BasicBlock) (rbb BasicBlock)
func (BasicBlock) EraseFromParent ¶
func (bb BasicBlock) EraseFromParent()
func (BasicBlock) FirstInstruction ¶
func (bb BasicBlock) FirstInstruction() (v Value)
func (BasicBlock) IsNil ¶
func (c BasicBlock) IsNil() bool
func (BasicBlock) LastInstruction ¶
func (bb BasicBlock) LastInstruction() (v Value)
func (BasicBlock) MoveAfter ¶
func (bb BasicBlock) MoveAfter(pos BasicBlock)
func (BasicBlock) MoveBefore ¶
func (bb BasicBlock) MoveBefore(pos BasicBlock)
func (BasicBlock) Parent ¶
func (bb BasicBlock) Parent() (v Value)
type Builder ¶
type Builder struct {
C C.LLVMBuilderRef
}
func NewBuilder ¶
func NewBuilder() (b Builder)
func (Builder) ClearInsertionPoint ¶
func (b Builder) ClearInsertionPoint()
func (Builder) CreateAggregateRet ¶
func (Builder) CreateArrayAlloca ¶
func (Builder) CreateArrayMalloc ¶
func (Builder) CreateBinOp ¶
func (Builder) CreateBitCast ¶
func (Builder) CreateBr ¶
func (b Builder) CreateBr(bb BasicBlock) (rv Value)
func (Builder) CreateCall ¶
func (Builder) CreateCast ¶
func (Builder) CreateCondBr ¶
func (b Builder) CreateCondBr(ifv Value, thenb, elseb BasicBlock) (rv Value)
func (Builder) CreateExactSDiv ¶
func (Builder) CreateExtractElement ¶
func (Builder) CreateExtractValue ¶
func (Builder) CreateFCmp ¶
func (b Builder) CreateFCmp(pred FloatPredicate, lhs, rhs Value, name string) (v Value)
func (Builder) CreateFPCast ¶
func (Builder) CreateFPToSI ¶
func (Builder) CreateFPToUI ¶
func (Builder) CreateFPTrunc ¶
func (Builder) CreateFree ¶
func (Builder) CreateGlobalString ¶
func (Builder) CreateGlobalStringPtr ¶
func (Builder) CreateICmp ¶
func (b Builder) CreateICmp(pred IntPredicate, lhs, rhs Value, name string) (v Value)
Comparisons
func (Builder) CreateInBoundsGEP ¶
func (Builder) CreateIndirectBr ¶
func (Builder) CreateInsertElement ¶
func (Builder) CreateInsertValue ¶
func (Builder) CreateIntCast ¶
func (Builder) CreateIntToPtr ¶
func (Builder) CreateInvoke ¶
func (Builder) CreateLandingPad ¶
func (Builder) CreatePointerCast ¶
func (Builder) CreatePtrDiff ¶
func (Builder) CreatePtrToInt ¶
func (Builder) CreateResume ¶
func (Builder) CreateSExtOrBitCast ¶
func (Builder) CreateSIToFP ¶
func (Builder) CreateSelect ¶
func (Builder) CreateShuffleVector ¶
func (Builder) CreateStructGEP ¶
func (Builder) CreateSwitch ¶
func (b Builder) CreateSwitch(v Value, elseb BasicBlock, numCases int) (rv Value)
func (Builder) CreateTrunc ¶
Casts
func (Builder) CreateTruncOrBitCast ¶
func (Builder) CreateUIToFP ¶
func (Builder) CreateUnreachable ¶
func (Builder) CreateVAArg ¶
func (Builder) CreateZExtOrBitCast ¶
func (Builder) CurrentDebugLocation ¶
func (Builder) GetInsertBlock ¶
func (b Builder) GetInsertBlock() (bb BasicBlock)
func (Builder) InsertDeclare ¶
func (Builder) InsertWithName ¶
func (Builder) SetInsertPoint ¶
func (b Builder) SetInsertPoint(block BasicBlock, instr Value)
func (Builder) SetInsertPointAtEnd ¶
func (b Builder) SetInsertPointAtEnd(block BasicBlock)
func (Builder) SetInsertPointBefore ¶
func (Builder) SetInstDebugLocation ¶
type ByteOrdering ¶
type ByteOrdering C.enum_LLVMByteOrdering
const ( BigEndian ByteOrdering = C.LLVMBigEndian LittleEndian ByteOrdering = C.LLVMLittleEndian )
type CallConv ¶
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 ¶
type CodeGenFileType C.LLVMCodeGenFileType
const ( AssemblyFile CodeGenFileType = C.LLVMAssemblyFile ObjectFile CodeGenFileType = C.LLVMObjectFile )
type CodeGenOptLevel ¶
type CodeGenOptLevel C.LLVMCodeGenOptLevel
const ( CodeGenLevelNone CodeGenOptLevel = C.LLVMCodeGenLevelNone CodeGenLevelLess CodeGenOptLevel = C.LLVMCodeGenLevelLess CodeGenLevelDefault CodeGenOptLevel = C.LLVMCodeGenLevelDefault CodeGenLevelAggressive CodeGenOptLevel = C.LLVMCodeGenLevelAggressive )
type CodeModel ¶
type CodeModel C.LLVMCodeModel
const ( CodeModelDefault CodeModel = C.LLVMCodeModelDefault CodeModelJITDefault CodeModel = C.LLVMCodeModelJITDefault CodeModelSmall CodeModel = C.LLVMCodeModelSmall CodeModelKernel CodeModel = C.LLVMCodeModelKernel CodeModelMedium CodeModel = C.LLVMCodeModelMedium CodeModelLarge CodeModel = C.LLVMCodeModelLarge )
type Context ¶
type Context struct {
C C.LLVMContextRef
}
I'm using these weird structs here, because *Ref types are pointers and Go's spec says that I can't use a pointer as a receiver base type.
func GlobalContext ¶
func GlobalContext() Context
func NewContext ¶
func NewContext() Context
func (Context) AddBasicBlock ¶
func (c Context) AddBasicBlock(f Value, name string) (bb BasicBlock)
func (Context) ConstString ¶
Operations on composite constants
func (Context) DoubleType ¶
func (Context) InsertBasicBlock ¶
func (c Context) InsertBasicBlock(ref BasicBlock, name string) (bb BasicBlock)
func (Context) NewBuilder ¶
func (Context) PPCFP128Type ¶
func (Context) StructCreateNamed ¶
func (Context) StructType ¶
Operations on struct types
func (Context) X86FP80Type ¶
type DIArrayType ¶
type DIArrayType struct { SizeInBits uint64 AlignInBits uint64 ElementType Value Subscripts []DISubrange }
DIArrayType holds the values for creating array type debug metadata.
type DIBasicType ¶
type DIBasicType struct { Name string SizeInBits uint64 AlignInBits uint64 Encoding DwarfTypeEncoding }
DIBasicType holds the values for creating basic type debug metadata.
type DIBuilder ¶
type DIBuilder struct {
// contains filtered or unexported fields
}
DIBuilder is a wrapper for the LLVM DIBuilder class.
func NewDIBuilder ¶
NewDIBuilder creates a new DIBuilder, associated with the given module.
func (*DIBuilder) CreateArrayType ¶
func (d *DIBuilder) CreateArrayType(t DIArrayType) Value
CreateArrayType creates struct type debug metadata.
func (*DIBuilder) CreateBasicType ¶
func (d *DIBuilder) CreateBasicType(t DIBasicType) Value
CreateBasicType creates basic type debug metadata.
func (*DIBuilder) CreateCompileUnit ¶
func (d *DIBuilder) CreateCompileUnit(cu DICompileUnit) Value
CreateCompileUnit creates compile unit debug metadata.
func (*DIBuilder) CreateFile ¶
CreateCompileUnit creates file debug metadata.
func (*DIBuilder) CreateFunction ¶
func (d *DIBuilder) CreateFunction(diScope Value, f DIFunction) Value
CreateCompileUnit creates function debug metadata.
func (*DIBuilder) CreateLexicalBlock ¶
func (d *DIBuilder) CreateLexicalBlock(diScope Value, b DILexicalBlock) Value
CreateCompileUnit creates lexical block debug metadata.
func (*DIBuilder) CreateLocalVariable ¶
func (d *DIBuilder) CreateLocalVariable(scope Value, v DILocalVariable) Value
CreateLocalVariable creates local variable debug metadata.
func (*DIBuilder) CreateMemberType ¶
func (d *DIBuilder) CreateMemberType(scope Value, t DIMemberType) Value
CreateMemberType creates struct type debug metadata.
func (*DIBuilder) CreatePointerType ¶
func (d *DIBuilder) CreatePointerType(t DIPointerType) Value
CreateBasicType creates basic type debug metadata.
func (*DIBuilder) CreateStructType ¶
func (d *DIBuilder) CreateStructType(scope Value, t DIStructType) Value
CreateStructType creates struct type debug metadata.
func (*DIBuilder) CreateSubroutineType ¶
func (d *DIBuilder) CreateSubroutineType(t DISubroutineType) Value
CreateSubroutineType creates subroutine type debug metadata.
func (*DIBuilder) CreateTypedef ¶
CreateTypedef creates typedef type debug metadata.
func (*DIBuilder) Finalize ¶
func (d *DIBuilder) Finalize()
FInalize finalizes the debug information generated by the DIBuilder.
func (*DIBuilder) InsertDeclareAtEnd ¶
func (d *DIBuilder) InsertDeclareAtEnd(v, diVarInfo Value, 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.
type DICompileUnit ¶
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 ¶
type DIFunction struct { Name string LinkageName string File Value Line int Type Value LocalToUnit bool IsDefinition bool ScopeLine int Flags int Optimized bool Function Value }
DIFunction holds the values for creating function debug metadata.
type DILexicalBlock ¶
type DILexicalBlock struct { File Value Line int Column int // Discriminator is the DWARF path discriminator. Discriminator int }
DILexicalBlock holds the values for creating lexical block debug metadata.
type DILocalVariable ¶
type DILocalVariable struct { Tag dwarf.Tag Name string File Value Line int Type Value AlwaysPreserve bool Flags int // ArgNo is the 1-based index of the argument in the function's // parameter list if it is an argument, or 0 otherwise. ArgNo int }
DILocalVariable holds the values for creating local variable debug metadata.
type DIMemberType ¶
type DIMemberType struct { Name string File Value Line int SizeInBits uint64 AlignInBits uint64 OffsetInBits uint64 Flags int Type Value }
DIMemberType holds the values for creating member type debug metadata.
type DIPointerType ¶
type DIPointerType struct { Pointee Value SizeInBits uint64 AlignInBits uint64 // optional Name string // optional }
DIPointerType holds the values for creating pointer type debug metadata.
type DIStructType ¶
type DIStructType struct { Name string File Value Line int SizeInBits uint64 AlignInBits uint64 Flags int DerivedFrom Value Elements []Value }
DIStructType holds the values for creating struct type debug metadata.
type DISubrange ¶
DISubrange describes an integer value range.
type DISubroutineType ¶
type DISubroutineType struct { // File is the file in which the subroutine type is defined. File Value // Parameters contains the subroutine parameter types, // including the return type at the 0th index. Parameters []Value }
DISubroutineType holds the values for creating subroutine type debug metadata.
type DwarfLang ¶
type DwarfLang uint32
const ( // http://dwarfstd.org/ShowIssue.php?issue=101014.1&type=open DW_LANG_Go DwarfLang = 0x0016 )
type DwarfTag ¶
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 ¶
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 ¶
type ExecutionEngine struct {
C C.LLVMExecutionEngineRef
}
func NewExecutionEngine ¶
func NewExecutionEngine(m Module) (ee ExecutionEngine, err error)
func NewInterpreter ¶
func NewInterpreter(m Module) (ee ExecutionEngine, err error)
func NewJITCompiler ¶
func NewJITCompiler(m Module, optLevel int) (ee ExecutionEngine, err error)
func (ExecutionEngine) AddGlobalMapping ¶
func (ee ExecutionEngine) AddGlobalMapping(global Value, addr unsafe.Pointer)
func (ExecutionEngine) AddModule ¶
func (ee ExecutionEngine) AddModule(m Module)
func (ExecutionEngine) Dispose ¶
func (ee ExecutionEngine) Dispose()
func (ExecutionEngine) FindFunction ¶
func (ee ExecutionEngine) FindFunction(name string) (f Value)
func (ExecutionEngine) FreeMachineCodeForFunction ¶
func (ee ExecutionEngine) FreeMachineCodeForFunction(f Value)
func (ExecutionEngine) PointerToGlobal ¶
func (ee ExecutionEngine) PointerToGlobal(global Value) unsafe.Pointer
func (ExecutionEngine) RecompileAndRelinkFunction ¶
func (ee ExecutionEngine) RecompileAndRelinkFunction(f Value) unsafe.Pointer
func (ExecutionEngine) RemoveModule ¶
func (ee ExecutionEngine) RemoveModule(m Module)
func (ExecutionEngine) RunFunction ¶
func (ee ExecutionEngine) RunFunction(f Value, args []GenericValue) (g GenericValue)
func (ExecutionEngine) RunStaticConstructors ¶
func (ee ExecutionEngine) RunStaticConstructors()
func (ExecutionEngine) RunStaticDestructors ¶
func (ee ExecutionEngine) RunStaticDestructors()
func (ExecutionEngine) TargetData ¶
func (ee ExecutionEngine) TargetData() (td TargetData)
type FloatPredicate ¶
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 ¶
type GenericValue struct {
C C.LLVMGenericValueRef
}
func NewGenericValueFromFloat ¶
func NewGenericValueFromFloat(t Type, n float64) (g GenericValue)
func NewGenericValueFromInt ¶
func NewGenericValueFromInt(t Type, n uint64, signed bool) (g GenericValue)
func NewGenericValueFromPointer ¶
func NewGenericValueFromPointer(p unsafe.Pointer) (g GenericValue)
func (GenericValue) Dispose ¶
func (g GenericValue) Dispose()
func (GenericValue) Float ¶
func (g GenericValue) Float(t Type) float64
func (GenericValue) Int ¶
func (g GenericValue) Int(signed bool) uint64
func (GenericValue) IntWidth ¶
func (g GenericValue) IntWidth() int
func (GenericValue) Pointer ¶
func (g GenericValue) Pointer() unsafe.Pointer
type IntPredicate ¶
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 ¶
type LandingPadClause C.LLVMLandingPadClauseTy
const ( LandingPadCatch LandingPadClause = C.LLVMLandingPadCatch LandingPadFilter LandingPadClause = C.LLVMLandingPadFilter )
type Linkage ¶
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 DLLImportLinkage Linkage = C.LLVMDLLImportLinkage DLLExportLinkage Linkage = C.LLVMDLLExportLinkage ExternalWeakLinkage Linkage = C.LLVMExternalWeakLinkage GhostLinkage Linkage = C.LLVMGhostLinkage CommonLinkage Linkage = C.LLVMCommonLinkage LinkerPrivateLinkage Linkage = C.LLVMLinkerPrivateLinkage LinkerPrivateWeakLinkage Linkage = C.LLVMLinkerPrivateWeakLinkage )
type MemoryBuffer ¶
type MemoryBuffer struct {
C C.LLVMMemoryBufferRef
}
func NewMemoryBufferFromFile ¶
func NewMemoryBufferFromFile(path string) (b MemoryBuffer, err error)
func NewMemoryBufferFromStdin ¶
func NewMemoryBufferFromStdin() (b MemoryBuffer, err error)
func (MemoryBuffer) Bytes ¶
func (b MemoryBuffer) Bytes() []byte
func (MemoryBuffer) Dispose ¶
func (b MemoryBuffer) Dispose()
func (MemoryBuffer) IsNil ¶
func (c MemoryBuffer) IsNil() bool
type Module ¶
type Module struct {
C C.LLVMModuleRef
}
func ParseBitcodeFile ¶
ParseBitcodeFile parses the LLVM IR (bitcode) in the file with the specified name, and returns a new LLVM module.
func (Module) AddNamedMetadataOperand ¶
func (Module) DataLayout ¶
Data layout. See Module::getDataLayout.
func (Module) FirstFunction ¶
func (Module) FirstGlobal ¶
func (Module) GetTypeByName ¶
func (Module) LastFunction ¶
func (Module) LastGlobal ¶
func (Module) NamedFunction ¶
func (Module) NamedGlobal ¶
func (Module) SetDataLayout ¶
func (Module) SetInlineAsm ¶
See Module::setModuleInlineAsm.
type ModuleProvider ¶
type ModuleProvider struct {
C C.LLVMModuleProviderRef
}
func NewModuleProviderForModule ¶
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) IsNil ¶
func (c ModuleProvider) IsNil() bool
type Opcode ¶
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 ¶
type PassManager struct {
C C.LLVMPassManagerRef
}
func NewFunctionPassManagerForModule ¶
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 ¶
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) Add ¶
func (pm PassManager) Add(td TargetData)
Adds target data information to a pass manager. This does not take ownership of the target data. See the method llvm::PassManagerBase::add.
func (PassManager) AddAggressiveDCEPass ¶
func (pm PassManager) AddAggressiveDCEPass()
func (PassManager) AddArgumentPromotionPass ¶
func (pm PassManager) AddArgumentPromotionPass()
func (PassManager) AddCFGSimplificationPass ¶
func (pm PassManager) AddCFGSimplificationPass()
func (PassManager) AddConstantMergePass ¶
func (pm PassManager) AddConstantMergePass()
func (PassManager) AddConstantPropagationPass ¶
func (pm PassManager) AddConstantPropagationPass()
func (PassManager) AddDeadArgEliminationPass ¶
func (pm PassManager) AddDeadArgEliminationPass()
func (PassManager) AddDeadStoreEliminationPass ¶
func (pm PassManager) AddDeadStoreEliminationPass()
func (PassManager) AddDemoteMemoryToRegisterPass ¶
func (pm PassManager) AddDemoteMemoryToRegisterPass()
func (PassManager) AddFunctionAttrsPass ¶
func (pm PassManager) AddFunctionAttrsPass()
func (PassManager) AddFunctionInliningPass ¶
func (pm PassManager) AddFunctionInliningPass()
func (PassManager) AddGVNPass ¶
func (pm PassManager) AddGVNPass()
func (PassManager) AddGlobalDCEPass ¶
func (pm PassManager) AddGlobalDCEPass()
func (PassManager) AddGlobalOptimizerPass ¶
func (pm PassManager) AddGlobalOptimizerPass()
func (PassManager) AddIPConstantPropagationPass ¶
func (pm PassManager) AddIPConstantPropagationPass()
func (PassManager) AddIPSCCPPass ¶
func (pm PassManager) AddIPSCCPPass()
func (PassManager) AddIndVarSimplifyPass ¶
func (pm PassManager) AddIndVarSimplifyPass()
func (PassManager) AddInstructionCombiningPass ¶
func (pm PassManager) AddInstructionCombiningPass()
func (PassManager) AddInternalizePass ¶
func (pm PassManager) AddInternalizePass(allButMain bool)
func (PassManager) AddJumpThreadingPass ¶
func (pm PassManager) AddJumpThreadingPass()
func (PassManager) AddLICMPass ¶
func (pm PassManager) AddLICMPass()
func (PassManager) AddLoopDeletionPass ¶
func (pm PassManager) AddLoopDeletionPass()
func (PassManager) AddLoopRotatePass ¶
func (pm PassManager) AddLoopRotatePass()
func (PassManager) AddLoopUnrollPass ¶
func (pm PassManager) AddLoopUnrollPass()
func (PassManager) AddLoopUnswitchPass ¶
func (pm PassManager) AddLoopUnswitchPass()
func (PassManager) AddMemCpyOptPass ¶
func (pm PassManager) AddMemCpyOptPass()
func (PassManager) AddPromoteMemoryToRegisterPass ¶
func (pm PassManager) AddPromoteMemoryToRegisterPass()
func (PassManager) AddPruneEHPass ¶
func (pm PassManager) AddPruneEHPass()
func (PassManager) AddReassociatePass ¶
func (pm PassManager) AddReassociatePass()
func (PassManager) AddSCCPPass ¶
func (pm PassManager) AddSCCPPass()
func (PassManager) AddScalarReplAggregatesPass ¶
func (pm PassManager) AddScalarReplAggregatesPass()
func (PassManager) AddScalarReplAggregatesPassWithThreshold ¶
func (pm PassManager) AddScalarReplAggregatesPassWithThreshold(threshold int)
func (PassManager) AddSimplifyLibCallsPass ¶
func (pm PassManager) AddSimplifyLibCallsPass()
func (PassManager) AddStripDeadPrototypesPass ¶
func (pm PassManager) AddStripDeadPrototypesPass()
func (PassManager) AddTailCallEliminationPass ¶
func (pm PassManager) AddTailCallEliminationPass()
func (PassManager) AddVerifierPass ¶
func (pm PassManager) AddVerifierPass()
func (PassManager) Dispose ¶
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 ¶
func (pm PassManager) FinalizeFunc() bool
Finalizes all of the function passes scheduled in in the function pass manager. Returns 1 if any of the passes modified the module, 0 otherwise. See llvm::FunctionPassManager::doFinalization.
func (PassManager) InitializeFunc ¶
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 ¶
func (c PassManager) IsNil() bool
func (PassManager) Run ¶
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 ¶
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 ¶
type PassManagerBuilder struct {
C C.LLVMPassManagerBuilderRef
}
func NewPassManagerBuilder ¶
func NewPassManagerBuilder() (pmb PassManagerBuilder)
func (PassManagerBuilder) Dispose ¶
func (pmb PassManagerBuilder) Dispose()
func (PassManagerBuilder) Populate ¶
func (pmb PassManagerBuilder) Populate(pm PassManager)
func (PassManagerBuilder) PopulateFunc ¶
func (pmb PassManagerBuilder) PopulateFunc(pm PassManager)
func (PassManagerBuilder) SetOptLevel ¶
func (pmb PassManagerBuilder) SetOptLevel(level int)
func (PassManagerBuilder) SetSizeLevel ¶
func (pmb PassManagerBuilder) SetSizeLevel(level int)
type RelocMode ¶
type RelocMode C.LLVMRelocMode
const ( RelocDefault RelocMode = C.LLVMRelocDefault RelocStatic RelocMode = C.LLVMRelocStatic RelocPIC RelocMode = C.LLVMRelocPIC RelocDynamicNoPic RelocMode = C.LLVMRelocDynamicNoPic )
type Target ¶
type Target struct {
C C.LLVMTargetRef
}
func FirstTarget ¶
func FirstTarget() Target
func GetTargetFromTriple ¶
func (Target) CreateTargetMachine ¶
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 ¶
func (Target) NextTarget ¶
type TargetData ¶
type TargetData struct {
C C.LLVMTargetDataRef
}
func NewTargetData ¶
func NewTargetData(rep string) (td TargetData)
Creates target data from a target layout string. See the constructor llvm::TargetData::TargetData.
func (TargetData) ABITypeAlignment ¶
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 ¶
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 ¶
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 ¶
func (td TargetData) Dispose()
Deallocates a TargetData. See the destructor llvm::TargetData::~TargetData.
func (TargetData) ElementContainingOffset ¶
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 ¶
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 ¶
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 ¶
func (td TargetData) PointerSize() int
Returns the pointer size in bytes for a target. See the method llvm::TargetData::getPointerSize.
func (TargetData) PrefTypeAlignment ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
type TargetMachine struct {
C C.LLVMTargetMachineRef
}
func (TargetMachine) Dispose ¶
func (tm TargetMachine) Dispose()
Dispose releases resources related to the TargetMachine.
func (TargetMachine) EmitToMemoryBuffer ¶
func (tm TargetMachine) EmitToMemoryBuffer(m Module, ft CodeGenFileType) (MemoryBuffer, error)
func (TargetMachine) TargetData ¶
func (tm TargetMachine) TargetData() TargetData
TargetData returns the TargetData for the machine.
func (TargetMachine) Triple ¶
func (tm TargetMachine) Triple() string
Triple returns the triple describing the machine (arch-vendor-os).
type Type ¶
type Type struct {
C C.LLVMTypeRef
}
func DoubleType ¶
func DoubleType() (t Type)
func FunctionType ¶
Operations on function types
func PPCFP128Type ¶
func PPCFP128Type() (t Type)
func PointerType ¶
func StructType ¶
func VectorType ¶
func X86FP80Type ¶
func X86FP80Type() (t Type)
func (Type) ArrayLength ¶
func (Type) ElementType ¶
func (Type) IntTypeWidth ¶
func (Type) IsFunctionVarArg ¶
func (Type) IsStructPacked ¶
func (Type) ParamTypes ¶
func (Type) ParamTypesCount ¶
func (Type) PointerAddressSpace ¶
func (Type) ReturnType ¶
func (Type) StructElementTypes ¶
func (Type) StructElementTypesCount ¶
func (Type) StructName ¶
func (Type) StructSetBody ¶
func (Type) VectorSize ¶
type TypeKind ¶
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 )
type Use ¶
type Use struct {
C C.LLVMUseRef
}
type Value ¶
type Value struct {
C C.LLVMValueRef
}
func AddFunction ¶
Operations on functions
func AddGlobalInAddressSpace ¶
func BlockAddress ¶
func BlockAddress(f Value, bb BasicBlock) (v Value)
func ConstAllOnes ¶
func ConstArray ¶
func ConstBitCast ¶
func ConstExactSDiv ¶
func ConstExtractElement ¶
func ConstExtractValue ¶
func ConstFCmp ¶
func ConstFCmp(pred FloatPredicate, lhs, rhs Value) (v Value)
func ConstFPCast ¶
func ConstFPExt ¶
func ConstFPToSI ¶
func ConstFPToUI ¶
func ConstFPTrunc ¶
func ConstFloat ¶
func ConstFloatFromString ¶
func ConstICmp ¶
func ConstICmp(pred IntPredicate, lhs, rhs Value) (v Value)
func ConstInBoundsGEP ¶
func ConstInsertElement ¶
func ConstInsertValue ¶
func ConstIntToPtr ¶
func ConstNSWAdd ¶
func ConstNSWMul ¶
func ConstNSWNeg ¶
func ConstNSWSub ¶
func ConstNUWAdd ¶
func ConstNUWMul ¶
func ConstNUWNeg ¶
func ConstNUWSub ¶
func ConstNamedStruct ¶
func ConstPointerCast ¶
func ConstPointerNull ¶
func ConstPtrToInt ¶
func ConstSExtOrBitCast ¶
func ConstSIToFP ¶
func ConstSelect ¶
func ConstShuffleVector ¶
func ConstString ¶
func ConstStruct ¶
func ConstTrunc ¶
func ConstTruncOrBitCast ¶
func ConstUIToFP ¶
func ConstVector ¶
func ConstZExtOrBitCast ¶
func NextFunction ¶
func NextGlobal ¶
func NextInstruction ¶
func PrevFunction ¶
func PrevGlobal ¶
func PrevInstruction ¶
func (Value) AddAttribute ¶
func (Value) AddCase ¶
func (v Value) AddCase(on Value, dest BasicBlock)
Add a case to the switch instruction
func (Value) AddDest ¶
func (v Value) AddDest(dest BasicBlock)
Add a destination to the indirectbr instruction
func (Value) AddFunctionAttr ¶
func (Value) AddIncoming ¶
func (v Value) AddIncoming(vals []Value, blocks []BasicBlock)
Operations on phi nodes
func (Value) AddInstrAttribute ¶
func (Value) AddTargetDependentFunctionAttr ¶
func (Value) AsBasicBlock ¶
func (v Value) AsBasicBlock() (bb BasicBlock)
func (Value) BasicBlocks ¶
func (v Value) BasicBlocks() []BasicBlock
func (Value) BasicBlocksCount ¶
func (Value) EntryBasicBlock ¶
func (v Value) EntryBasicBlock() (bb BasicBlock)
func (Value) EraseFromParentAsFunction ¶
func (v Value) EraseFromParentAsFunction()
func (Value) EraseFromParentAsGlobal ¶
func (v Value) EraseFromParentAsGlobal()
func (Value) FirstBasicBlock ¶
func (v Value) FirstBasicBlock() (bb BasicBlock)
func (Value) FirstParam ¶
func (Value) FunctionAttr ¶
func (Value) FunctionCallConv ¶
func (Value) GlobalParent ¶
Operations on global variables, functions, and aliases (globals)
func (Value) HasMetadata ¶
func (Value) IncomingBlock ¶
func (v Value) IncomingBlock(i int) (bb BasicBlock)
func (Value) IncomingCount ¶
func (Value) IncomingValue ¶
func (Value) Initializer ¶
func (Value) InstructionCallConv ¶
func (Value) InstructionOpcode ¶
func (Value) InstructionParent ¶
func (v Value) InstructionParent() (bb BasicBlock)
Operations on instructions
func (Value) IntrinsicID ¶
func (Value) IsAAllocaInst ¶
func (Value) IsAArgument ¶
Conversion functions. Generated using preprocess statements above. Return the input value if it is an instance of the specified class, otherwise NULL. See llvm::dyn_cast_or_null<>.
func (Value) IsABasicBlock ¶
func (Value) IsABinaryOperator ¶
func (Value) IsABitCastInst ¶
func (Value) IsABranchInst ¶
func (Value) IsACallInst ¶
func (Value) IsACastInst ¶
func (Value) IsACmpInst ¶
func (Value) IsAConstant ¶
func (Value) IsAConstantAggregateZero ¶
func (Value) IsAConstantArray ¶
func (Value) IsAConstantExpr ¶
func (Value) IsAConstantFP ¶
func (Value) IsAConstantInt ¶
func (Value) IsAConstantPointerNull ¶
func (Value) IsAConstantStruct ¶
func (Value) IsAConstantVector ¶
func (Value) IsADbgDeclareInst ¶
func (Value) IsADbgInfoIntrinsic ¶
func (Value) IsAExtractElementInst ¶
func (Value) IsAExtractValueInst ¶
func (Value) IsAFCmpInst ¶
func (Value) IsAFPExtInst ¶
func (Value) IsAFPToSIInst ¶
func (Value) IsAFPToUIInst ¶
func (Value) IsAFPTruncInst ¶
func (Value) IsAFunction ¶
func (Value) IsAGetElementPtrInst ¶
func (Value) IsAGlobalAlias ¶
func (Value) IsAGlobalValue ¶
func (Value) IsAGlobalVariable ¶
func (Value) IsAICmpInst ¶
func (Value) IsAInlineAsm ¶
func (Value) IsAInsertElementInst ¶
func (Value) IsAInsertValueInst ¶
func (Value) IsAInstruction ¶
func (Value) IsAIntToPtrInst ¶
func (Value) IsAIntrinsicInst ¶
func (Value) IsAInvokeInst ¶
func (Value) IsALoadInst ¶
func (Value) IsAMemCpyInst ¶
func (Value) IsAMemIntrinsic ¶
func (Value) IsAMemMoveInst ¶
func (Value) IsAMemSetInst ¶
func (Value) IsAPHINode ¶
func (Value) IsAPtrToIntInst ¶
func (Value) IsAReturnInst ¶
func (Value) IsASExtInst ¶
func (Value) IsASIToFPInst ¶
func (Value) IsASelectInst ¶
func (Value) IsAShuffleVectorInst ¶
func (Value) IsAStoreInst ¶
func (Value) IsASwitchInst ¶
func (Value) IsATerminatorInst ¶
func (Value) IsATruncInst ¶
func (Value) IsAUIToFPInst ¶
func (Value) IsAUnaryInstruction ¶
func (Value) IsAUndefValue ¶
func (Value) IsAUnreachableInst ¶
func (Value) IsAVAArgInst ¶
func (Value) IsAZExtInst ¶
func (Value) IsBasicBlock ¶
func (Value) IsConstant ¶
func (Value) IsDeclaration ¶
func (Value) IsGlobalConstant ¶
func (Value) IsThreadLocal ¶
func (Value) LastBasicBlock ¶
func (v Value) LastBasicBlock() (bb BasicBlock)
func (Value) OperandsCount ¶
func (Value) ParamParent ¶
func (Value) RemoveAttribute ¶
func (Value) RemoveFunctionAttr ¶
func (Value) RemoveInstrAttribute ¶
func (Value) ReplaceAllUsesWith ¶
func (Value) SetAlignment ¶
func (Value) SetCleanup ¶
func (Value) SetFunctionCallConv ¶
func (Value) SetGlobalConstant ¶
func (Value) SetInitializer ¶
func (Value) SetInstrParamAlignment ¶
func (Value) SetInstructionCallConv ¶
Operations on call sites
func (Value) SetLinkage ¶
func (Value) SetMetadata ¶
func (Value) SetOperand ¶
func (Value) SetParamAlignment ¶
func (Value) SetSection ¶
func (Value) SetTailCall ¶
func (Value) SetThreadLocal ¶
func (Value) SetVisibility ¶
func (v Value) SetVisibility(vi Visibility)
func (Value) Visibility ¶
func (v Value) Visibility() Visibility
type VerifierFailureAction ¶
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 ¶
type Visibility C.LLVMVisibility
const ( DefaultVisibility Visibility = C.LLVMDefaultVisibility HiddenVisibility Visibility = C.LLVMHiddenVisibility ProtectedVisibility Visibility = C.LLVMProtectedVisibility )