can now clone modules

This commit is contained in:
Siu Kwan Lam 2012-10-19 16:18:24 -05:00
commit d781e83bd1
5 changed files with 64 additions and 0 deletions

View file

@ -582,6 +582,9 @@ class Module(llvm.Ownable, llvm.Cacheable):
ptr = _core.LLVMModuleGetNamedMetaData(self.ptr, name)
return NamedMetaData(ptr)
def clone(self):
return Module(_core.LLVMCloneModule(self.ptr))
#===----------------------------------------------------------------------===
# Types
#===----------------------------------------------------------------------===