예제 #1
0
 public LLVMBasicBlockRef InsertBasicBlock(LLVMBasicBlockRef BB, string Name)
 {
     using (var marshaledName = new MarshaledString(Name))
     {
         return(LLVM.InsertBasicBlockInContext(this, BB, marshaledName));
     }
 }
예제 #2
0
        public static void AddIncoming(LLVMValueRef PhiNode, LLVMValueRef[] IncomingValues, LLVMBasicBlockRef[] IncomingBlocks, uint Count)
        {
            if (Count == 0)
            {
                return;
            }

            AddIncoming(PhiNode, out IncomingValues[0], out IncomingBlocks[0], Count);
        }
예제 #3
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);
        }
예제 #4
0
        public static LLVMBasicBlockRef[] GetBasicBlocks(LLVMValueRef Fn)
        {
            uint count  = CountBasicBlocks(Fn);
            var  buffer = new LLVMBasicBlockRef[count];

            if (count > 0)
            {
                GetBasicBlocks(Fn, out buffer[0]);
            }

            return(buffer);
        }
예제 #5
0
 public static extern void GetBasicBlocks(LLVMValueRef @Fn, out LLVMBasicBlockRef @BasicBlocks);
예제 #6
0
 public static extern LLVMValueRef GetLastInstruction(LLVMBasicBlockRef @BB);
예제 #7
0
 public LLVMValueRef CreateCondBr(LLVMValueRef @If, LLVMBasicBlockRef @Then, LLVMBasicBlockRef @Else)
 {
     return(LLVM.BuildCondBr(this.instance, @If, @Then, @Else));
 }
예제 #8
0
 public static extern void DeleteBasicBlock(LLVMBasicBlockRef @BB);
예제 #9
0
 public static extern void SetSuccessor(LLVMValueRef @Term, uint @i, LLVMBasicBlockRef @block);
예제 #10
0
 public void PositionBuilderAtEnd(LLVMBasicBlockRef @Block)
 {
     LLVM.PositionBuilderAtEnd(this.instance, @Block);
 }
예제 #11
0
 public static extern LLVMValueRef DIBuilderInsertDeclareAtEnd(LLVMDIBuilderRef @D, LLVMValueRef @Storage, LLVMMetadataRef @VarInfo, LLVMMetadataRef @Expr, LLVMBasicBlockRef @Block);
예제 #12
0
 public static extern void MoveBasicBlockBefore(LLVMBasicBlockRef @BB, LLVMBasicBlockRef @MovePos);
예제 #13
0
 public static extern IntPtr GetBasicBlockNameAsPtr(LLVMBasicBlockRef @BB);
예제 #14
0
 public static string GetBasicBlockName(LLVMBasicBlockRef @BB) => Marshal.PtrToStringAnsi(GetBasicBlockNameAsPtr(@BB));
예제 #15
0
 private BasicBlock(LLVMBasicBlockRef handle) : this(handle.AsValue())
 {
 }
예제 #16
0
        public static BasicBlock Create(LLVMContext Context, ReadOnlySpan <char> Name, BasicBlock InsertBefore)
        {
            var handle = LLVMBasicBlockRef.InsertInContext(Context.Handle, InsertBefore.Handle, Name);

            return(new BasicBlock(handle));
        }
예제 #17
0
        public static BasicBlock Create(LLVMContext Context, ReadOnlySpan <char> Name, Function Parent)
        {
            var handle = LLVMBasicBlockRef.AppendInContext(Context.Handle, Parent.Handle, Name);

            return(new BasicBlock(handle));
        }
예제 #18
0
 public static extern LLVMBasicBlockRef GetPreviousBasicBlock(LLVMBasicBlockRef @BB);
예제 #19
0
 public static extern LLVMValueRef DIBuilderInsertValueAtEnd(LLVMDIBuilderRef @D, LLVMValueRef @Val, ulong @Offset, LLVMMetadataRef @VarInfo, LLVMMetadataRef @Expr, LLVMBasicBlockRef @Block);
예제 #20
0
 public static extern LLVMBasicBlockRef InsertBasicBlockInContext(LLVMContextRef @C, LLVMBasicBlockRef @BB, [MarshalAs(UnmanagedType.LPStr)] string @Name);
예제 #21
0
 public bool Equals(LLVMBasicBlockRef other) => this.Pointer == other.Pointer;
예제 #22
0
 public static extern void PositionBuilderAtEnd(LLVMBuilderRef @Builder, LLVMBasicBlockRef @Block);
예제 #23
0
 public LLVMValueRef CreateInvoke(LLVMValueRef @Fn, LLVMValueRef[] @Args, LLVMBasicBlockRef @Then, LLVMBasicBlockRef @Catch, string @Name)
 {
     return(LLVM.BuildInvoke(this.instance, @Fn, Args, @Then, @Catch, @Name));
 }
예제 #24
0
 public LLVMValueRef CreateSwitch(LLVMValueRef @V, LLVMBasicBlockRef @Else, uint @NumCases)
 {
     return(LLVM.BuildSwitch(this.instance, @V, @Else, @NumCases));
 }
예제 #25
0
 public void MoveBasicBlockBefore(LLVMBasicBlockRef @MovePos)
 {
     LLVM.MoveBasicBlockBefore(this, @MovePos);
 }
예제 #26
0
 public void AddDestination(LLVMBasicBlockRef @Dest)
 {
     LLVM.AddDestination(this, @Dest);
 }
