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:
parent
6e6bd1ea71
commit
7f69beb258
5 changed files with 40 additions and 1 deletions
10
llvm/extra.h
10
llvm/extra.h
|
|
@ -65,6 +65,16 @@ void LLVMInstSetMetaData(LLVMValueRef instref, const char* mdkind,
|
|||
LLVMValueRef LLVMMetaDataGet(LLVMModuleRef modref, LLVMValueRef * valrefs,
|
||||
unsigned valct);
|
||||
|
||||
/*
|
||||
* Wraps MDNode::getOperand()
|
||||
*/
|
||||
LLVMValueRef LLVMMetaDataGetOperand(LLVMValueRef mdref, unsigned index);
|
||||
|
||||
/*
|
||||
* Wraps MDNode::getNumOperands()
|
||||
*/
|
||||
unsigned LLVMMetaDataGetNumOperands(LLVMValueRef mdref);
|
||||
|
||||
/*
|
||||
* Wraps ConstantExpr::getOpcodeName()
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue