add support for metadata.

add related test.
This commit is contained in:
Siu Kwan Lam 2012-09-06 15:47:23 -07:00
commit 82117d899e
6 changed files with 113 additions and 5 deletions

View file

@ -53,15 +53,25 @@
extern "C" {
#endif
/*
* Wraps Instruction::setMetadata()
*/
void LLVMInstSetMetaData(LLVMValueRef instref, const char* mdkind,
LLVMValueRef metaref);
/*
* Wraps ConstantExpr::getOpcodeName();
* Wraps MDNode::get()
*/
LLVMValueRef LLVMMetaDataGet(LLVMModuleRef modref, LLVMValueRef * valrefs,
unsigned valct);
/*
* Wraps ConstantExpr::getOpcodeName()
*/
const char *LLVMGetConstExprOpcodeName(LLVMValueRef inst);
/*
* Wraps ConstantExpr::getOpcode();
* Wraps ConstantExpr::getOpcode()
*/
unsigned LLVMGetConstExprOpcode(LLVMValueRef inst);