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:
parent
ecdc9ebd95
commit
b0a11dbbbc
6 changed files with 77 additions and 0 deletions
16
llvm/core.py
16
llvm/core.py
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue