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
|
|
@ -149,6 +149,16 @@ LLVMValueRef LLVMMetaDataGet(LLVMModuleRef modref, LLVMValueRef * valrefs,
|
|||
return wrap(node);
|
||||
}
|
||||
|
||||
LLVMValueRef LLVMMetaDataGetOperand(LLVMValueRef mdref, unsigned index)
|
||||
{
|
||||
return wrap(llvm::unwrap<llvm::MDNode>(mdref)->getOperand(index));
|
||||
}
|
||||
|
||||
unsigned LLVMMetaDataGetNumOperands(LLVMValueRef mdref)
|
||||
{
|
||||
return llvm::unwrap<llvm::MDNode>(mdref)->getNumOperands();
|
||||
}
|
||||
|
||||
const char *LLVMGetConstExprOpcodeName(LLVMValueRef inst)
|
||||
{
|
||||
return llvm::unwrap<llvm::ConstantExpr>(inst)->getOpcodeName();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue