[PATCH] D72209: [bindings/go] Add RemoveFromParentAsInstruction

Ayke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 4 09:56:01 PST 2020


aykevl created this revision.
aykevl added a reviewer: whitequark.
Herald added a project: LLVM.

This allows removing instructions without erasing them. They can then be added somewhere else in the IR using `Builder.Insert()`.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D72209

Files:
  llvm/bindings/go/llvm/ir.go


Index: llvm/bindings/go/llvm/ir.go
===================================================================
--- llvm/bindings/go/llvm/ir.go
+++ llvm/bindings/go/llvm/ir.go
@@ -1256,6 +1256,7 @@
 
 // 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) }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72209.236187.patch
Type: text/x-patch
Size: 715 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200104/dcc6950f/attachment.bin>


More information about the llvm-commits mailing list