Home | History | Annotate | Download | only in llvm

Lines Matching refs:Value

37 	Value struct {
75 func (c Value) IsNil() bool { return c.C == nil }
85 func llvmValueRefPtr(t *Value) *C.LLVMValueRef { return (*C.LLVMValueRef)(unsafe.Pointer(t)) }
99 func llvmValueRefs(values []Value) (*C.LLVMValueRef, C.unsigned) {
630 // llvm.Value
634 func (v Value) Type() (t Type) { t.C = C.LLVMTypeOf(v.C); return }
635 func (v Value) Name() string { return C.GoString(C.LLVMGetValueName(v.C)) }
636 func (v Value) SetName(name string) {
641 func (v Value) Dump() { C.LLVMDumpValue(v.C) }
642 func (v Value) ReplaceAllUsesWith(nv Value) { C.LLVMReplaceAllUsesWith(v.C, nv.C) }
643 func (v Value) HasMetadata() bool { return C.LLVMHasMetadata(v.C) != 0 }
644 func (v Value) Metadata(kind int) (rv Value) {
648 func (v Value) SetMetadata(kind int, node Metadata) {
653 // Return the input value if it is an instance of the specified class, otherwise NULL.
655 func (v Value) IsAArgument() (rv Value) { rv.C = C.LLVMIsAArgument(v.C); return }
656 func (v Value) IsABasicBlock() (rv Value) { rv.C = C.LLVMIsABasicBlock(v.C); return }
657 func (v Value) IsAInlineAsm() (rv Value) { rv.C = C.LLVMIsAInlineAsm(v.C); return }
658 func (v Value) IsAUser() (rv Value) { rv.C = C.LLVMIsAUser(v.C); return }
659 func (v Value) IsAConstant() (rv Value) { rv.C = C.LLVMIsAConstant(v.C); return }
660 func (v Value) IsAConstantAggregateZero() (rv Value) {
664 func (v Value) IsAConstantArray() (rv Value) { rv.C = C.LLVMIsAConstantArray(v.C); return }
665 func (v Value) IsAConstantExpr() (rv Value) { rv.C = C.LLVMIsAConstantExpr(v.C); return }
666 func (v Value) IsAConstantFP() (rv Value) { rv.C = C.LLVMIsAConstantFP(v.C); return }
667 func (v Value) IsAConstantInt() (rv Value) { rv.C = C.LLVMIsAConstantInt(v.C); return }
668 func (v Value) IsAConstantPointerNull() (rv Value) { rv.C = C.LLVMIsAConstantPointerNull(v.C); return }
669 func (v Value) IsAConstantStruct() (rv Value) { rv.C = C.LLVMIsAConstantStruct(v.C); return }
670 func (v Value) IsAConstantVector() (rv Value) { rv.C = C.LLVMIsAConstantVector(v.C); return }
671 func (v Value) IsAGlobalValue() (rv Value) { rv.C = C.LLVMIsAGlobalValue(v.C); return }
672 func (v Value) IsAFunction() (rv Value) { rv.C = C.LLVMIsAFunction(v.C); return }
673 func (v Value) IsAGlobalAlias() (rv Value) { rv.C = C.LLVMIsAGlobalAlias(v.C); return }
674 func (v Value) IsAGlobalVariable() (rv Value) { rv.C = C.LLVMIsAGlobalVariable(v.C); return }
675 func (v Value) IsAUndefValue() (rv Value) { rv.C = C.LLVMIsAUndefValue(v.C); return }
676 func (v Value) IsAInstruction() (rv Value) { rv.C = C.LLVMIsAInstruction(v.C); return }
677 func (v Value) IsABinaryOperator() (rv Value) { rv.C = C.LLVMIsABinaryOperator(v.C); return }
678 func (v Value) IsACallInst() (rv Value) { rv.C = C.LLVMIsACallInst(v.C); return }
679 func (v Value) IsAIntrinsicInst() (rv Value) { rv.C = C.LLVMIsAIntrinsicInst(v.C); return }
680 func (v Value) IsADbgInfoIntrinsic() (rv Value) { rv.C = C.LLVMIsADbgInfoIntrinsic(v.C); return }
681 func (v Value) IsADbgDeclareInst() (rv Value) { rv.C = C.LLVMIsADbgDeclareInst(v.C); return }
682 func (v Value) IsAMemIntrinsic() (rv Value) { rv.C = C.LLVMIsAMemIntrinsic(v.C); return }
683 func (v Value) IsAMemCpyInst() (rv Value) { rv.C = C.LLVMIsAMemCpyInst(v.C); return }
684 func (v Value) IsAMemMoveInst() (rv Value) { rv.C = C.LLVMIsAMemMoveInst(v.C); return }
685 func (v Value) IsAMemSetInst() (rv Value) { rv.C = C.LLVMIsAMemSetInst(v.C); return }
686 func (v Value) IsACmpInst() (rv Value) { rv.C = C.LLVMIsACmpInst(v.C); return }
687 func (v Value) IsAFCmpInst() (rv Value) { rv.C = C.LLVMIsAFCmpInst(v.C); return }
688 func (v Value) IsAICmpInst() (rv Value) { rv.C = C.LLVMIsAICmpInst(v.C); return }
689 func (v Value) IsAExtractElementInst() (rv Value) { rv.C = C.LLVMIsAExtractElementInst(v.C); return }
690 func (v Value) IsAGetElementPtrInst() (rv Value) { rv.C = C.LLVMIsAGetElementPtrInst(v.C); return }
691 func (v Value) IsAInsertElementInst() (rv Value) { rv.C = C.LLVMIsAInsertElementInst(v.C); return }
692 func (v Value) IsAInsertValueInst() (rv Value) { rv.C = C.LLVMIsAInsertValueInst(v.C); return }
693 func (v Value) IsAPHINode() (rv Value) { rv.C = C.LLVMIsAPHINode(v.C); return }
694 func (v Value) IsASelectInst() (rv Value) { rv.C = C.LLVMIsASelectInst(v.C); return }
695 func (v Value) IsAShuffleVectorInst() (rv Value) { rv.C = C.LLVMIsAShuffleVectorInst(v.C); return }
696 func (v Value) IsAStoreInst() (rv Value) { rv.C = C.LLVMIsAStoreInst(v.C); return }
697 func (v Value) IsATerminatorInst() (rv Value) { rv.C = C.LLVMIsATerminatorInst(v.C); return }
698 func (v Value) IsABranchInst() (rv Value) { rv.C = C.LLVMIsABranchInst(v.C); return }
699 func (v Value) IsAInvokeInst() (rv Value) { rv.C = C.LLVMIsAInvokeInst(v.C); return }
700 func (v Value) IsAReturnInst() (rv Value) { rv.C = C.LLVMIsAReturnInst(v.C); return }
701 func (v Value) IsASwitchInst() (rv Value) { rv.C = C.LLVMIsASwitchInst(v.C); return }
702 func (v Value) IsAUnreachableInst() (rv Value) { rv.C = C.LLVMIsAUnreachableInst(v.C); return }
703 func (v Value) IsAUnaryInstruction() (rv Value) { rv.C = C.LLVMIsAUnaryInstruction(v.C); return }
704 func (v Value) IsAAllocaInst() (rv Value) { rv.C = C.LLVMIsAAllocaInst(v.C); return }
705 func (v Value) IsACastInst() (rv Value) { rv.C = C.LLVMIsACastInst(v.C); return }
706 func (v Value) IsABitCastInst() (rv Value) { rv.C = C.LLVMIsABitCastInst(v.C); return }
707 func (v Value) IsAFPExtInst() (rv Value) { rv.C = C.LLVMIsAFPExtInst(v.C); return }
708 func (v Value) IsAFPToSIInst() (rv Value) { rv.C = C.LLVMIsAFPToSIInst(v.C); return }
709 func (v Value) IsAFPToUIInst() (rv Value) { rv.C = C.LLVMIsAFPToUIInst(v.C); return }
710 func (v Value) IsAFPTruncInst() (rv Value) { rv.C = C.LLVMIsAFPTruncInst(v.C); return }
711 func (v Value) IsAIntToPtrInst() (rv Value) { rv.C = C.LLVMIsAIntToPtrInst(v.C); return }
712 func (v Value) IsAPtrToIntInst() (rv Value) { rv.C = C.LLVMIsAPtrToIntInst(v.C); return }
713 func (v Value) IsASExtInst() (rv Value) { rv.C = C.LLVMIsASExtInst(v.C); return }
714 func (v Value) IsASIToFPInst() (rv Value) { rv.C = C.LLVMIsASIToFPInst(v.C); return }
715 func (v Value) IsATruncInst() (rv Value) { rv.C = C.LLVMIsATruncInst(v.C); return }
716 func (v Value) IsAUIToFPInst() (rv Value) { rv.C = C.LLVMIsAUIToFPInst(v.C); return }
717 func (v Value) IsAZExtInst() (rv Value) { rv.C = C.LLVMIsAZExtInst(v.C); return }
718 func (v Value) IsAExtractValueInst() (rv Value) { rv.C = C.LLVMIsAExtractValueInst(v.C); return }
719 func (v Value) IsALoadInst() (rv Value) { rv.C = C.LLVMIsALoadInst(v.C); return }
720 func (v Value) IsAVAArgInst() (rv Value) { rv.C = C.LLVMIsAVAArgInst(v.C); return }
723 func (v Value) FirstUse() (u Use) { u.C = C.LLVMGetFirstUse(v.C); return }
725 func (u Use) User() (v Value) { v.C = C.LLVMGetUser(u.C); return }
726 func (u Use) UsedValue() (v Value) { v.C = C.LLVMGetUsedValue(u.C); return }
729 func (v Value) Operand(i int) (rv Value) { rv.C = C.LLVMGetOperand(v.C, C.unsigned(i)); return }
730 func (v Value) SetOperand(i int, op Value) { C.LLVMSetOperand(v.C, C.unsigned(i), op.C) }
731 func (v Value) OperandsCount() int { return int(C.LLVMGetNumOperands(v.C)) }
734 func ConstNull(t Type) (v Value) { v.C = C.LLVMConstNull(t.C); return }
735 func ConstAllOnes(t Type) (v Value) { v.C = C.LLVMConstAllOnes(t.C); return }
736 func Undef(t Type) (v Value) { v.C = C.LLVMGetUndef(t.C); return }
737 func (v Value) IsConstant() bool { return C.LLVMIsConstant(v.C) != 0 }
738 func (v Value) IsNull() bool { return C.LLVMIsNull(v.C) != 0 }
739 func (v Value) IsUndef() bool { return C.LLVMIsUndef(v.C) != 0 }
740 func ConstPointerNull(t Type) (v Value) { v.C = C.LLVMConstPointerNull(t.C); return }
759 func (v Value) ConstantAsMetadata() (md Metadata) {
765 func ConstInt(t Type, n uint64, signExtend bool) (v Value) {
771 func ConstIntFromString(t Type, str string, radix int) (v Value) {
777 func ConstFloat(t Type, n float64) (v Value) {
781 func ConstFloatFromString(t Type, str string) (v Value) {
788 func (v Value) ZExtValue() uint64 { return uint64(C.LLVMConstIntGetZExtValue(v.C)) }
789 func (v Value) SExtValue() int64 { return int64(C.LLVMConstIntGetSExtValue(v.C)) }
792 func (c Context) ConstString(str string, addnull bool) (v Value) {
799 func (c Context) ConstStruct(constVals []Value, packed bool) (v Value) {
805 func ConstNamedStruct(t Type, constVals []Value) (v Value) {
810 func ConstString(str string, addnull bool) (v Value) {
817 func ConstArray(t Type, constVals []Value) (v Value) {
822 func ConstStruct(constVals []Value, packed bool) (v Value) {
827 func ConstVector(scalarConstVals []Value, packed bool) (v Value) {
834 func (v Value) Opcode() Opcode { return Opcode(C.LLVMGetConstOpcode(v.C)) }
835 func (v Value) InstructionOpcode() Opcode { return Opcode(C.LLVMGetInstructionOpcode(v.C)) }
836 func AlignOf(t Type) (v Value) { v.C = C.LLVMAlignOf(t.C); return }
837 func SizeOf(t Type) (v Value) { v.C = C.LLVMSizeOf(t.C); return }
838 func ConstNeg(v Value) (rv Value) { rv.C = C.LLVMConstNeg(v.C); return }
839 func ConstNSWNeg(v Value) (rv Value) { rv.C = C.LLVMConstNSWNeg(v.C); return }
840 func ConstNUWNeg(v Value) (rv Value) { rv.C = C.LLVMConstNUWNeg(v.C); return }
841 func ConstFNeg(v Value) (rv Value) { rv.C = C.LLVMConstFNeg(v.C); return }
842 Value) (rv Value) { rv.C = C.LLVMConstNot(v.C); return }
843 func ConstAdd(lhs, rhs Value) (v Value) { v.C = C.LLVMConstAdd(lhs.C, rhs.C); return }
844 func ConstNSWAdd(lhs, rhs Value) (v Value) { v.C = C.LLVMConstNSWAdd(lhs.C, rhs.C); return }
845 func ConstNUWAdd(lhs, rhs Value) (v Value) { v.C = C.LLVMConstNUWAdd(lhs.C, rhs.C); return }
846 func ConstFAdd(lhs, rhs Value) (v Value) { v.C = C.LLVMConstFAdd(lhs.C, rhs.C); return }
847 func ConstSub(lhs, rhs Value) (v Value) { v.C = C.LLVMConstSub(lhs.C, rhs.C); return }
848 func ConstNSWSub(lhs, rhs Value) (v Value) { v.C = C.LLVMConstNSWSub(lhs.C, rhs.C); return }
849 func ConstNUWSub(lhs, rhs Value) (v Value) { v.C = C.LLVMConstNUWSub(lhs.C, rhs.C); return }
850 func ConstFSub(lhs, rhs Value) (v Value) { v.C = C.LLVMConstFSub(lhs.C, rhs.C); return }
851 func ConstMul(lhs, rhs Value) (v Value) { v.C = C.LLVMConstMul(lhs.C, rhs.C); return }
852 func ConstNSWMul(lhs, rhs Value) (v Value) { v.C = C.LLVMConstNSWMul(lhs.C, rhs.C); return }
853 func ConstNUWMul(lhs, rhs Value) (v Value) { v.C = C.LLVMConstNUWMul(lhs.C, rhs.C); return }
854 func ConstFMul(lhs, rhs Value) (v Value) { v.C = C.LLVMConstFMul(lhs.C, rhs.C); return }
855 func ConstUDiv(lhs, rhs Value) (v Value) { v.C = C.LLVMConstUDiv(lhs.C, rhs.C); return }
856 func ConstSDiv(lhs, rhs Value) (v Value) { v.C = C.LLVMConstSDiv(lhs.C, rhs.C); return }
857 func ConstExactSDiv(lhs, rhs Value) (v Value) { v.C = C.LLVMConstExactSDiv(lhs.C, rhs.C); return }
858 func ConstFDiv(lhs, rhs Value) (v Value) { v.C = C.LLVMConstFDiv(lhs.C, rhs.C); return }
859 func ConstURem(lhs, rhs Value) (v Value) { v.C = C.LLVMConstURem(lhs.C, rhs.C); return }
860 func ConstSRem(lhs, rhs Value) (v Value) { v.C = C.LLVMConstSRem(lhs.C, rhs.C); return }
861 func ConstFRem(lhs, rhs Value) (v Value) { v.C = C.LLVMConstFRem(lhs.C, rhs.C); return }
862 func ConstAnd(lhs, rhs Value) (v Value) { v.C = C.LLVMConstAnd(lhs.C, rhs.C); return }
863 func ConstOr(lhs, rhs Value) (v Value) { v.C = C.LLVMConstOr(lhs.C, rhs.C); return }
864 func ConstXor(lhs, rhs Value) (v Value) { v.C = C.LLVMConstXor(lhs.C, rhs.C); return }
866 func ConstICmp(pred IntPredicate, lhs, rhs Value) (v Value) {
870 func ConstFCmp(pred FloatPredicate, lhs, rhs Value) (v Value) {
875 func ConstShl(lhs, rhs Value) (v Value) { v.C = C.LLVMConstShl(lhs.C, rhs.C); return }
876 func ConstLShr(lhs, rhs Value) (v Value) { v.C = C.LLVMConstLShr(lhs.C, rhs.C); return }
877 func ConstAShr(lhs, rhs Value) (v Value) { v.C = C.LLVMConstAShr(lhs.C, rhs.C); return }
879 func ConstGEP(v Value, indices []Value) (rv Value) {
884 func ConstInBoundsGEP(v Value, indices []Value) (rv Value) {
889 func ConstTrunc(v Value, t Type) (rv Value) { rv.C = C.LLVMConstTrunc(v.C, t.C); return }
890 func ConstSExt(v Value, t Type) (rv Value) { rv.C = C.LLVMConstSExt(v.C, t.C); return }
891 func ConstZExt(v Value, t Type) (rv Value) { rv.C = C.LLVMConstZExt(v.C, t.C); return }
892 func ConstFPTrunc(v Value, t Type) (rv Value) { rv.C = C.LLVMConstFPTrunc(v.C, t.C); return }
893 func ConstFPExt(v Value, t Type) (rv Value) { rv.C = C.LLVMConstFPExt(v.C, t.C); return }
894 func ConstUIToFP(v Value, t Type) (rv Value) { rv.C = C.LLVMConstUIToFP(v.C, t.C); return }
895 func ConstSIToFP(v Value, t Type) (rv Value) { rv.C = C.LLVMConstSIToFP(v.C, t.C); return }
896 func ConstFPToUI(v Value, t Type) (rv Value) { rv.C = C.LLVMConstFPToUI(v.C, t.C); return }
897 func ConstFPToSI(v Value, t Type) (rv Value) { rv.C = C.LLVMConstFPToSI(v.C, t.C); return }
898 func ConstPtrToInt(v Value, t Type) (rv Value) { rv.C = C.LLVMConstPtrToInt(v.C, t.C); return }
899 func ConstIntToPtr(v Value, t Type) (rv Value) { rv.C = C.LLVMConstIntToPtr(v.C, t.C); return }
900 func ConstBitCast(v Value, t Type) (rv Value) { rv.C = C.LLVMConstBitCast(v.C, t.C); return }
901 func ConstZExtOrBitCast(v Value, t Type) (rv Value) { rv.C = C.LLVMConstZExtOrBitCast(v.C, t.C); return }
902 func ConstSExtOrBitCast(v Value, t Type) (rv Value) { rv.C = C.LLVMConstSExtOrBitCast(v.C, t.C); return }
903 func ConstTruncOrBitCast(v Value, t Type) (rv Value) {
907 func ConstPointerCast(v Value, t Type) (rv Value) { rv.C = C.LLVMConstPointerCast(v.C, t.C); return }
908 func ConstIntCast(v Value, t Type, signed bool) (rv Value) {
912 func ConstFPCast(v Value, t Type) (rv Value) { rv.C = C.LLVMConstFPCast(v.C, t.C); return }
913 func ConstSelect(cond, iftrue, iffalse Value) (rv Value) {
917 func ConstExtractElement(vec, i Value) (rv Value) {
921 func ConstInsertElement(vec, elem, i Value) (rv Value) {
925 func ConstShuffleVector(veca, vecb, mask Value) (rv Value) {
934 func ConstExtractValue(agg Value, indices []uint32) (rv Value) {
944 func ConstInsertValue(agg, val Value, indices []uint32) (rv Value) {
954 func BlockAddress(f Value, bb BasicBlock) (v Value) {
960 func (v Value) GlobalParent() (m Module) { m.C = C.LLVMGetGlobalParent(v.C); return }
961 func (v Value) IsDeclaration() bool { return C.LLVMIsDeclaration(v.C) != 0 }
962 func (v Value) Linkage() Linkage { return Linkage(C.LLVMGetLinkage(v.C)) }
963 func (v Value) SetLinkage(l Linkage) { C.LLVMSetLinkage(v.C, C.LLVMLinkage(l)) }
964 func (v Value) Section() string { return C.GoString(C.LLVMGetSection(v.C)) }
965 func (v Value) SetSection(str string) {
970 func (v Value) Visibility() Visibility { return Visibility(C.LLVMGetVisibility(v.C)) }
971 func (v Value) SetVisibility(vi Visibility) { C.LLVMSetVisibility(v.C, C.LLVMVisibility(vi)) }
972 func (v Value) Alignment() int { return int(C.LLVMGetAlignment(v.C)) }
973 func (v Value) SetAlignment(a int) { C.LLVMSetAlignment(v.C, C.unsigned(a)) }
974 func (v Value) SetUnnamedAddr(ua bool) { C.LLVMSetUnnamedAddr(v.C, boolToLLVMBool(ua)) }
977 func AddGlobal(m Module, t Type, name string) (v Value) {
983 func AddGlobalInAddressSpace(m Module, t Type, name string, addressSpace int) (v Value) {
989 func (m Module) NamedGlobal(name string) (v Value) {
996 func (m Module) FirstGlobal() (v Value) { v.C = C.LLVMGetFirstGlobal(m.C); return }
997 func (m Module) LastGlobal() (v Value) { v.C = C.LLVMGetLastGlobal(m.C); return }
998 func NextGlobal(v Value) (rv Value) { rv.C = C.LLVMGetNextGlobal(v.C); return }
999 func PrevGlobal(v Value) (rv Value) { rv.C = C.LLVMGetPreviousGlobal(v.C); return }
1000 func (v Value) EraseFromParentAsGlobal() { C.LLVMDeleteGlobal(v.C) }
1001 func (v Value) Initializer() (rv Value) { rv.C = C.LLVMGetInitializer(v.C); return }
1002 func (v Value) SetInitializer(cv Value) { C.LLVMSetInitializer(v.C, cv.C) }
1003 func (v Value) IsThreadLocal() bool { return C.LLVMIsThreadLocal(v.C) != 0 }
1004 func (v Value) SetThreadLocal(tl bool) { C.LLVMSetThreadLocal(v.C, boolToLLVMBool(tl)) }
1005 func (v Value) IsGlobalConstant() bool { return C.LLVMIsGlobalConstant(v.C) != 0 }
1006 func (v Value) SetGlobalConstant(gc bool) { C.LLVMSetGlobalConstant(v.C, boolToLLVMBool(gc)) }
1009 func AddAlias(m Module, t Type, aliasee Value, name string) (v Value) {
1017 func AddFunction(m Module, name string, ft Type) (v Value) {
1024 func (m Module) NamedFunction(name string) (v Value) {
1031 func (m Module) FirstFunction() (v Value) { v.C = C.LLVMGetFirstFunction(m.C); return }
1032 func (m Module) LastFunction() (v Value) { v.C = C.LLVMGetLastFunction(m.C); return }
1033 func NextFunction(v Value) (rv Value) { rv.C = C.LLVMGetNextFunction(v.C); return }
1034 func PrevFunction(v Value) (rv Value) { rv.C = C.LLVMGetPreviousFunction(v.C); return }
1035 func (v Value) EraseFromParentAsFunction() { C.LLVMDeleteFunction(v.C) }
1036 func (v Value) IntrinsicID() int { return int(C.LLVMGetIntrinsicID(v.C)) }
1037 func (v Value) FunctionCallConv() CallConv {
1040 func (v Value) SetFunctionCallConv(cc CallConv) { C.LLVMSetFunctionCallConv(v.C, C.unsigned(cc)) }
1041 func (v Value) GC() string { return C.GoString(C.LLVMGetGC(v.C)) }
1042 func (v Value) SetGC(name string) {
1047 func (v Value) AddFunctionAttr(a Attribute) { C.LLVMAddFunctionAttr2(v.C, C.uint64_t(a)) }
1048 func (v Value) FunctionAttr() Attribute { return Attribute(C.LLVMGetFunctionAttr2(v.C)) }
1049 func (v Value) RemoveFunctionAttr(a Attribute) { C.LLVMRemoveFunctionAttr2(v.C, C.uint64_t(a)) }
1050 func (v Value) AddTargetDependentFunctionAttr(attr, value string) {
1053 cvalue := C.CString(value)
1057 func (v Value) SetPersonality(p Value) {
1060 func (v Value) SetSubprogram(sp Metadata) {
1065 func (v Value) ParamsCount() int { return int(C.LLVMCountParams(v.C)) }
1066 func (v Value) Params() []Value {
1067 out := make([]Value, v.ParamsCount())
1073 func (v Value) Param(i int) (rv Value) { rv.C = C.LLVMGetParam(v.C, C.unsigned(i)); return }
1074 func (v Value) ParamParent() (rv Value) { rv.C = C.LLVMGetParamParent(v.C); return }
1075 func (v Value) FirstParam() (rv Value) { rv.C = C.LLVMGetFirstParam(v.C); return }
1076 func (v Value) LastParam() (rv Value) { rv.C = C.LLVMGetLastParam(v.C); return }
1077 func NextParam(v Value) (rv Value) { rv.C = C.LLVMGetNextParam(v.C); return }
1078 func PrevParam(v Value) (rv Value) { rv.C = C.LLVMGetPreviousParam(v.C); return }
1079 func (v Value) AddAttribute(a Attribute) {
1081 panic("attribute value currently unsupported")
1085 func (v Value) RemoveAttribute(a Attribute) {
1087 panic("attribute value currently unsupported")
1091 func (v Value) Attribute() Attribute { return Attribute(C.LLVMGetAttribute(v.C)) }
1092 func (v Value) SetParamAlignment(align int) { C.LLVMSetParamAlignment(v.C, C.unsigned(align)) }
1095 func (bb BasicBlock) AsValue() (v Value) { v.C = C.LLVMBasicBlockAsValue(bb.C); return }
1096 func (v Value) IsBasicBlock() bool { return C.LLVMValueIsBasicBlock(v.C) != 0 }
1097 func (v Value) AsBasicBlock() (bb BasicBlock) { bb.C = C.LLVMValueAsBasicBlock(v.C); return }
1098 func (bb BasicBlock) Parent() (v Value) { v.C = C.LLVMGetBasicBlockParent(bb.C); return }
1099 func (v Value) BasicBlocksCount() int { return int(C.LLVMCountBasicBlocks(v.C)) }
1100 func (v Value) BasicBlocks() []BasicBlock {
1105 func (v Value) FirstBasicBlock() (bb BasicBlock) { bb.C = C.LLVMGetFirstBasicBlock(v.C); return }
1106 func (v Value) LastBasicBlock() (bb BasicBlock) { bb.C = C.LLVMGetLastBasicBlock(v.C); return }
1109 func (v Value) EntryBasicBlock() (bb BasicBlock) { bb.C = C.LLVMGetEntryBasicBlock(v.C); return }
1110 func (c Context) AddBasicBlock(f Value, name string) (bb BasicBlock) {
1122 func AddBasicBlock(f Value, name string) (bb BasicBlock) {
1139 func (v Value) InstructionParent() (bb BasicBlock) { bb.C = C.LLVMGetInstructionParent(v.C); return }
1140 func (bb BasicBlock) FirstInstruction() (v Value) { v.C = C.LLVMGetFirstInstruction(bb.C); return }
1141 func (bb BasicBlock) LastInstruction() (v Value) { v.C = C.LLVMGetLastInstruction(bb.C); return }
1142 func NextInstruction(v Value) (rv Value) { rv.C = C.LLVMGetNextInstruction(v.C); return }
1143 func PrevInstruction(v Value) (rv Value) { rv.C = C.LLVMGetPreviousInstruction(v.C); return }
1146 func (v Value) SetInstructionCallConv(cc CallConv) {
1149 func (v Value) InstructionCallConv() CallConv {
1152 func (v Value) AddInstrAttribute(i int, a Attribute) {
1154 panic("attribute value currently unsupported")
1158 func (v Value) RemoveInstrAttribute(i int, a Attribute) {
1160 panic("attribute value currently unsupported")
1164 func (v Value) SetInstrParamAlignment(i int, align int) {
1169 func (v Value) IsTailCall() bool { return C.LLVMIsTailCall(v.C) != 0 }
1170 func (v Value) SetTailCall(is bool) { C.LLVMSetTailCall(v.C, boolToLLVMBool(is)) }
1173 func (v Value) AddIncoming(vals []Value, blocks []BasicBlock) {
1177 func (v Value) IncomingCount() int { return int(C.LLVMCountIncoming(v.C)) }
1178 func (v Value) IncomingValue(i int) (rv Value) {
1182 func (v Value) IncomingBlock(i int) (bb BasicBlock) {
1196 func (b Builder) SetInsertPoint(block BasicBlock, instr Value) {
1199 func (b Builder) SetInsertPointBefore(instr Value) { C.LLVMPositionBuilderBefore(b.C, instr.C) }
1203 func (b Builder) Insert(instr Value) { C.LLVMInsertIntoBuilder(b.C, instr.C) }
1204 func (b Builder) InsertWithName(instr Value, name string) {
1215 func (b Builder) SetInstDebugLocation(v Value) { C.LLVMSetInstDebugLocation(b.C, v.C) }
1216 func (b Builder) InsertDeclare(module Module, storage Value, md Value) Value {
1222 return b.CreateCall(f, []Value{storage, md}, "")
1226 func (b Builder) CreateRetVoid() (rv Value) { rv.C = C.LLVMBuildRetVoid(b.C); return }
1227 func (b Builder) CreateRet(v Value) (rv Value) { rv.C = C.LLVMBuildRet(b.C, v.C); return }
1228 func (b Builder) CreateAggregateRet(vs []Value) (rv Value) {
1233 func (b Builder) CreateBr(bb BasicBlock) (rv Value) { rv.C = C.LLVMBuildBr(b.C, bb.C); return }
1234 func (b Builder) CreateCondBr(ifv Value, thenb, elseb BasicBlock) (rv Value) {
1238 func (b Builder) CreateSwitch(v Value, elseb BasicBlock, numCases int) (rv Value) {
1242 func (b Builder) CreateIndirectBr(addr Value, numDests int) (rv Value) {
1246 func (b Builder) CreateInvoke(fn Value, args []Value, then, catch BasicBlock, name string) (rv Value) {
1253 func (b Builder) CreateUnreachable() (rv Value) { rv.C = C.LLVMBuildUnreachable(b.C); return }
1256 func (v Value) AddCase(on Value, dest BasicBlock) { C.LLVMAddCase(v.C, on.C, dest.C) }
1259 func (v Value) AddDest(dest BasicBlock) { C.LLVMAddDestination(v.C, dest.C) }
1262 func (b Builder) CreateAdd(lhs, rhs Value, name string) (v Value) {
1268 func (b Builder) CreateNSWAdd(lhs, rhs Value, name string) (v Value) {
1274 func (b Builder) CreateNUWAdd(lhs, rhs Value, name string) (v Value) {
1280 func (b Builder) CreateFAdd(lhs, rhs Value, name string) (v Value) {
1286 func (b Builder) CreateSub(lhs, rhs Value, name string) (v Value) {
1292 func (b Builder) CreateNSWSub(lhs, rhs Value, name string) (v Value) {
1298 func (b Builder) CreateNUWSub(lhs, rhs Value, name string) (v Value) {
1304 func (b Builder) CreateFSub(lhs, rhs Value, name string) (v Value) {
1310 func (b Builder) CreateMul(lhs, rhs Value, name string) (v Value) {
1316 func (b Builder) CreateNSWMul(lhs, rhs Value, name string) (v Value) {
1322 func (b Builder) CreateNUWMul(lhs, rhs Value, name string) (v Value) {
1328 func (b Builder) CreateFMul(lhs, rhs Value, name string) (v Value) {
1334 func (b Builder) CreateUDiv(lhs, rhs Value, name string) (v Value) {
1340 func (b Builder) CreateSDiv(lhs, rhs Value, name string) (v Value) {
1346 func (b Builder) CreateExactSDiv(lhs, rhs Value, name string) (v Value) {
1352 func (b Builder) CreateFDiv(lhs, rhs Value, name string) (v Value) {
1358 func (b Builder) CreateURem(lhs, rhs Value, name string) (v Value) {
1364 func (b Builder) CreateSRem(lhs, rhs Value, name string) (v Value) {
1370 func (b Builder) CreateFRem(lhs, rhs Value, name string) (v Value) {
1376 func (b Builder) CreateShl(lhs, rhs Value, name string) (v Value) {
1382 func (b Builder) CreateLShr(lhs, rhs Value, name string) (v Value) {
1388 func (b Builder) CreateAShr(lhs, rhs Value, name string) (v Value) {
1394 func (b Builder) CreateAnd(lhs, rhs Value, name string) (v Value) {
1400 func (b Builder) CreateOr(lhs, rhs Value, name string) (v Value) {
1406 func (b Builder) CreateXor(lhs, rhs Value, name string) (v Value) {
1412 func (b Builder) CreateBinOp(op Opcode, lhs, rhs Value, name string) (v Value) {
1418 func (b Builder) CreateNeg(v Value, name string) (rv Value) {
1424 func (b Builder) CreateNSWNeg(v Value, name string) (rv Value) {
1430 func (b Builder) CreateNUWNeg(v Value, name string) (rv Value) {
1436 func (b Builder) CreateFNeg(v Value, name string) (rv Value) {
1442 func (b Builder) CreateNot(v Value, name string) (rv Value) {
1451 func (b Builder) CreateMalloc(t Type, name string) (v Value) {
1457 func (b Builder) CreateArrayMalloc(t Type, val Value, name string) (v Value) {
1463 func (b Builder) CreateAlloca(t Type, name string) (v Value) {
1469 func (b Builder) CreateArrayAlloca(t Type, val Value, name string) (v Value) {
1475 func (b Builder) CreateFree(p Value) (v Value) {
1479 func (b Builder) CreateLoad(p Value, name string) (v Value) {
1485 func (b Builder) CreateStore(val Value, p Value) (v Value) {
1489 func (b Builder) CreateGEP(p Value, indices []Value, name string) (v Value) {
1496 func (b Builder) CreateInBoundsGEP(p Value, indices []Value, name string) (v Value) {
1503 func (b Builder) CreateStructGEP(p Value, i int, name string) (v Value) {
1509 func (b Builder) CreateGlobalString(str, name string) (v Value) {
1517 func (b Builder) CreateGlobalStringPtr(str, name string) (v Value) {
1527 func (b Builder) CreateTrunc(val Value, t Type, name string) (v Value) {
1533 func (b Builder) CreateZExt(val Value, t Type, name string) (v Value) {
1539 func (b Builder) CreateSExt(val Value, t Type, name string) (v Value) {
1545 func (b Builder) CreateFPToUI(val Value, t Type, name string) (v Value) {
1551 func (b Builder) CreateFPToSI(val Value, t Type, name string) (v Value) {
1557 func (b Builder) CreateUIToFP(val Value, t Type, name string) (v Value) {
1563 func (b Builder) CreateSIToFP(val Value, t Type, name string) (v Value) {
1569 func (b Builder) CreateFPTrunc(val Value, t Type, name string) (v Value) {
1575 func (b Builder) CreateFPExt(val Value, t Type, name string) (v Value) {
1581 func (b Builder) CreatePtrToInt(val Value, t Type, name string) (v Value) {
1587 func (b Builder) CreateIntToPtr(val Value, t Type, name string) (v Value) {
1593 func (b Builder) CreateBitCast(val Value, t Type, name string) (v Value) {
1599 func (b Builder) CreateZExtOrBitCast(val Value, t Type, name string) (v Value) {
1605 func (b Builder) CreateSExtOrBitCast(val Value, t Type, name string) (v Value) {
1611 func (b Builder) CreateTruncOrBitCast(val Value, t Type, name string) (v Value) {
1617 func (b Builder) CreateCast(val Value, op Opcode, t Type, name string) (v Value) {
1623 func (b Builder) CreatePointerCast(val Value, t Type, name string) (v Value) {
1629 func (b Builder) CreateIntCast(val Value, t Type, name string) (v Value) {
1635 func (b Builder) CreateFPCast(val Value, t Type, name string) (v Value) {
1643 func (b Builder) CreateICmp(pred IntPredicate, lhs, rhs Value, name string) (v Value) {
1649 func (b Builder) CreateFCmp(pred FloatPredicate, lhs, rhs Value, name string) (v Value) {
1657 func (b Builder) CreatePHI(t Type, name string) (v Value) {
1663 func (b Builder) CreateCall(fn Value, args []ValueValue) {
1671 func (b Builder) CreateSelect(ifv, thenv, elsev Value, name string) (v Value) {
1678 func (b Builder) CreateVAArg(list Value, t Type, name string) (v Value) {
1684 func (b Builder) CreateExtractElement(vec, i Value, name string) (v Value) {
1690 func (b Builder) CreateInsertElement(vec, elt, i Value, name string) (v Value) {
1696 func (b Builder) CreateShuffleVector(v1, v2, mask Value, name string) (v Value) {
1702 func (b Builder) CreateExtractValue(agg Value, i int, name string) (v Value) {
1708 func (b Builder) CreateInsertValue(agg, elt Value, i int, name string) (v Value) {
1715 func (b Builder) CreateIsNull(val Value, name string) (v Value) {
1721 func (b Builder) CreateIsNotNull(val Value, name string) (v Value) {
1727 func (b Builder) CreatePtrDiff(lhs, rhs Value, name string) (v Value) {
1734 func (b Builder) CreateLandingPad(t Type, nclauses int, name string) (l Value) {
1741 func (l Value) AddClause(v Value) {
1745 func (l Value) SetCleanup(cleanup bool) {
1749 func (b Builder) CreateResume(ex Value) (v Value) {
1836 func (pm PassManager) RunFunc(f Value) bool { return C.LLVMRunFunctionPassManager(pm.C, f.C) != 0 }