Added Module.id property (getter+setter).

Updated test/asm.py to use unittest.
This commit is contained in:
Siu Kwan Lam 2012-07-20 20:15:21 -07:00
commit 9bbeee519b
6 changed files with 57 additions and 12 deletions

View file

@ -90,6 +90,16 @@ char *do_print(W obj)
return strdup(buf.str().c_str());
}
char *LLVMGetModuleIdentifier(LLVMModuleRef module)
{
return strdup(llvm::unwrap(module)->getModuleIdentifier().c_str());
}
void LLVMSetModuleIdentifier(LLVMModuleRef module, const char * name)
{
llvm::unwrap(module)->setModuleIdentifier(name);
}
char *LLVMDumpModuleToString(LLVMModuleRef module)
{
std::string s;