From 5c5f3015f729c339f7097784caae9cba0f7c2033 Mon Sep 17 00:00:00 2001 From: Alberto Valverde Date: Fri, 14 Dec 2012 23:54:49 +0100 Subject: [PATCH] exposed LLVMInstructionEraseFromParent --- llvm/_core.cpp | 2 ++ llvm/core.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/llvm/_core.cpp b/llvm/_core.cpp index 1b7ec09..75b50ed 100644 --- a/llvm/_core.cpp +++ b/llvm/_core.cpp @@ -761,6 +761,7 @@ _wrap_obj2obj(LLVMInstGetOpcode, LLVMValueRef, int) _wrap_obj2str(LLVMInstGetOpcodeName, LLVMValueRef) _wrap_objstrobj2none(LLVMInstSetMetaData, LLVMValueRef, LLVMValueRef) +_wrap_obj2none(LLVMInstructionEraseFromParent, LLVMValueRef) /*===-- Call Sites (Call or Invoke) --------------------------------------===*/ @@ -1857,6 +1858,7 @@ static PyMethodDef core_methods[] = { _method( LLVMInstGetOpcodeName ) _method( LLVMInstSetMetaData ) + _method( LLVMInstructionEraseFromParent ) /* Call Sites (Call or Invoke) */ _method( LLVMSetInstructionCallConv ) diff --git a/llvm/core.py b/llvm/core.py index bfbab1c..6a7cc1d 100644 --- a/llvm/core.py +++ b/llvm/core.py @@ -1654,6 +1654,8 @@ class Instruction(User): def opcode_name(self): return _core.LLVMInstGetOpcodeName(self.ptr) + def erase_from_parent(self): + return _core.LLVMInstructionEraseFromParent(self.ptr) class CallOrInvokeInstruction(Instruction):