From c9ddc67316a26cb8354d9866068f856f67bfe5c9 Mon Sep 17 00:00:00 2001 From: Ayke van Laethem Date: Sat, 8 Jun 2019 22:00:19 +0000 Subject: [PATCH] [bindings/go] Add EraseFromParent After using ReplaceAllUsesWith on an instruction, it may be necessary to erase it even though it is dead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362889 91177308-0d34-0410-b5e6-96231b3b80d8 --- bindings/go/llvm/ir.go | 1 + 1 file changed, 1 insertion(+) diff --git a/bindings/go/llvm/ir.go b/bindings/go/llvm/ir.go index 29dabc67cfa..50e7d753020 100644 --- a/bindings/go/llvm/ir.go +++ b/bindings/go/llvm/ir.go @@ -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 } -- 2.40.0