Add llvm::Module::addLibrary to exposed API

This commit is contained in:
Travis E. Oliphant 2012-06-21 01:25:23 -05:00
commit 7b6aac79fb
4 changed files with 16 additions and 0 deletions

View file

@ -100,6 +100,14 @@ char *LLVMDumpModuleToString(LLVMModuleRef module)
return strdup(buf.str().c_str());
}
void LLVMModuleAddLibrary(LLVMModuleRef module, const char *name)
{
llvm::Module *M = llvm::unwrap(module);
llvm::StringRef namestr = llvm::StringRef(name);
M->addLibrary(namestr);
return;
}
char *LLVMDumpTypeToString(LLVMTypeRef type)
{
return do_print<LLVMTypeRef, llvm::Type>(type);