Added llvm.core.load_library_permanently() (Issue #12).

git-svn-id: http://llvm-py.googlecode.com/svn/trunk@46 8d1e9007-1d4e-0410-b67e-1979fd6579aa
This commit is contained in:
mdevan.foobar 2008-11-14 18:38:19 +00:00
commit b0a11dbbbc
6 changed files with 77 additions and 0 deletions

View file

@ -2224,3 +2224,19 @@ class MemoryBuffer(object):
def __del__(self):
_core.LLVMDisposeMemoryBuffer(self.ptr)
#===----------------------------------------------------------------------===
# Misc
#===----------------------------------------------------------------------===
def load_library_permanently(filename):
"""Load a shared library.
Load the given shared library (filename argument specifies the full
path of the .so file) using LLVM. Symbols from these are available
from the execution engine thereafter."""
ret = _core.LLVMLoadLibraryPermanently(filename)
if isinstance(ret, str):
raise llvm.LLVMException, ret