示例#1
0
        public static LLVMValueRef ConstArray(LLVMTypeRef ElementTy, LLVMValueRef[] ConstantVals)
        {
            if (ConstantVals.Length == 0)
            {
                LLVMValueRef dummy;
                return ConstArray(ElementTy, out dummy, 0);
            }

            return ConstArray(ElementTy, out ConstantVals[0], (uint)ConstantVals.Length);
        }
示例#2
0
 public static extern LLVMTypeRef StructType(out LLVMTypeRef @ElementTypes, uint @ElementCount, LLVMBool @Packed);
示例#3
0
 public static extern ulong StoreSizeOfType(LLVMTargetDataRef @TD, LLVMTypeRef @Ty);
示例#4
0
 public static extern LLVMValueRef SizeOf(LLVMTypeRef @Ty);
示例#5
0
 public static extern uint PreferredAlignmentOfType(LLVMTargetDataRef @TD, LLVMTypeRef @Ty);
示例#6
0
 public static extern ulong OffsetOfElement(LLVMTargetDataRef @TD, LLVMTypeRef @StructTy, uint @Element);
示例#7
0
 public LLVMValueRef CreateVAArg(LLVMValueRef @List, LLVMTypeRef @Ty, string @Name)
 {
     return(LLVM.BuildVAArg(this.instance, @List, @Ty, @Name));
 }
示例#8
0
        public static LLVMTypeRef[] GetParamTypes(LLVMTypeRef FunctionTy)
        {
            uint count = CountParamTypes(FunctionTy);
            var buffer = new LLVMTypeRef[count];

            if (count > 0)
            {
                GetParamTypes(FunctionTy, out buffer[0]);
            }

            return buffer;
        }
示例#9
0
 public LLVMValueRef CreateFPCast(LLVMValueRef @Val, LLVMTypeRef @DestTy, string @Name)
 {
     return(LLVM.BuildFPCast(this.instance, @Val, @DestTy, @Name));
 }
示例#10
0
 public LLVMValueRef CreatePhi(LLVMTypeRef @Ty, string @Name)
 {
     return(LLVM.BuildPhi(this.instance, @Ty, @Name));
 }
示例#11
0
 public LLVMValueRef CreateIntToPtr(LLVMValueRef @Val, LLVMTypeRef @DestTy, string @Name)
 {
     return(LLVM.BuildIntToPtr(this.instance, @Val, @DestTy, @Name));
 }
示例#12
0
 public LLVMValueRef CreateArrayAlloca(LLVMTypeRef @Ty, LLVMValueRef @Val, string @Name)
 {
     return(LLVM.BuildArrayAlloca(this.instance, @Ty, @Val, @Name));
 }
示例#13
0
 public LLVMValueRef CreateLandingPad(LLVMTypeRef @Ty, LLVMValueRef @PersFn, uint @NumClauses, string @Name)
 {
     return(LLVM.BuildLandingPad(this.instance, @Ty, @PersFn, @NumClauses, @Name));
 }
示例#14
0
 public static extern LLVMBool TypeIsSized(LLVMTypeRef @Ty);
示例#15
0
 internal FunctionType(LLVMTypeRef handle) : base(handle, LLVMTypeKind.LLVMFunctionTypeKind)
 {
 }
示例#16
0
        public static LLVMValueRef ConstNamedStruct(LLVMTypeRef StructTy, LLVMValueRef[] ConstantVals)
        {
            if (ConstantVals.Length == 0)
            {
                LLVMValueRef dummy;
                return ConstNamedStruct(StructTy, out dummy, 0);
            }

            return ConstNamedStruct(StructTy, out ConstantVals[0], (uint)ConstantVals.Length);
        }
