mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-27 05:10:41 +00:00
[bindings/go] Add RemoveFromParentAsInstruction
This allows removing instructions without erasing them. They can then be added somewhere else in the IR using Builder.Insert().
This commit is contained in:
parent
159dabd5ed
commit
3509611238
@ -1256,6 +1256,7 @@ func (bb BasicBlock) MoveAfter(pos BasicBlock) { C.LLVMMoveBasicBlockAfter(bb.C
|
||||
|
||||
// Operations on instructions
|
||||
func (v Value) EraseFromParentAsInstruction() { C.LLVMInstructionEraseFromParent(v.C) }
|
||||
func (v Value) RemoveFromParentAsInstruction() { C.LLVMInstructionRemoveFromParent(v.C) }
|
||||
func (v Value) InstructionParent() (bb BasicBlock) { bb.C = C.LLVMGetInstructionParent(v.C); return }
|
||||
func (v Value) InstructionDebugLoc() (md Metadata) { md.C = C.LLVMInstructionGetDebugLoc(v.C); return }
|
||||
func (v Value) InstructionSetDebugLoc(md Metadata) { C.LLVMInstructionSetDebugLoc(v.C, md.C) }
|
||||
|
Loading…
Reference in New Issue
Block a user