summaryrefslogtreecommitdiffstats
path: root/llvm/bindings/go
diff options
context:
space:
mode:
authorAyke van Laethem <aykevanlaethem@gmail.com>2019-06-08 22:00:19 +0000
committerAyke van Laethem <aykevanlaethem@gmail.com>2019-06-08 22:00:19 +0000
commitbc0f0a32abc6f27f671139e992f4998bc4019108 (patch)
tree02af89d8f0270a911c6754df3d03e39769db7507 /llvm/bindings/go
parent648c92dcb4aa5ee4bdcea3262452f91c2baf18c6 (diff)
downloadbcm5719-llvm-bc0f0a32abc6f27f671139e992f4998bc4019108.tar.gz
bcm5719-llvm-bc0f0a32abc6f27f671139e992f4998bc4019108.zip
[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
Diffstat (limited to 'llvm/bindings/go')
-rw-r--r--llvm/bindings/go/llvm/ir.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/bindings/go/llvm/ir.go b/llvm/bindings/go/llvm/ir.go
index 29dabc67cfa..50e7d753020 100644
--- a/llvm/bindings/go/llvm/ir.go
+++ b/llvm/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 }
OpenPOWER on IntegriCloud