示例#17
0
 internal static Type Create(LLVMTypeRef handle) => handle.Kind switch
 {
示例#18
0
        public static void StructSetBody(LLVMTypeRef StructTy, LLVMTypeRef[] ElementTypes, bool Packed)
        {
            if (ElementTypes.Length == 0)
            {
                LLVMTypeRef dummy;
                StructSetBody(StructTy, out dummy, 0, Packed);
                return;
            }

            StructSetBody(StructTy, out ElementTypes[0], (uint)ElementTypes.Length, Packed);
        }
示例#19
0
文件: Type.cs 项目: MasterQ32/psi
 public BuiltinType(string name, LLVMSharp.LLVMTypeRef llvmType)
 {
     this.Name     = name;
     this.LLVMType = llvmType;
 }
示例#20
0
 internal Type GetOrCreate(LLVMTypeRef handle) => GetOrCreate <Type>(handle);
示例#21
0
 public static extern LLVMTypeRef GetReturnType(LLVMTypeRef @FunctionTy);
示例#22
0
 public static extern LLVMTypeRef PointerType(LLVMTypeRef @ElementType, uint @AddressSpace);
示例#23
0
 public static extern void GetStructElementTypes(LLVMTypeRef @StructTy, out LLVMTypeRef @Dest);
示例#24
0
 public static extern IntPtr PrintTypeToString(LLVMTypeRef @Val);
示例#25
0
 public static extern string GetStructName(LLVMTypeRef @Ty);
示例#26
0
 public static extern ulong SizeOfTypeInBits(LLVMTargetDataRef @TD, LLVMTypeRef @Ty);
示例#27
0
 public static extern LLVMContextRef GetTypeContext(LLVMTypeRef @Ty);
示例#28
0
 public static extern void StructSetBody(LLVMTypeRef @StructTy, out LLVMTypeRef @ElementTypes, uint @ElementCount, LLVMBool @Packed);
示例#29
0
 public static extern LLVMTypeKind GetTypeKind(LLVMTypeRef @Ty);
示例#30
0
 public static extern LLVMTypeRef StructTypeInContext(LLVMContextRef @C, out LLVMTypeRef @ElementTypes, uint @ElementCount, LLVMBool @Packed);
示例#31
0
 public static extern LLVMValueRef GetUndef(LLVMTypeRef @Ty);
示例#32
0
 public static extern LLVMTypeRef VectorType(LLVMTypeRef @ElementType, uint @ElementCount);
示例#33
0
 public static extern uint GetVectorSize(LLVMTypeRef @VectorTy);
示例#34
0
        public static LLVMTypeRef FunctionType(LLVMTypeRef ReturnType, LLVMTypeRef[] ParamTypes, bool IsVarArg)
        {
            if (ParamTypes.Length == 0)
            {
                LLVMTypeRef dummy;
                return FunctionType(ReturnType, out dummy, 0, IsVarArg);
            }

            return FunctionType(ReturnType, out ParamTypes[0], (uint)ParamTypes.Length, IsVarArg);
        }
示例#35
0
 public static extern LLVMBool IsFunctionVarArg(LLVMTypeRef @FunctionTy);
示例#36
0
        public static LLVMTypeRef[] GetStructElementTypes(LLVMTypeRef StructTy)
        {
            uint count = CountStructElementTypes(StructTy);
            var buffer = new LLVMTypeRef[count];

            if (count > 0)
            {
                GetStructElementTypes(StructTy, out buffer[0]);
            }

            return buffer;
        }
示例#37
0
 public static extern LLVMBool IsOpaqueStruct(LLVMTypeRef @StructTy);
示例#38
0
        public static LLVMTypeRef StructTypeInContext(LLVMContextRef C, LLVMTypeRef[] ElementTypes, bool Packed)
        {
            if (ElementTypes.Length == 0)
            {
                LLVMTypeRef dummy;
                return StructTypeInContext(C, out dummy, 0, Packed);
            }

            return StructTypeInContext(C, out ElementTypes[0], (uint)ElementTypes.Length, Packed);
        }
示例#39
0
 public static extern LLVMBool IsPackedStruct(LLVMTypeRef @StructTy);
示例#40
0
 public LLVMTypeRef StructTypeInContext(LLVMTypeRef[] @ElementTypes, bool @Packed)
 {
     return LLVM.StructTypeInContext(this, @ElementTypes, @Packed);
 }
示例#41
0
 internal ArrayType(LLVMTypeRef handle) : base(handle, LLVMTypeKind.LLVMArrayTypeKind)
 {
 }