示例#1
0
        public static Constant GetAnon(LLVMContext Ctx, ReadOnlySpan <Constant> V, bool Packed)
        {
            using var marshaledV = new MarshaledArray <Constant, LLVMValueRef>(V, (value) => value.Handle);
            var handle = Ctx.Handle.GetConstStruct(marshaledV, Packed);

            return(Ctx.GetOrCreate <Constant>(handle));
        }
示例#2
0
        public static StructType Create(LLVMContext Context, ReadOnlySpan <char> Name)
        {
            var handle = Context.Handle.CreateNamedStruct(Name);

            return(Context.GetOrCreate <StructType>(handle));
        }
示例#3
0
        public static Constant GetString(LLVMContext Context, ReadOnlySpan <char> Initializer, bool AddNull)
        {
            var handle = Context.Handle.GetConstString(Initializer, !AddNull);

            return(Context.GetOrCreate <Constant>(handle));
        }
示例#4
0
        public static Type GetLabelTy(LLVMContext C)
        {
            var handle = C.Handle.LabelType;

            return(C.GetOrCreate(handle));
        }
示例#5
0
        public static IntegerType GetInt64Ty(LLVMContext C)
        {
            var handle = C.Handle.Int64Type;

            return(C.GetOrCreate <IntegerType>(handle));
        }
示例#6
0
        public static Type GetBFloatTy(LLVMContext C)
        {
            var handle = C.Handle.BFloatType;

            return(C.GetOrCreate(handle));
        }
示例#7
0
        public static Type GetX86_MMXTy(LLVMContext C)
        {
            var handle = C.Handle.X86MMXType;

            return(C.GetOrCreate(handle));
        }
示例#8
0
        public static Type GetPPC_FP128Ty(LLVMContext C)
        {
            var handle = C.Handle.PPCFP128Type;

            return(C.GetOrCreate(handle));
        }