예제 #27
0
 public void MoveBasicBlockAfter(LLVMBasicBlockRef @MovePos)
 {
     LLVM.MoveBasicBlockAfter(this, @MovePos);
 }
예제 #28
0
 public static extern LLVMValueRef BuildSwitch(LLVMBuilderRef @param0, LLVMValueRef @V, LLVMBasicBlockRef @Else, uint @NumCases);
예제 #29
0
 internal BasicBlock GetOrCreate(LLVMBasicBlockRef handle) => GetOrCreate <BasicBlock>(handle.AsValue());
예제 #30
0
 public static extern LLVMValueRef GetBasicBlockParent(LLVMBasicBlockRef @BB);
예제 #31
0
 public static extern LLVMValueRef DIBuilderInsertDeclareAtEnd(LLVMDIBuilderRef @D, LLVMValueRef @Storage, LLVMMetadataRef @VarInfo, LLVMMetadataRef @Expr, LLVMBasicBlockRef @Block);
예제 #32
0
 public static extern LLVMValueRef GetBasicBlockTerminator(LLVMBasicBlockRef @BB);
예제 #33
0
 public static extern LLVMValueRef DIBuilderInsertValueAtEnd(LLVMDIBuilderRef @D, LLVMValueRef @Val, ulong @Offset, LLVMMetadataRef @VarInfo, LLVMMetadataRef @Expr, LLVMBasicBlockRef @Block);
예제 #34
0
 public static extern LLVMBasicBlockRef GetNextBasicBlock(LLVMBasicBlockRef @BB);
예제 #35
0
 public static extern void AddCase(LLVMValueRef @Switch, LLVMValueRef @OnVal, LLVMBasicBlockRef @Dest);
예제 #36
0
 public static extern LLVMBasicBlockRef InsertBasicBlock(LLVMBasicBlockRef @InsertBeforeBB, [MarshalAs(UnmanagedType.LPStr)] string @Name);
예제 #37
0
 public static extern void AddDestination(LLVMValueRef @IndirectBr, LLVMBasicBlockRef @Dest);
예제 #38
0
 public static extern void MoveBasicBlockAfter(LLVMBasicBlockRef @BB, LLVMBasicBlockRef @MovePos);
예제 #39
0
 public static extern void AddIncoming(LLVMValueRef @PhiNode, out LLVMValueRef @IncomingValues, out LLVMBasicBlockRef @IncomingBlocks, uint @Count);
예제 #40
0
 public static extern void PositionBuilder(LLVMBuilderRef @Builder, LLVMBasicBlockRef @Block, LLVMValueRef @Instr);
예제 #41
0
 public LLVMBasicBlockRef InsertBasicBlockInContext(LLVMBasicBlockRef @BB, string @Name)
 {
     return LLVM.InsertBasicBlockInContext(this, @BB, @Name);
 }
예제 #42
0
 public static extern void RemoveBasicBlockFromParent(LLVMBasicBlockRef @BB);
예제 #43
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));
        }
예제 #44
0
        public static LLVMBasicBlockRef[] GetBasicBlocks(LLVMValueRef Fn)
        {
            uint count = CountBasicBlocks(Fn);
            var buffer = new LLVMBasicBlockRef[count];

            if (count > 0)
            {
                GetBasicBlocks(Fn, out buffer[0]);
            }

            return buffer;
        }
예제 #45
0
 public void SetSuccessor(uint @i, LLVMBasicBlockRef @block)
 {
     LLVM.SetSuccessor(this, @i, @block);
 }
예제 #46
0
 public static extern LLVMValueRef BasicBlockAsValue(LLVMBasicBlockRef @BB);
예제 #47
0
 public void PositionBuilder(LLVMBasicBlockRef @Block, LLVMValueRef @Instr)
 {
     LLVM.PositionBuilder(this.instance, @Block, @Instr);
 }
예제 #48
0
 public static extern LLVMValueRef BlockAddress(LLVMValueRef @F, LLVMBasicBlockRef @BB);
예제 #49
0
 public static extern LLVMValueRef BuildBr(LLVMBuilderRef @param0, LLVMBasicBlockRef @Dest);
예제 #50
0
 public LLVMValueRef BlockAddress(LLVMBasicBlockRef @BB)
 {
     return(LLVM.BlockAddress(this, @BB));
 }
예제 #51
0
 public static extern LLVMValueRef BuildCondBr(LLVMBuilderRef @param0, LLVMValueRef @If, LLVMBasicBlockRef @Then, LLVMBasicBlockRef @Else);
예제 #52
0
 public void AddCase(LLVMValueRef @OnVal, LLVMBasicBlockRef @Dest)
 {
     LLVM.AddCase(this, @OnVal, @Dest);
 }
예제 #53
0
 public static extern LLVMValueRef BuildInvoke(LLVMBuilderRef @param0, LLVMValueRef @Fn, out LLVMValueRef @Args, uint @NumArgs, LLVMBasicBlockRef @Then, LLVMBasicBlockRef @Catch, [MarshalAs(UnmanagedType.LPStr)] string @Name);
예제 #54
0
 public LLVMBasicBlockRef InsertBasicBlockInContext(LLVMBasicBlockRef @BB, string @Name)
 {
     return(LLVM.InsertBasicBlockInContext(this, @BB, @Name));
 }
예제 #55
0
 public LLVMValueRef CreateBr(LLVMBasicBlockRef @Dest)
 {
     return(LLVM.BuildBr(this.instance, @Dest));
 }