[llvm] r362889 - [bindings/go] Add EraseFromParent

Ayke van Laethem via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 8 15:00:19 PDT 2019


Author: aykevl
Date: Sat Jun  8 15:00:19 2019
New Revision: 362889

URL: http://llvm.org/viewvc/llvm-project?rev=362889&view=rev
Log:
[bindings/go] Add EraseFromParent

After using ReplaceAllUsesWith on an instruction, it may be necessary to
erase it even though it is dead.

Modified:
    llvm/trunk/bindings/go/llvm/ir.go

Modified: llvm/trunk/bindings/go/llvm/ir.go
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/go/llvm/ir.go?rev=362889&r1=362888&r2=362889&view=diff
==============================================================================
--- llvm/trunk/bindings/go/llvm/ir.go (original)
+++ llvm/trunk/bindings/go/llvm/ir.go Sat Jun  8 15:00:19 2019
@@ -1208,6 +1208,7 @@ func (bb BasicBlock) MoveBefore(pos Basi
 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 }




More information about the llvm-commits mailing list