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

@ -507,7 +507,14 @@ class Module(llvm.Ownable, llvm.Cacheable):
def add_library(self, name):
return _core.LLVMModuleAddLibrary(self.ptr, name)
def _get_id(self):
return _core.LLVMGetModuleIdentifier(self.ptr)
def _set_id(self, string):
_core.LLVMSetModuleIdentifier(self.ptr, string)
id = property(_get_id, _set_id)
#===----------------------------------------------------------------------===
# Types