示例#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));
 }