Example #1
0
 public void Initiate()
 {
     ClassSkeletons = new Dictionary<string, LLVMTypeRef>();
     Context = LLVM.ContextCreate();
     Module = LLVM.ModuleCreateWithNameInContext("ADefaultModuleId", Context);
     Builder = LLVM.CreateBuilderInContext(Context);
 }
Example #2
0
 public ModCompiler(DetailLogger log, SymbolTableWalker walker,
     LLVMContextRef context, LLVMModuleRef module, LLVMBuilderRef builder)
 {
     this.log = log;
     this.walker = walker;
     this.context = context;
     this.module = module;
     this.builder = builder;
 }
Example #3
0
        public static LLVMValueRef BuildCall(LLVMBuilderRef param0, LLVMValueRef Fn, LLVMValueRef[] Args, string Name)
        {
            if (Args.Length == 0)
            {
                LLVMValueRef dummy;
                return BuildCall(param0, Fn, out dummy, 0, Name);
            }

            return BuildCall(param0, Fn, out Args[0], (uint)Args.Length, Name);
        }
Example #4
0
        public static LLVMValueRef BuildInvoke(LLVMBuilderRef param0, LLVMValueRef Fn, LLVMValueRef[] Args, LLVMBasicBlockRef Then, LLVMBasicBlockRef Catch, string Name)
        {
            if (Args.Length == 0)
            {
                LLVMValueRef dummy;
                return BuildInvoke(param0, Fn, out dummy, 0, Then, Catch, Name);
            }

            return BuildInvoke(param0, Fn, out Args[0], (uint)Args.Length, Then, Catch, Name);
        }
Example #5
0
        public static LLVMValueRef BuildInBoundsGEP(LLVMBuilderRef B, LLVMValueRef Pointer, LLVMValueRef[] Indices, string Name)
        {
            if (Indices.Length == 0)
            {
                LLVMValueRef dummy;
                return BuildInBoundsGEP(B, Pointer, out dummy, 0, Name);
            }

            return BuildInBoundsGEP(B, Pointer, out Indices[0], (uint)Indices.Length, Name);
        }
Example #6
0
 public static extern void DisposeBuilder(LLVMBuilderRef @Builder);
Example #7
0
 public static extern LLVMValueRef BuildNUWNeg(LLVMBuilderRef @B, LLVMValueRef @V, [MarshalAs(UnmanagedType.LPStr)] string @Name);
Example #8
0
 public static LLVMValueRef BuildAggregateRet(LLVMBuilderRef param0, LLVMValueRef[] RetVals)
 {
     return BuildAggregateRet(param0, out RetVals[0], (uint)RetVals.Length);
 }
Example #9
0
 public static extern void SetInstDebugLocation(LLVMBuilderRef @Builder, LLVMValueRef @Inst);
Example #10
0
 public static extern void PositionBuilderBefore(LLVMBuilderRef @Builder, LLVMValueRef @Instr);
Example #11
0
 public static extern void PositionBuilder(LLVMBuilderRef @Builder, LLVMBasicBlockRef @Block, LLVMValueRef @Instr);
Example #12
0
 public static extern void InsertIntoBuilder(LLVMBuilderRef @Builder, LLVMValueRef @Instr);
Example #13
0
 public static extern LLVMValueRef BuildStructGEP(LLVMBuilderRef @B, LLVMValueRef @Pointer, uint @Idx, [MarshalAs(UnmanagedType.LPStr)] string @Name);
Example #14
0
 public static extern LLVMValueRef BuildStore(LLVMBuilderRef @param0, LLVMValueRef @Val, LLVMValueRef @Ptr);
Example #15
0
 public static extern LLVMValueRef BuildShuffleVector(LLVMBuilderRef @param0, LLVMValueRef @V1, LLVMValueRef @V2, LLVMValueRef @Mask, [MarshalAs(UnmanagedType.LPStr)] string @Name);
Example #16
0
 public static extern LLVMValueRef BuildSelect(LLVMBuilderRef @param0, LLVMValueRef @If, LLVMValueRef @Then, LLVMValueRef @Else, [MarshalAs(UnmanagedType.LPStr)] string @Name);
Example #17
0
 public static extern LLVMValueRef BuildRetVoid(LLVMBuilderRef @param0);
Example #18
0
 public static extern LLVMValueRef BuildRet(LLVMBuilderRef @param0, LLVMValueRef @V);
Example #19
0
 public static extern LLVMValueRef BuildResume(LLVMBuilderRef @B, LLVMValueRef @Exn);
Example #20
0
 public static extern LLVMValueRef GetCurrentDebugLocation(LLVMBuilderRef @Builder);
Example #21
0
 public static extern LLVMBasicBlockRef GetInsertBlock(LLVMBuilderRef @Builder);
Example #22
0
 public static extern LLVMValueRef BuildSwitch(LLVMBuilderRef @param0, LLVMValueRef @V, LLVMBasicBlockRef @Else, uint @NumCases);
Example #23
0
 public static extern void InsertIntoBuilderWithName(LLVMBuilderRef @Builder, LLVMValueRef @Instr, [MarshalAs(UnmanagedType.LPStr)] string @Name);
Example #24
0
 public static extern LLVMValueRef BuildUnreachable(LLVMBuilderRef @param0);
Example #25
0
 public static extern void PositionBuilderAtEnd(LLVMBuilderRef @Builder, LLVMBasicBlockRef @Block);
Example #26
0
 public static extern LLVMValueRef BuildVAArg(LLVMBuilderRef @param0, LLVMValueRef @List, LLVMTypeRef @Ty, [MarshalAs(UnmanagedType.LPStr)] string @Name);
Example #27
0
 public static extern void SetCurrentDebugLocation(LLVMBuilderRef @Builder, LLVMValueRef @L);
Example #28
0
 public static LLVMValueRef BuildAggregateRet(LLVMBuilderRef param0, LLVMValueRef[] RetVals)
 {
     return(BuildAggregateRet(param0, out RetVals[0], (uint)RetVals.Length));
 }
Example #29
0
 private protected IRBuilderBase(LLVMContext C)
 {
     Context = C;
     Handle  = LLVMBuilderRef.Create(C.Handle);
 }
Example #30
0
 public static extern void ClearInsertionPosition(LLVMBuilderRef @Builder);
Example #31
0
 public static extern LLVMValueRef BuildXor(LLVMBuilderRef @param0, LLVMValueRef @LHS, LLVMValueRef @RHS, [MarshalAs(UnmanagedType.LPStr)] string @Name);
Example #32
0
 public static extern void SetCurrentDebugLocation2(LLVMBuilderRef @Bref, uint @Line, uint @Col, LLVMMetadataRef @Scope, LLVMMetadataRef @InlinedAt);
Example #33
0
 public static extern LLVMValueRef BuildZExtOrBitCast(LLVMBuilderRef @param0, LLVMValueRef @Val, LLVMTypeRef @DestTy, [MarshalAs(UnmanagedType.LPStr)] string @Name);
Example #34
0
 public IRBuilder(LLVMContextRef context)
 {
     this.instance = LLVM.CreateBuilderInContext(context);
 }