Merge pull request #35 from meteogrid/master

Added Instruction.erase_from_parent wrapper
This commit is contained in:
Siu Kwan Lam 2012-12-17 12:12:32 -08:00
commit 970ba92720
2 changed files with 4 additions and 0 deletions

View file

@ -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 )

View file

@ -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):