Access to MetaData operands

This is not available in the C API, so add functions to extra.cpp:

- `LLVMMetaDataGetOperand` wraps MDNode::getOperand
- `LLVMMetaDataGetNumOperands` wraps MDNode::getNumOperands
This commit is contained in:
Wladimir J. van der Laan 2012-09-12 20:58:53 +02:00
commit 7f69beb258
5 changed files with 40 additions and 1 deletions

View file

@ -608,6 +608,8 @@ _wrap_obj2none(LLVMDeleteBasicBlock, LLVMBasicBlockRef)
_wrap_objlist2obj(LLVMMetaDataGet, LLVMModuleRef, LLVMValueRef, LLVMValueRef)
_wrap_objstrobj2none(LLVMAddNamedMetadataOperand, LLVMModuleRef, LLVMValueRef)
_wrap_objint2obj(LLVMMetaDataGetOperand, LLVMValueRef, LLVMValueRef)
_wrap_obj2obj(LLVMMetaDataGetNumOperands, LLVMValueRef, int)
static PyObject *
_wLLVMGetNamedMetadataOperands(PyObject *self, PyObject *args)
@ -1683,6 +1685,8 @@ static PyMethodDef core_methods[] = {
_method( LLVMMetaDataGet )
_method( LLVMGetNamedMetadataOperands )
_method( LLVMAddNamedMetadataOperand )
_method( LLVMMetaDataGetOperand )
_method( LLVMMetaDataGetNumOperands )
/* Instructions */
_method( LLVMGetInstructionParent )