Ejemplo n.º 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);
        }
Ejemplo n.º 2
0
 public static extern LLVMTypeRef StructType(out LLVMTypeRef @ElementTypes, uint @ElementCount, LLVMBool @Packed);
Ejemplo n.º 3
0
 public static extern ulong StoreSizeOfType(LLVMTargetDataRef @TD, LLVMTypeRef @Ty);
Ejemplo n.º 4
0
 public static extern LLVMValueRef SizeOf(LLVMTypeRef @Ty);
Ejemplo n.º 5
0
 public static extern uint PreferredAlignmentOfType(LLVMTargetDataRef @TD, LLVMTypeRef @Ty);
Ejemplo n.º 6
0
 public static extern ulong OffsetOfElement(LLVMTargetDataRef @TD, LLVMTypeRef @StructTy, uint @Element);
Ejemplo n.º 7
0
 public LLVMValueRef CreateVAArg(LLVMValueRef @List, LLVMTypeRef @Ty, string @Name)
 {
     return(LLVM.BuildVAArg(this.instance, @List, @Ty, @Name));
 }
Ejemplo n.º 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;
        }
Ejemplo n.º 9
0
 public LLVMValueRef CreateFPCast(LLVMValueRef @Val, LLVMTypeRef @DestTy, string @Name)
 {
     return(LLVM.BuildFPCast(this.instance, @Val, @DestTy, @Name));
 }
Ejemplo n.º 10
0
 public LLVMValueRef CreatePhi(LLVMTypeRef @Ty, string @Name)
 {
     return(LLVM.BuildPhi(this.instance, @Ty, @Name));
 }
Ejemplo n.º 11
0
 public LLVMValueRef CreateIntToPtr(LLVMValueRef @Val, LLVMTypeRef @DestTy, string @Name)
 {
     return(LLVM.BuildIntToPtr(this.instance, @Val, @DestTy, @Name));
 }
Ejemplo n.º 12
0
 public LLVMValueRef CreateArrayAlloca(LLVMTypeRef @Ty, LLVMValueRef @Val, string @Name)
 {
     return(LLVM.BuildArrayAlloca(this.instance, @Ty, @Val, @Name));
 }
Ejemplo n.º 13
0
 public LLVMValueRef CreateLandingPad(LLVMTypeRef @Ty, LLVMValueRef @PersFn, uint @NumClauses, string @Name)
 {
     return(LLVM.BuildLandingPad(this.instance, @Ty, @PersFn, @NumClauses, @Name));
 }
Ejemplo n.º 14
0
 public static extern LLVMBool TypeIsSized(LLVMTypeRef @Ty);
Ejemplo n.º 15
0
 internal FunctionType(LLVMTypeRef handle) : base(handle, LLVMTypeKind.LLVMFunctionTypeKind)
 {
 }
Ejemplo n.º 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);
        }
Ejemplo n.º 17
0
 internal static Type Create(LLVMTypeRef handle) => handle.Kind switch
 {
Ejemplo n.º 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);
        }
Ejemplo n.º 19
0
 public BuiltinType(string name, LLVMSharp.LLVMTypeRef llvmType)
 {
     this.Name     = name;
     this.LLVMType = llvmType;
 }
Ejemplo n.º 20
0
 internal Type GetOrCreate(LLVMTypeRef handle) => GetOrCreate <Type>(handle);
Ejemplo n.º 21
0
 public static extern LLVMTypeRef GetReturnType(LLVMTypeRef @FunctionTy);
Ejemplo n.º 22
0
 public static extern LLVMTypeRef PointerType(LLVMTypeRef @ElementType, uint @AddressSpace);
Ejemplo n.º 23
0
 public static extern void GetStructElementTypes(LLVMTypeRef @StructTy, out LLVMTypeRef @Dest);
Ejemplo n.º 24
0
 public static extern IntPtr PrintTypeToString(LLVMTypeRef @Val);
Ejemplo n.º 25
0
 public static extern string GetStructName(LLVMTypeRef @Ty);
Ejemplo n.º 26
0
 public static extern ulong SizeOfTypeInBits(LLVMTargetDataRef @TD, LLVMTypeRef @Ty);
Ejemplo n.º 27
0
 public static extern LLVMContextRef GetTypeContext(LLVMTypeRef @Ty);
Ejemplo n.º 28
0
 public static extern void StructSetBody(LLVMTypeRef @StructTy, out LLVMTypeRef @ElementTypes, uint @ElementCount, LLVMBool @Packed);
Ejemplo n.º 29
0
 public static extern LLVMTypeKind GetTypeKind(LLVMTypeRef @Ty);
Ejemplo n.º 30
0
 public static extern LLVMTypeRef StructTypeInContext(LLVMContextRef @C, out LLVMTypeRef @ElementTypes, uint @ElementCount, LLVMBool @Packed);
Ejemplo n.º 31
0
 public static extern LLVMValueRef GetUndef(LLVMTypeRef @Ty);
Ejemplo n.º 32
0
 public static extern LLVMTypeRef VectorType(LLVMTypeRef @ElementType, uint @ElementCount);
Ejemplo n.º 33
0
 public static extern uint GetVectorSize(LLVMTypeRef @VectorTy);
Ejemplo n.º 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);
        }
Ejemplo n.º 35
0
 public static extern LLVMBool IsFunctionVarArg(LLVMTypeRef @FunctionTy);
Ejemplo n.º 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;
        }
Ejemplo n.º 37
0
 public static extern LLVMBool IsOpaqueStruct(LLVMTypeRef @StructTy);
Ejemplo n.º 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);
        }
Ejemplo n.º 39
0
 public static extern LLVMBool IsPackedStruct(LLVMTypeRef @StructTy);
Ejemplo n.º 40
0
 public LLVMTypeRef StructTypeInContext(LLVMTypeRef[] @ElementTypes, bool @Packed)
 {
     return LLVM.StructTypeInContext(this, @ElementTypes, @Packed);
 }
Ejemplo n.º 41
0
 internal ArrayType(LLVMTypeRef handle) : base(handle, LLVMTypeKind.LLVMArrayTypeKind)
 {
 }