forked from OSchip/llvm-project
[bindings/go] Add EraseFromParent
After using ReplaceAllUsesWith on an instruction, it may be necessary to erase it even though it is dead. llvm-svn: 362889
This commit is contained in:
parent
648c92dcb4
commit
bc0f0a32ab
|
@ -1208,6 +1208,7 @@ func (bb BasicBlock) MoveBefore(pos BasicBlock) { C.LLVMMoveBasicBlockBefore(bb.
|
|||
func (bb BasicBlock) MoveAfter(pos BasicBlock) { C.LLVMMoveBasicBlockAfter(bb.C, pos.C) }
|
||||
|
||||
// Operations on instructions
|
||||
func (v Value) EraseFromParentAsInstruction() { C.LLVMInstructionEraseFromParent(v.C) }
|
||||
func (v Value) InstructionParent() (bb BasicBlock) { bb.C = C.LLVMGetInstructionParent(v.C); return }
|
||||
func (bb BasicBlock) FirstInstruction() (v Value) { v.C = C.LLVMGetFirstInstruction(bb.C); return }
|
||||
func (bb BasicBlock) LastInstruction() (v Value) { v.C = C.LLVMGetLastInstruction(bb.C); return }
|
||||
|
|
Loading…
Reference in New Issue